Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45234 )
Change subject: misc: Replace M5_ATTR_PACKED with GEM5_PACKED.
......................................................................
misc: Replace M5_ATTR_PACKED with GEM5_PACKED.
Change-Id: Ie59071ca1fc81a76267a54ddd2d35dfc4477995d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45234
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
---
M src/arch/arm/remote_gdb.hh
M src/arch/x86/bios/acpi.hh
M src/arch/x86/linux/linux.hh
M src/arch/x86/remote_gdb.hh
M src/base/bmpwriter.hh
M src/base/inet.hh
M src/base/pngwriter.hh
M src/base/vnc/vncinput.hh
M src/base/vnc/vncserver.hh
M src/cpu/kvm/x86_cpu.cc
M src/dev/virtio/base.hh
M src/dev/virtio/block.hh
M src/dev/virtio/console.hh
M src/dev/virtio/fs9p.hh
M src/kern/linux/helpers.cc
15 files changed, 42 insertions(+), 40 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/remote_gdb.hh b/src/arch/arm/remote_gdb.hh
index ce9cd69..ea6cd05 100644
--- a/src/arch/arm/remote_gdb.hh
+++ b/src/arch/arm/remote_gdb.hh
@@ -66,7 +66,7 @@
{
using BaseGdbRegCache::BaseGdbRegCache;
private:
- struct M5_ATTR_PACKED
+ struct GEM5_PACKED
{
uint32_t gpr[16];
uint32_t cpsr;
@@ -89,7 +89,7 @@
{
using BaseGdbRegCache::BaseGdbRegCache;
private:
- struct M5_ATTR_PACKED
+ struct GEM5_PACKED
{
uint64_t x[31];
uint64_t spx;
diff --git a/src/arch/x86/bios/acpi.hh b/src/arch/x86/bios/acpi.hh
index 1c9f8e0..fa6fa10 100644
--- a/src/arch/x86/bios/acpi.hh
+++ b/src/arch/x86/bios/acpi.hh
@@ -95,7 +95,7 @@
static const char signature[];
- struct M5_ATTR_PACKED MemR0
+ struct GEM5_PACKED MemR0
{
// src: https://wiki.osdev.org/RSDP
char signature[8] = {};
@@ -107,7 +107,7 @@
static_assert(std::is_trivially_copyable<MemR0>::value,
"Type not suitable for memcpy.");
- struct M5_ATTR_PACKED Mem : public MemR0
+ struct GEM5_PACKED Mem : public MemR0
{
// since version 2
uint32_t length = 0;
@@ -132,7 +132,7 @@
protected:
PARAMS(X86ACPISysDescTable);
- struct M5_ATTR_PACKED Mem
+ struct GEM5_PACKED Mem
{
// src: https://wiki.osdev.org/RSDT
char signature[4] = {};
@@ -207,7 +207,7 @@
protected:
PARAMS(X86ACPIMadtRecord);
- struct M5_ATTR_PACKED Mem
+ struct GEM5_PACKED Mem
{
uint8_t type = 0;
uint8_t length = 0;
@@ -236,7 +236,7 @@
protected:
PARAMS(X86ACPIMadtLAPIC);
- struct M5_ATTR_PACKED Mem : public Record::Mem
+ struct GEM5_PACKED Mem : public Record::Mem
{
uint8_t acpiProcessorId = 0;
uint8_t apicId = 0;
@@ -256,7 +256,7 @@
protected:
PARAMS(X86ACPIMadtIOAPIC);
- struct M5_ATTR_PACKED Mem : public Record::Mem
+ struct GEM5_PACKED Mem : public Record::Mem
{
uint8_t ioApicId = 0;
uint8_t _reserved = 0;
@@ -277,7 +277,7 @@
protected:
PARAMS(X86ACPIMadtIntSourceOverride);
- struct M5_ATTR_PACKED Mem : public Record::Mem
+ struct GEM5_PACKED Mem : public Record::Mem
{
uint8_t busSource = 0;
uint8_t irqSource = 0;
@@ -298,7 +298,7 @@
protected:
PARAMS(X86ACPIMadtNMI);
- struct M5_ATTR_PACKED Mem : public Record::Mem
+ struct GEM5_PACKED Mem : public Record::Mem
{
uint8_t acpiProcessorId = 0;
uint16_t flags = 0;
@@ -318,7 +318,7 @@
protected:
PARAMS(X86ACPIMadtLAPICOverride);
- struct M5_ATTR_PACKED Mem : public Record::Mem
+ struct GEM5_PACKED Mem : public Record::Mem
{
uint16_t _reserved = 0;
uint64_t localAPICAddress = 0;
@@ -337,7 +337,7 @@
protected:
PARAMS(X86ACPIMadt);
- struct M5_ATTR_PACKED Mem : public SysDescTable::Mem
+ struct GEM5_PACKED Mem : public SysDescTable::Mem
{
uint32_t localAPICAddress = 0;
uint32_t flags = 0;
diff --git a/src/arch/x86/linux/linux.hh b/src/arch/x86/linux/linux.hh
index 5dd75eb..c808a4b 100644
--- a/src/arch/x86/linux/linux.hh
+++ b/src/arch/x86/linux/linux.hh
@@ -247,7 +247,7 @@
class X86Linux32 : public X86Linux
{
public:
- typedef struct M5_ATTR_PACKED
+ typedef struct GEM5_PACKED
{
uint64_t st_dev;
uint8_t __pad0[4];
diff --git a/src/arch/x86/remote_gdb.hh b/src/arch/x86/remote_gdb.hh
index 4ebaa04..92fdea3 100644
--- a/src/arch/x86/remote_gdb.hh
+++ b/src/arch/x86/remote_gdb.hh
@@ -94,7 +94,7 @@
{
using BaseGdbRegCache::BaseGdbRegCache;
private:
- struct M5_ATTR_PACKED
+ struct GEM5_PACKED
{
uint64_t rax;
uint64_t rbx;
diff --git a/src/base/bmpwriter.hh b/src/base/bmpwriter.hh
index 3e9f16d..4d75861 100644
--- a/src/base/bmpwriter.hh
+++ b/src/base/bmpwriter.hh
@@ -75,7 +75,7 @@
void write(std::ostream &bmp) const override;
private:
- struct M5_ATTR_PACKED FileHeader
+ struct GEM5_PACKED FileHeader
{
unsigned char magic_number[2];
uint32_t size;
@@ -84,7 +84,9 @@
uint32_t offset;
};
- struct M5_ATTR_PACKED InfoHeaderV1 { /* Aka DIB header */
+ struct GEM5_PACKED InfoHeaderV1
+ {
+ /* Aka DIB header */
uint32_t Size;
uint32_t Width;
uint32_t Height;
@@ -98,13 +100,13 @@
uint32_t ClrImportant;
};
- struct M5_ATTR_PACKED CompleteV1Header
+ struct GEM5_PACKED CompleteV1Header
{
FileHeader file;
InfoHeaderV1 info;
};
- struct M5_ATTR_PACKED BmpPixel32
+ struct GEM5_PACKED BmpPixel32
{
BmpPixel32 &operator=(const Pixel &rhs) {
red = rhs.red;
diff --git a/src/base/inet.hh b/src/base/inet.hh
index a15b93d..b6f0eb1 100644
--- a/src/base/inet.hh
+++ b/src/base/inet.hh
@@ -565,14 +565,14 @@
};
#define HOME_ADDRESS_OPTION 0xC9
-struct M5_ATTR_PACKED ip6_opt_dstopts
+struct GEM5_PACKED ip6_opt_dstopts
{
uint8_t type;
uint8_t length;
ip6_addr_t addr;
};
-struct M5_ATTR_PACKED ip6_opt_hdr
+struct GEM5_PACKED ip6_opt_hdr
{
uint8_t ext_nxt;
uint8_t ext_len;
diff --git a/src/base/pngwriter.hh b/src/base/pngwriter.hh
index a7e1784..7163482 100644
--- a/src/base/pngwriter.hh
+++ b/src/base/pngwriter.hh
@@ -76,7 +76,7 @@
void write(std::ostream &png) const override;
private:
/** Png Pixel type: not containing padding */
- struct M5_ATTR_PACKED PngPixel24
+ struct GEM5_PACKED PngPixel24
{
PngPixel24 &operator=(const Pixel &rhs) {
red = rhs.red;
diff --git a/src/base/vnc/vncinput.hh b/src/base/vnc/vncinput.hh
index 6c7f916..57e62d1 100644
--- a/src/base/vnc/vncinput.hh
+++ b/src/base/vnc/vncinput.hh
@@ -97,7 +97,7 @@
ClientCutText = 6
};
- struct M5_ATTR_PACKED PixelFormat
+ struct GEM5_PACKED PixelFormat
{
uint8_t bpp;
uint8_t depth;
@@ -112,21 +112,21 @@
uint8_t padding[3];
};
- struct M5_ATTR_PACKED PixelFormatMessage
+ struct GEM5_PACKED PixelFormatMessage
{
uint8_t type;
uint8_t padding[3];
PixelFormat px;
};
- struct M5_ATTR_PACKED PixelEncodingsMessage
+ struct GEM5_PACKED PixelEncodingsMessage
{
uint8_t type;
uint8_t padding;
uint16_t num_encodings;
};
- struct M5_ATTR_PACKED FrameBufferUpdateReq
+ struct GEM5_PACKED FrameBufferUpdateReq
{
uint8_t type;
uint8_t incremental;
@@ -136,7 +136,7 @@
uint16_t height;
};
- struct M5_ATTR_PACKED KeyEventMessage
+ struct GEM5_PACKED KeyEventMessage
{
uint8_t type;
uint8_t down_flag;
@@ -144,7 +144,7 @@
uint32_t key;
};
- struct M5_ATTR_PACKED PointerEventMessage
+ struct GEM5_PACKED PointerEventMessage
{
uint8_t type;
uint8_t button_mask;
@@ -152,7 +152,7 @@
uint16_t y;
};
- struct M5_ATTR_PACKED ClientCutTextMessage
+ struct GEM5_PACKED ClientCutTextMessage
{
uint8_t type;
uint8_t padding[3];
diff --git a/src/base/vnc/vncserver.hh b/src/base/vnc/vncserver.hh
index 08acc43..a8c2a89 100644
--- a/src/base/vnc/vncserver.hh
+++ b/src/base/vnc/vncserver.hh
@@ -110,7 +110,7 @@
NormalPhase
};
- struct M5_ATTR_PACKED ServerInitMsg
+ struct GEM5_PACKED ServerInitMsg
{
uint16_t fbWidth;
uint16_t fbHeight;
@@ -119,14 +119,14 @@
char name[2]; // just to put M5 in here
};
- struct M5_ATTR_PACKED FrameBufferUpdate
+ struct GEM5_PACKED FrameBufferUpdate
{
uint8_t type;
uint8_t padding;
uint16_t num_rects;
};
- struct M5_ATTR_PACKED FrameBufferRect
+ struct GEM5_PACKED FrameBufferRect
{
uint16_t x;
uint16_t y;
@@ -135,7 +135,7 @@
int32_t encoding;
};
- struct M5_ATTR_PACKED ServerCutText
+ struct GEM5_PACKED ServerCutText
{
uint8_t type;
uint8_t padding[3];
diff --git a/src/cpu/kvm/x86_cpu.cc b/src/cpu/kvm/x86_cpu.cc
index 1f08708..da210df 100644
--- a/src/cpu/kvm/x86_cpu.cc
+++ b/src/cpu/kvm/x86_cpu.cc
@@ -67,7 +67,7 @@
// data) is used to indicate that a segment has been accessed.
#define SEG_TYPE_BIT_ACCESSED 1
-struct M5_ATTR_PACKED FXSave
+struct GEM5_PACKED FXSave
{
uint16_t fcw;
uint16_t fsw;
diff --git a/src/dev/virtio/base.hh b/src/dev/virtio/base.hh
index 416d3a4..2022e28 100644
--- a/src/dev/virtio/base.hh
+++ b/src/dev/virtio/base.hh
@@ -466,7 +466,7 @@
typedef uint16_t Flags;
typedef uint16_t Index;
- struct M5_ATTR_PACKED Header
+ struct GEM5_PACKED Header
{
Flags flags;
Index index;
diff --git a/src/dev/virtio/block.hh b/src/dev/virtio/block.hh
index 8aa89ae..e937992 100644
--- a/src/dev/virtio/block.hh
+++ b/src/dev/virtio/block.hh
@@ -81,7 +81,7 @@
* @note This needs to be changed if the supported feature set
* changes!
*/
- struct M5_ATTR_PACKED Config
+ struct GEM5_PACKED Config
{
uint64_t capacity;
};
@@ -123,7 +123,7 @@
/** @} */
/** VirtIO block device request as sent by guest */
- struct M5_ATTR_PACKED BlkRequest
+ struct GEM5_PACKED BlkRequest
{
RequestType type;
uint32_t reserved;
diff --git a/src/dev/virtio/console.hh b/src/dev/virtio/console.hh
index dbca836..3d2c7a2 100644
--- a/src/dev/virtio/console.hh
+++ b/src/dev/virtio/console.hh
@@ -77,7 +77,7 @@
* @note This needs to be changed if the multiport feature is
* announced!
*/
- struct M5_ATTR_PACKED Config
+ struct GEM5_PACKED Config
{
uint16_t cols;
uint16_t rows;
diff --git a/src/dev/virtio/fs9p.hh b/src/dev/virtio/fs9p.hh
index 92ce5d9..d32cd32 100644
--- a/src/dev/virtio/fs9p.hh
+++ b/src/dev/virtio/fs9p.hh
@@ -50,7 +50,7 @@
typedef uint8_t P9MsgType;
typedef uint16_t P9Tag;
-struct M5_ATTR_PACKED P9MsgHeader
+struct GEM5_PACKED P9MsgHeader
{
/** Length including header */
uint32_t len;
@@ -121,7 +121,7 @@
* @note The fields in this structure depend on the features
* exposed to the guest.
*/
- struct M5_ATTR_PACKED Config
+ struct GEM5_PACKED Config
{
uint16_t len;
char tag[];
diff --git a/src/kern/linux/helpers.cc b/src/kern/linux/helpers.cc
index 740c6a0..a81f638 100644
--- a/src/kern/linux/helpers.cc
+++ b/src/kern/linux/helpers.cc
@@ -43,7 +43,7 @@
#include "sim/byteswap.hh"
#include "sim/system.hh"
-struct M5_ATTR_PACKED DmesgEntry
+struct GEM5_PACKED DmesgEntry
{
uint64_t ts_nsec;
uint16_t len;
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45234
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie59071ca1fc81a76267a54ddd2d35dfc4477995d
Gerrit-Change-Number: 45234
Gerrit-PatchSet: 7
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s