[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 1/3] xen/multiboot: add proper struct definitions to typedefs


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
  • Date: Mon, 19 Dec 2022 14:45:31 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 19 Dec 2022 14:45:59 +0000
  • Ironport-data: A9a23:lVx05KM/9LAI38LvrR2Sl8FynXyQoLVcMsEvi/4bfWQNrUp0hjAPy WVMUWzUM/bfZGCne4onPIi3pkgAuZfVm9FqTgto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9SuvzrRC9H5qyo4mpC5w1mPJingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0u1+OXMe6 qdIERFOVRPZpNro3p+7Q/Y506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w/N3wsYDUWUrsTIIkzhuillz/zYjRDrFO9rqsr+WnDigd21dABNfKFKoTUHp4MxC50o Erh1nvmWzo7LeWw0DqM4FGrq7+XnS3SDdd6+LqQqacx3Qz7KnYoIB8LUVq2p9Gph0j4XMhQQ 2QP4TYnp6U28E2tT/H+Uge+rXrCuQQTM/JPF8Uq5QfLzbDbiy6JC25BQjNfZdgOsM4tWSdsx lKPh8nuBzFkrPuSU3313rWeoC62OCMVBXQffiJCRgwAi+QPu6lq0EiJFIw6Vvfo0JulQlkc3 gxmsgA1jo0B3dFQh5yavmvE2RGU+IbkTgcqs1C/sn2e0it1Y4usZoqN4Ffd7OpdIIvxcmRtr EToiODFsrlQUMjleDilBbxUQer3v6rt3Cj02wYHInU3y9i6F5dPl6h06So2GkpmO91sldTBM B6K4lM5CHO+0RKXgU5Lj2CZUZ9CIUvIT46NuhXogj1mPPBMmPevpn0GWKJp9zmFfLIQua8+I 4yHVs2nEGwXD69qpBLvGbhEiu97nX5glTKCLXwe8/hA+ePCDEN5tJ9faAfeBgzHxPjsTPrpH yZ3aJLRlkQ3vBzWaSjL648DRW03wYwALcmu8aR/L7fTSjeK7Ul9U5c9N5t9Id0690mU/8+Ul kyAtrhwkwGu2CKZdVjXMhiOqtrHBP5CkJ7yBgR0VX7A5pTpSd3HAHs3H3fvQYQayQ==
  • Ironport-hdrordr: A9a23:IZa4062dfX7Md9esiEJ2OwqjBI0kLtp133Aq2lEZdPWaSL3gqy nOpoVi6faQslwssR4b6LW90cW7MBHhHNtOkOos1NSZPTUO2lHYSL2KhLGKq1bd8m/FltK1vp 0QFJSWZueAa2SSTvyX3OB7KbsdKRW8n5xATN2x80tQ
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This allows to use them for forward declaration in other headers.

Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>

---
CC: George Dunlap <george.dunlap@xxxxxxxxxx>
CC: Julien Grall <julien@xxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>

v1 --> v2:
- New patch
---
 xen/include/xen/multiboot.h | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/xen/include/xen/multiboot.h b/xen/include/xen/multiboot.h
index d1b43e1183..a541bdf8a8 100644
--- a/xen/include/xen/multiboot.h
+++ b/xen/include/xen/multiboot.h
@@ -46,23 +46,25 @@
 #ifndef __ASSEMBLY__
 
 /* The symbol table for a.out.  */
-typedef struct {
+struct aout_symbol_table {
     u32 tabsize;
     u32 strsize;
     u32 addr;
     u32 reserved;
-} aout_symbol_table_t;
+};
+typedef struct aout_symbol_table aout_symbol_table_t;
 
 /* The section header table for ELF.  */
-typedef struct {
+struct elf_section_header_table{
     u32 num;
     u32 size;
     u32 addr;
     u32 shndx;
-} elf_section_header_table_t;
+};
+typedef struct elf_section_header_table elf_section_header_table_t;
 
 /* The Multiboot information.  */
-typedef struct {
+struct multiboot_info {
     u32 flags;
 
     /* Valid if flags sets MBI_MEMLIMITS */
@@ -101,26 +103,29 @@ typedef struct {
 
     /* Valid if flags sets MBI_APM */
     u32 apm_table;
-} multiboot_info_t;
+};
+typedef struct multiboot_info multiboot_info_t;
 
 /* The module structure.  */
-typedef struct {
+struct module {
     u32 mod_start;
     u32 mod_end;
     u32 string;
     u32 reserved;
-} module_t;
+};
+typedef struct module module_t;
 
 /* The memory map. Be careful that the offset 0 is base_addr_low
    but no size.  */
-typedef struct {
+struct memory_map {
     u32 size;
     u32 base_addr_low;
     u32 base_addr_high;
     u32 length_low;
     u32 length_high;
     u32 type;
-} memory_map_t;
+};
+typedef struct memory_map memory_map_t;
 
 
 #endif /* __ASSEMBLY__ */
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.