소스 검색

[build] Remove PACKED macro

Most of iPXE uses __attribute__((packed)) anyway, and PACKED conflicts
with an identically-named macro in the upstream EFI header files.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 년 전
부모
커밋
307b39c08c
6개의 변경된 파일70개의 추가작업 그리고 74개의 파일을 삭제
  1. 4
    4
      src/arch/i386/include/pxe.h
  2. 52
    52
      src/arch/i386/include/pxe_api.h
  3. 2
    2
      src/arch/i386/include/pxe_types.h
  4. 12
    12
      src/arch/i386/include/registers.h
  5. 0
    1
      src/doxygen.cfg
  6. 0
    3
      src/include/compiler.h

+ 4
- 4
src/arch/i386/include/pxe.h 파일 보기

@@ -10,7 +10,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
10 10
 /* Parameter block for pxenv_unknown() */
11 11
 struct s_PXENV_UNKNOWN {
12 12
 	PXENV_STATUS_t Status;			/**< PXE status code */
13
-} PACKED;
13
+} __attribute__ (( packed ));
14 14
 
15 15
 typedef struct s_PXENV_UNKNOWN PXENV_UNKNOWN_t;
16 16
 
@@ -87,7 +87,7 @@ struct undi_rom_header {
87 87
 	UINT16_t PXEROMID;
88 88
 	/** Offset of the PCI ROM structure */
89 89
 	UINT16_t PCIRHeader;
90
-} PACKED;
90
+} __attribute__ (( packed ));
91 91
 
92 92
 /** Signature for an expansion ROM */
93 93
 #define ROM_SIGNATURE 0xaa55
@@ -121,7 +121,7 @@ struct undi_rom_id {
121 121
 	UINT16_t DataSize;
122 122
 	/** Minimum required code segment size */
123 123
 	UINT16_t CodeSize;
124
-} PACKED;
124
+} __attribute__ (( packed ));
125 125
 
126 126
 /** Signature for an UNDI ROM ID structure */
127 127
 #define UNDI_ROM_ID_SIGNATURE \
@@ -138,7 +138,7 @@ struct pcir_header {
138 138
 	uint16_t vendor_id;
139 139
 	/** PCI device ID */
140 140
 	uint16_t device_id;
141
-} PACKED;
141
+} __attribute__ (( packed ));
142 142
 
143 143
 /** Signature for an UNDI ROM ID structure */
144 144
 #define PCIR_SIGNATURE \

+ 52
- 52
src/arch/i386/include/pxe_api.h 파일 보기

@@ -116,7 +116,7 @@ struct s_PXENV {
116 116
 	 * greater.  If present, it points to a struct s_PXE.
117 117
 	 */
118 118
 	SEGOFF16_t	PXEPtr;
119
-} PACKED;
119
+} __attribute__ (( packed ));
120 120
 
121 121
 typedef struct s_PXENV PXENV_t;
122 122
 
@@ -221,7 +221,7 @@ struct s_PXE {
221 221
 	SEGDESC_t	BC_Code;
222 222
 	/** Base-code writable code segment descriptor */
223 223
 	SEGDESC_t	BC_CodeWrite;
224
-} PACKED;
224
+} __attribute__ (( packed ));
225 225
 
226 226
 typedef struct s_PXE PXE_t;
227 227
 
@@ -248,7 +248,7 @@ typedef struct s_PXE PXE_t;
248 248
 struct s_PXENV_UNLOAD_STACK {
249 249
 	PXENV_STATUS_t Status;			/**< PXE status code */
250 250
 	UINT8_t reserved[10];			/**< Must be zero */
251
-} PACKED;
251
+} __attribute__ (( packed ));
252 252
 
253 253
 typedef struct s_PXENV_UNLOAD_STACK PXENV_UNLOAD_STACK_t;
254 254
 
@@ -292,7 +292,7 @@ struct s_PXENV_GET_CACHED_INFO {
292 292
 	UINT16_t BufferSize;			/**< Buffer size */
293 293
 	SEGOFF16_t Buffer;			/**< Buffer address */
294 294
 	UINT16_t BufferLimit;			/**< Maximum buffer size */
295
-} PACKED;
295
+} __attribute__ (( packed ));
296 296
 
297 297
 typedef struct s_PXENV_GET_CACHED_INFO PXENV_GET_CACHED_INFO_t;
298 298
 
@@ -399,7 +399,7 @@ struct bootph {
399 399
 			UINT8_t pad[56];
400 400
 		} v;
401 401
 	} vendor;
402
-} PACKED;
402
+} __attribute__ (( packed ));
403 403
 
404 404
 typedef struct bootph BOOTPLAYER_t;
405 405
 
@@ -492,7 +492,7 @@ struct s_PXENV_START_UNDI {
492 492
 	 * more sense.
493 493
 	 */
494 494
 	SEGSEL_t ES;
495
-} PACKED;
495
+} __attribute__ (( packed ));
496 496
 
497 497
 typedef struct s_PXENV_START_UNDI PXENV_START_UNDI_t;
498 498
 
@@ -513,7 +513,7 @@ extern PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi );
513 513
 /** Parameter block for pxenv_stop_undi() */
514 514
 struct s_PXENV_STOP_UNDI {
515 515
 	PXENV_STATUS_t Status;			/**< PXE status code */
516
-} PACKED;
516
+} __attribute__ (( packed ));
517 517
 
518 518
 typedef struct s_PXENV_STOP_UNDI PXENV_STOP_UNDI_t;
519 519
 
@@ -534,7 +534,7 @@ extern PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi );
534 534
 /** Parameter block for pxenv_start_base() */
535 535
 struct s_PXENV_START_BASE {
536 536
 	PXENV_STATUS_t Status;			/**< PXE status code */
537
-} PACKED;
537
+} __attribute__ (( packed ));
538 538
 
539 539
 typedef struct s_PXENV_START_BASE PXENV_START_BASE_t;
540 540
 
@@ -555,7 +555,7 @@ extern PXENV_EXIT_t pxenv_start_base ( struct s_PXENV_START_BASE *start_base );
555 555
 /** Parameter block for pxenv_stop_base() */
556 556
 struct s_PXENV_STOP_BASE {
557 557
 	PXENV_STATUS_t Status;			/**< PXE status code */
558
-} PACKED;
558
+} __attribute__ (( packed ));
559 559
 
560 560
 typedef struct s_PXENV_STOP_BASE PXENV_STOP_BASE_t;
561 561
 
@@ -596,7 +596,7 @@ struct s_PXENV_TFTP_OPEN {
596 596
 	 * negotiate blocksizes smaller than this.
597 597
 	 */
598 598
 	UINT16_t PacketSize;
599
-} PACKED;
599
+} __attribute__ (( packed ));
600 600
 
601 601
 typedef struct s_PXENV_TFTP_OPEN PXENV_TFTP_OPEN_t;
602 602
 
@@ -617,7 +617,7 @@ extern PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open );
617 617
 /** Parameter block for pxenv_tftp_close() */
618 618
 struct s_PXENV_TFTP_CLOSE {
619 619
 	PXENV_STATUS_t Status;			/**< PXE status code */
620
-} PACKED;
620
+} __attribute__ (( packed ));
621 621
 
622 622
 typedef struct s_PXENV_TFTP_CLOSE PXENV_TFTP_CLOSE_t;
623 623
 
@@ -641,7 +641,7 @@ struct s_PXENV_TFTP_READ {
641 641
 	UINT16_t PacketNumber;			/**< TFTP packet number */
642 642
 	UINT16_t BufferSize;			/**< Size of data buffer */
643 643
 	SEGOFF16_t Buffer;			/**< Address of data buffer */
644
-} PACKED;
644
+} __attribute__ (( packed ));
645 645
 
646 646
 typedef struct s_PXENV_TFTP_READ PXENV_TFTP_READ_t;
647 647
 
@@ -686,7 +686,7 @@ struct s_PXENV_TFTP_READ_FILE {
686 686
 	 * already been seen).
687 687
 	 */
688 688
 	UINT16_t TFTPReopenDelay;
689
-} PACKED;
689
+} __attribute__ (( packed ));
690 690
 
691 691
 typedef struct s_PXENV_TFTP_READ_FILE PXENV_TFTP_READ_FILE_t;
692 692
 
@@ -712,7 +712,7 @@ struct s_PXENV_TFTP_GET_FSIZE {
712 712
 	IP4_t GatewayIPAddress;			/**< Relay agent IP address */
713 713
 	UINT8_t FileName[128];			/**< File name */
714 714
 	UINT32_t FileSize;			/**< Size of the file */
715
-} PACKED;
715
+} __attribute__ (( packed ));
716 716
 
717 717
 typedef struct s_PXENV_TFTP_GET_FSIZE PXENV_TFTP_GET_FSIZE_t;
718 718
 
@@ -744,7 +744,7 @@ extern PXENV_EXIT_t pxenv_tftp_get_fsize ( struct s_PXENV_TFTP_GET_FSIZE
744 744
 struct s_PXENV_UDP_OPEN {
745 745
 	PXENV_STATUS_t	Status;		/**< PXE status code */
746 746
 	IP4_t		src_ip;		/**< IP address of this station */
747
-} PACKED;
747
+} __attribute__ (( packed ));
748 748
 
749 749
 typedef struct s_PXENV_UDP_OPEN PXENV_UDP_OPEN_t;
750 750
 
@@ -765,7 +765,7 @@ extern PXENV_EXIT_t pxenv_udp_open ( struct s_PXENV_UDP_OPEN *udp_open );
765 765
 /** Parameter block for pxenv_udp_close() */
766 766
 struct s_PXENV_UDP_CLOSE {
767 767
 	PXENV_STATUS_t	Status;		/**< PXE status code */
768
-} PACKED;
768
+} __attribute__ (( packed ));
769 769
 
770 770
 typedef struct s_PXENV_UDP_CLOSE PXENV_UDP_CLOSE_t;
771 771
 
@@ -792,7 +792,7 @@ struct s_PXENV_UDP_WRITE {
792 792
 	UDP_PORT_t	dst_port;	/**< Destination UDP port */
793 793
 	UINT16_t	buffer_size;	/**< UDP payload buffer size */
794 794
 	SEGOFF16_t	buffer;		/**< UDP payload buffer address */
795
-} PACKED;
795
+} __attribute__ (( packed ));
796 796
 
797 797
 typedef struct s_PXENV_UDP_WRITE PXENV_UDP_WRITE_t;
798 798
 
@@ -819,7 +819,7 @@ struct s_PXENV_UDP_READ {
819 819
 	UDP_PORT_t	d_port;		/**< Destination UDP port */
820 820
 	UINT16_t	buffer_size;	/**< UDP payload buffer size */
821 821
 	SEGOFF16_t	buffer;		/**< UDP payload buffer address */
822
-} PACKED;
822
+} __attribute__ (( packed ));
823 823
 
824 824
 typedef struct s_PXENV_UDP_READ PXENV_UDP_READ_t;
825 825
 
@@ -856,7 +856,7 @@ extern PXENV_EXIT_t pxenv_udp_read ( struct s_PXENV_UDP_READ *udp_read );
856 856
 /** Parameter block for pxenv_undi_startup() */
857 857
 struct s_PXENV_UNDI_STARTUP {
858 858
 	PXENV_STATUS_t	Status;		/**< PXE status code */
859
-} PACKED;
859
+} __attribute__ (( packed ));
860 860
 
861 861
 typedef struct s_PXENV_UNDI_STARTUP PXENV_UNDI_STARTUP_t;
862 862
 
@@ -878,7 +878,7 @@ extern PXENV_EXIT_t pxenv_undi_startup ( struct s_PXENV_UNDI_STARTUP
878 878
 /** Parameter block for pxenv_undi_cleanup() */
879 879
 struct s_PXENV_UNDI_CLEANUP {
880 880
 	PXENV_STATUS_t	Status;		/**< PXE status code */
881
-} PACKED;
881
+} __attribute__ (( packed ));
882 882
 
883 883
 typedef struct s_PXENV_UNDI_CLEANUP PXENV_UNDI_CLEANUP_t;
884 884
 
@@ -909,7 +909,7 @@ struct s_PXENV_UNDI_INITIALIZE {
909 909
 	 */
910 910
 	ADDR32_t ProtocolIni;
911 911
 	UINT8_t reserved[8];		/**< Must be zero */
912
-} PACKED;
912
+} __attribute__ (( packed ));
913 913
 
914 914
 typedef struct s_PXENV_UNDI_INITIALIZE PXENV_UNDI_INITIALIZE_t;
915 915
 
@@ -937,7 +937,7 @@ struct s_PXENV_UNDI_MCAST_ADDRESS {
937 937
 	UINT16_t MCastAddrCount;
938 938
 	/** List of up to #MAXNUM_MCADDR multicast MAC addresses */
939 939
 	MAC_ADDR_t McastAddr[MAXNUM_MCADDR];
940
-} PACKED;
940
+} __attribute__ (( packed ));
941 941
 
942 942
 typedef struct s_PXENV_UNDI_MCAST_ADDRESS PXENV_UNDI_MCAST_ADDRESS_t;
943 943
 
@@ -946,7 +946,7 @@ struct s_PXENV_UNDI_RESET {
946 946
 	PXENV_STATUS_t	Status;		/**< PXE status code */
947 947
 	/** Multicast MAC addresses */
948 948
 	struct s_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf;
949
-} PACKED;
949
+} __attribute__ (( packed ));
950 950
 
951 951
 typedef struct s_PXENV_UNDI_RESET PXENV_UNDI_RESET_t;
952 952
 
@@ -968,7 +968,7 @@ extern PXENV_EXIT_t pxenv_undi_reset_adapter ( struct s_PXENV_UNDI_RESET
968 968
 /** Parameter block for pxenv_undi_shutdown() */
969 969
 struct s_PXENV_UNDI_SHUTDOWN {
970 970
 	PXENV_STATUS_t	Status;		/**< PXE status code */
971
-} PACKED;
971
+} __attribute__ (( packed ));
972 972
 
973 973
 typedef struct s_PXENV_UNDI_SHUTDOWN PXENV_UNDI_SHUTDOWN_t;
974 974
 
@@ -1020,7 +1020,7 @@ struct s_PXENV_UNDI_OPEN {
1020 1020
 	UINT16_t PktFilter;
1021 1021
 	/** Multicast MAC addresses */
1022 1022
 	struct s_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf;
1023
-} PACKED;
1023
+} __attribute__ (( packed ));
1024 1024
 
1025 1025
 typedef struct s_PXENV_UNDI_OPEN PXENV_UNDI_OPEN_t;
1026 1026
 
@@ -1041,7 +1041,7 @@ extern PXENV_EXIT_t pxenv_undi_open ( struct s_PXENV_UNDI_OPEN *undi_open );
1041 1041
 /** Parameter block for pxenv_undi_close() */
1042 1042
 struct s_PXENV_UNDI_CLOSE {
1043 1043
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1044
-} PACKED;
1044
+} __attribute__ (( packed ));
1045 1045
 
1046 1046
 typedef struct s_PXENV_UNDI_CLOSE PXENV_UNDI_CLOSE_t;
1047 1047
 
@@ -1092,7 +1092,7 @@ struct s_PXENV_UNDI_TBD {
1092 1092
 		UINT16_t TDDataLen;	/**< Length of this transmit buffer */
1093 1093
 		SEGOFF16_t TDDataPtr;	/**< Address of this transmit buffer */
1094 1094
 	} DataBlock[MAX_DATA_BLKS];
1095
-} PACKED;
1095
+} __attribute__ (( packed ));
1096 1096
 
1097 1097
 typedef struct s_PXENV_UNDI_TBD PXENV_UNDI_TBD_t;
1098 1098
 
@@ -1118,7 +1118,7 @@ struct s_PXENV_UNDI_TRANSMIT {
1118 1118
 	 */
1119 1119
 	SEGOFF16_t TBD;
1120 1120
 	UINT32_t Reserved[2];		/**< Must be zero */
1121
-} PACKED;
1121
+} __attribute__ (( packed ));
1122 1122
 
1123 1123
 typedef struct s_PXENV_UNDI_TRANSMIT PXENV_UNDI_TRANSMIT_t;
1124 1124
 
@@ -1142,7 +1142,7 @@ struct s_PXENV_UNDI_SET_MCAST_ADDRESS {
1142 1142
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1143 1143
 	/** List of multicast addresses */
1144 1144
 	struct s_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf;
1145
-} PACKED;
1145
+} __attribute__ (( packed ));
1146 1146
 
1147 1147
 typedef struct s_PXENV_UNDI_SET_MCAST_ADDRESS PXENV_UNDI_SET_MCAST_ADDRESS_t;
1148 1148
 
@@ -1165,7 +1165,7 @@ extern PXENV_EXIT_t pxenv_undi_set_mcast_address (
1165 1165
 struct s_PXENV_UNDI_SET_STATION_ADDRESS {
1166 1166
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1167 1167
 	MAC_ADDR_t StationAddress;	/**< Station MAC address */
1168
-} PACKED;
1168
+} __attribute__ (( packed ));
1169 1169
 
1170 1170
 typedef struct s_PXENV_UNDI_SET_STATION_ADDRESS PXENV_UNDI_SET_STATION_ADDRESS_t;
1171 1171
 
@@ -1198,7 +1198,7 @@ struct s_PXENV_UNDI_SET_PACKET_FILTER {
1198 1198
 	 * without any kind of adult supervision" (quote from hpa).
1199 1199
 	 */
1200 1200
 	UINT8_t filter;
1201
-} PACKED;
1201
+} __attribute__ (( packed ));
1202 1202
 
1203 1203
 typedef struct s_PXENV_UNDI_SET_PACKET_FILTER PXENV_UNDI_SET_PACKET_FILTER_t;
1204 1204
 
@@ -1244,7 +1244,7 @@ struct s_PXENV_UNDI_GET_INFORMATION {
1244 1244
 	SEGSEL_t ROMAddress;		/**< Real-mode ROM segment address */
1245 1245
 	UINT16_t RxBufCt;		/**< Receive queue length */
1246 1246
 	UINT16_t TxBufCt;		/**< Transmit queue length */
1247
-} PACKED;
1247
+} __attribute__ (( packed ));
1248 1248
 
1249 1249
 typedef struct s_PXENV_UNDI_GET_INFORMATION PXENV_UNDI_GET_INFORMATION_t;
1250 1250
 
@@ -1270,7 +1270,7 @@ struct s_PXENV_UNDI_GET_STATISTICS {
1270 1270
 	UINT32_t RcvGoodFrames;		/**< Successful reception count */
1271 1271
 	UINT32_t RcvCRCErrors;		/**< Receive CRC error count */
1272 1272
 	UINT32_t RcvResourceErrors;	/**< Receive queue overflow count */
1273
-} PACKED;
1273
+} __attribute__ (( packed ));
1274 1274
 
1275 1275
 typedef struct s_PXENV_UNDI_GET_STATISTICS PXENV_UNDI_GET_STATISTICS_t;
1276 1276
 
@@ -1292,7 +1292,7 @@ extern PXENV_EXIT_t pxenv_undi_get_statistics (
1292 1292
 /** Parameter block for pxenv_undi_clear_statistics() */
1293 1293
 struct s_PXENV_UNDI_CLEAR_STATISTICS {
1294 1294
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1295
-} PACKED;
1295
+} __attribute__ (( packed ));
1296 1296
 
1297 1297
 typedef struct s_PXENV_UNDI_CLEAR_STATISTICS PXENV_UNDI_CLEAR_STATISTICS_t;
1298 1298
 
@@ -1314,7 +1314,7 @@ extern PXENV_EXIT_t pxenv_undi_clear_statistics (
1314 1314
 /** Parameter block for pxenv_undi_initiate_diags() */
1315 1315
 struct s_PXENV_UNDI_INITIATE_DIAGS {
1316 1316
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1317
-} PACKED;
1317
+} __attribute__ (( packed ));
1318 1318
 
1319 1319
 typedef struct s_PXENV_UNDI_INITIATE_DIAGS PXENV_UNDI_INITIATE_DIAGS_t;
1320 1320
 
@@ -1336,7 +1336,7 @@ extern PXENV_EXIT_t pxenv_undi_initiate_diags (
1336 1336
 /** Parameter block for pxenv_undi_force_interrupt() */
1337 1337
 struct s_PXENV_UNDI_FORCE_INTERRUPT {
1338 1338
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1339
-} PACKED;
1339
+} __attribute__ (( packed ));
1340 1340
 
1341 1341
 typedef struct s_PXENV_UNDI_FORCE_INTERRUPT PXENV_UNDI_FORCE_INTERRUPT_t;
1342 1342
 
@@ -1360,7 +1360,7 @@ struct s_PXENV_UNDI_GET_MCAST_ADDRESS {
1360 1360
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1361 1361
 	IP4_t InetAddr;			/**< Multicast IP address */
1362 1362
 	MAC_ADDR_t MediaAddr;		/**< Multicast MAC address */
1363
-} PACKED;
1363
+} __attribute__ (( packed ));
1364 1364
 
1365 1365
 typedef struct s_PXENV_UNDI_GET_MCAST_ADDRESS PXENV_UNDI_GET_MCAST_ADDRESS_t;
1366 1366
 
@@ -1394,7 +1394,7 @@ struct pci_nic_info {
1394 1394
 	UINT16_t BusDevFunc;		/**< PCI bus:dev:fn address */
1395 1395
 	UINT16_t SubVendor_ID;		/**< PCI subvendor ID */
1396 1396
 	UINT16_t SubDevice_ID;		/**< PCI subdevice ID */
1397
-} PACKED;
1397
+} __attribute__ (( packed ));
1398 1398
  
1399 1399
 /** Information for an ISAPnP or equivalent NIC */
1400 1400
 struct pnp_nic_info {
@@ -1404,7 +1404,7 @@ struct pnp_nic_info {
1404 1404
 	UINT8_t Prog_Intf;		/**< Programming interface */
1405 1405
 	/** Card Select Number assigned to card */
1406 1406
 	UINT16_t CardSelNum;
1407
-} PACKED;
1407
+} __attribute__ (( packed ));
1408 1408
 
1409 1409
 /** Parameter block for pxenv_undi_get_nic_type() */
1410 1410
 struct s_PXENV_UNDI_GET_NIC_TYPE {
@@ -1423,7 +1423,7 @@ struct s_PXENV_UNDI_GET_NIC_TYPE {
1423 1423
 		/** NIC information (if #NicType==#PnP_NIC) */
1424 1424
 		struct pnp_nic_info pnp;
1425 1425
 	} info;
1426
-} PACKED;
1426
+} __attribute__ (( packed ));
1427 1427
 
1428 1428
 typedef struct s_PXENV_UNDI_GET_NIC_TYPE PXENV_UNDI_GET_NIC_TYPE_t;
1429 1429
 
@@ -1484,7 +1484,7 @@ struct s_PXENV_UNDI_GET_IFACE_INFO {
1484 1484
 	 */
1485 1485
 	UINT32_t ServiceFlags;
1486 1486
 	UINT32_t Reserved[4];		/**< Must be zero */
1487
-} PACKED;
1487
+} __attribute__ (( packed ));
1488 1488
 
1489 1489
 typedef struct s_PXENV_UNDI_GET_IFACE_INFO PXENV_UNDI_GET_IFACE_INFO_t;
1490 1490
 
@@ -1520,7 +1520,7 @@ struct s_PXENV_UNDI_GET_STATE {
1520 1520
 	 * #PXE_UNDI_GET_STATE_OPENED.
1521 1521
 	 */
1522 1522
 	UINT8_t UNDIstate;
1523
-} PACKED;
1523
+} __attribute__ (( packed ));
1524 1524
 
1525 1525
 typedef struct s_PXENV_UNDI_GET_STATE PXENV_UNDI_GET_STATE_t;
1526 1526
 
@@ -1591,7 +1591,7 @@ struct s_PXENV_UNDI_ISR {
1591 1591
 	 * Valid values are #P_DIRECTED, #P_BROADCAST or #P_MULTICAST.
1592 1592
 	 */
1593 1593
 	UINT8_t PktType;
1594
-} PACKED;
1594
+} __attribute__ (( packed ));
1595 1595
 
1596 1596
 typedef struct s_PXENV_UNDI_ISR PXENV_UNDI_ISR_t;
1597 1597
 
@@ -1624,7 +1624,7 @@ struct s_PXENV_FILE_OPEN {
1624 1624
 	UINT16_t FileHandle;		/**< File handle */
1625 1625
 	SEGOFF16_t FileName;		/**< File URL */
1626 1626
 	UINT32_t Reserved;		/**< Reserved */
1627
-} PACKED;
1627
+} __attribute__ (( packed ));
1628 1628
 
1629 1629
 typedef struct s_PXENV_FILE_OPEN PXENV_FILE_OPEN_t;
1630 1630
 
@@ -1646,7 +1646,7 @@ extern PXENV_EXIT_t pxenv_file_open ( struct s_PXENV_FILE_OPEN *file_open );
1646 1646
 struct s_PXENV_FILE_CLOSE {
1647 1647
 	PXENV_STATUS_t Status;		/**< PXE status code */
1648 1648
 	UINT16_t FileHandle;		/**< File handle */
1649
-} PACKED;
1649
+} __attribute__ (( packed ));
1650 1650
 
1651 1651
 typedef struct s_PXENV_FILE_CLOSE PXENV_FILE_CLOSE_t;
1652 1652
 
@@ -1673,7 +1673,7 @@ struct s_PXENV_FILE_SELECT {
1673 1673
 	PXENV_STATUS_t Status;		/**< PXE status code */
1674 1674
 	UINT16_t FileHandle;		/**< File handle */
1675 1675
 	UINT16_t Ready;			/**< Indication of readiness */
1676
-} PACKED;
1676
+} __attribute__ (( packed ));
1677 1677
 
1678 1678
 typedef struct s_PXENV_FILE_SELECT PXENV_FILE_SELECT_t;
1679 1679
 
@@ -1698,7 +1698,7 @@ struct s_PXENV_FILE_READ {
1698 1698
 	UINT16_t FileHandle;		/**< File handle */
1699 1699
 	UINT16_t BufferSize;		/**< Data buffer size */
1700 1700
 	SEGOFF16_t Buffer;		/**< Data buffer */
1701
-} PACKED;
1701
+} __attribute__ (( packed ));
1702 1702
 
1703 1703
 typedef struct s_PXENV_FILE_READ PXENV_FILE_READ_t;
1704 1704
 
@@ -1721,7 +1721,7 @@ struct s_PXENV_GET_FILE_SIZE {
1721 1721
 	PXENV_STATUS_t Status;		/**< PXE status code */
1722 1722
 	UINT16_t FileHandle;		/**< File handle */
1723 1723
 	UINT32_t FileSize;		/**< File size */
1724
-} PACKED;
1724
+} __attribute__ (( packed ));
1725 1725
 
1726 1726
 typedef struct s_PXENV_GET_FILE_SIZE PXENV_GET_FILE_SIZE_t;
1727 1727
 
@@ -1744,7 +1744,7 @@ extern PXENV_EXIT_t pxenv_get_file_size ( struct s_PXENV_GET_FILE_SIZE
1744 1744
 struct s_PXENV_FILE_EXEC {
1745 1745
 	PXENV_STATUS_t Status;		/**< PXE status code */
1746 1746
 	SEGOFF16_t Command;		/**< Command to execute */
1747
-} PACKED;
1747
+} __attribute__ (( packed ));
1748 1748
 
1749 1749
 typedef struct s_PXENV_FILE_EXEC PXENV_FILE_EXEC_t;
1750 1750
 
@@ -1770,7 +1770,7 @@ struct s_PXENV_FILE_API_CHECK {
1770 1770
 	UINT32_t Provider;		/**< Implementation identifier */
1771 1771
 	UINT32_t APIMask;		/**< Supported API functions */
1772 1772
 	UINT32_t Flags;			/**< Reserved for the future */
1773
-} PACKED;
1773
+} __attribute__ (( packed ));
1774 1774
 
1775 1775
 typedef struct s_PXENV_FILE_API_CHECK PXENV_FILE_API_CHECK_t;
1776 1776
 
@@ -1792,7 +1792,7 @@ extern PXENV_EXIT_t pxenv_file_api_check ( struct s_PXENV_FILE_API_CHECK *file_a
1792 1792
 struct s_PXENV_FILE_EXIT_HOOK {
1793 1793
 	PXENV_STATUS_t Status;		/**< PXE status code */
1794 1794
 	SEGOFF16_t Hook;		/**< SEG16:OFF16 to jump to */
1795
-} PACKED;
1795
+} __attribute__ (( packed ));
1796 1796
 
1797 1797
 typedef struct s_PXENV_FILE_EXIT_HOOK PXENV_FILE_EXIT_HOOK_t;
1798 1798
 
@@ -1843,7 +1843,7 @@ struct s_UNDI_LOADER {
1843 1843
 	SEGOFF16_t PXEptr;
1844 1844
 	/** Address of the PXENV+ structure (a struct s_PXENV) */
1845 1845
 	SEGOFF16_t PXENVptr;
1846
-} PACKED;
1846
+} __attribute__ (( packed ));
1847 1847
 
1848 1848
 typedef struct s_UNDI_LOADER UNDI_LOADER_t;
1849 1849
 

+ 2
- 2
src/arch/i386/include/pxe_types.h 파일 보기

@@ -111,14 +111,14 @@ typedef UINT16_t OFF16_t;
111 111
 typedef struct s_SEGOFF16 {
112 112
 	OFF16_t		offset;		/**< Offset within the segment */
113 113
 	SEGSEL_t	segment;	/**< Segment selector */
114
-} PACKED SEGOFF16_t;
114
+} __attribute__ (( packed )) SEGOFF16_t;
115 115
 
116 116
 /** A segment descriptor */
117 117
 typedef struct s_SEGDESC {
118 118
 	SEGSEL_t	segment_address;	/**< Segment selector */
119 119
 	ADDR32_t	Physical_address;	/**< Segment base address */
120 120
 	OFF16_t		Seg_size;		/**< Size of the segment */
121
-} PACKED SEGDESC_t;
121
+} __attribute__ (( packed )) SEGDESC_t;
122 122
 
123 123
 /** @} */ /* pxe_types */
124 124
 

+ 12
- 12
src/arch/i386/include/registers.h 파일 보기

@@ -28,9 +28,9 @@ typedef union {
28 28
 			uint8_t byte;
29 29
 		};
30 30
 		uint8_t h;
31
-	} PACKED;
31
+	} __attribute__ (( packed ));
32 32
 	uint16_t word;
33
-} PACKED reg16_t;
33
+} __attribute__ (( packed )) reg16_t;
34 34
 
35 35
 /**
36 36
  * A 32-bit general register.
@@ -46,10 +46,10 @@ typedef union {
46 46
 			uint8_t byte;
47 47
 		};
48 48
 		uint8_t h;
49
-	} PACKED;
49
+	} __attribute__ (( packed ));
50 50
 	uint16_t word;
51 51
 	uint32_t dword;
52
-} PACKED reg32_t;
52
+} __attribute__ (( packed )) reg32_t;
53 53
 
54 54
 /**
55 55
  * A 32-bit general register dump.
@@ -80,7 +80,7 @@ struct i386_regs {
80 80
 		struct {
81 81
 			uint8_t bl;
82 82
 			uint8_t bh;
83
-		} PACKED;
83
+		} __attribute__ (( packed ));
84 84
 		uint16_t bx;
85 85
 		uint32_t ebx;
86 86
 	};
@@ -88,7 +88,7 @@ struct i386_regs {
88 88
 		struct {
89 89
 			uint8_t dl;
90 90
 			uint8_t dh;
91
-		} PACKED;
91
+		} __attribute__ (( packed ));
92 92
 		uint16_t dx;
93 93
 		uint32_t edx;
94 94
 	};
@@ -96,7 +96,7 @@ struct i386_regs {
96 96
 		struct {
97 97
 			uint8_t cl;
98 98
 			uint8_t ch;
99
-		} PACKED;
99
+		} __attribute__ (( packed ));
100 100
 		uint16_t cx;
101 101
 		uint32_t ecx;
102 102
 	};
@@ -104,11 +104,11 @@ struct i386_regs {
104 104
 		struct {
105 105
 			uint8_t al;
106 106
 			uint8_t ah;
107
-		} PACKED;
107
+		} __attribute__ (( packed ));
108 108
 		uint16_t ax;
109 109
 		uint32_t eax;
110 110
 	};
111
-} PACKED;
111
+} __attribute__ (( packed ));
112 112
 
113 113
 /**
114 114
  * A segment register dump.
@@ -142,7 +142,7 @@ struct i386_seg_regs {
142 142
 	uint16_t es;
143 143
 	uint16_t fs;
144 144
 	uint16_t gs;
145
-} PACKED;
145
+} __attribute__ (( packed ));
146 146
 
147 147
 /**
148 148
  * A full register dump.
@@ -175,7 +175,7 @@ struct i386_all_regs {
175 175
 	struct i386_seg_regs segs;
176 176
 	struct i386_regs regs;
177 177
 	uint32_t flags;
178
-} PACKED;
178
+} __attribute__ (( packed ));
179 179
 
180 180
 /* Flags */
181 181
 #define CF ( 1 <<  0 )
@@ -191,7 +191,7 @@ struct i386_all_regs {
191 191
 struct segoff {
192 192
 	uint16_t offset;
193 193
 	uint16_t segment;
194
-} PACKED;
194
+} __attribute__ (( packed ));
195 195
 
196 196
 typedef struct segoff segoff_t;
197 197
 

+ 0
- 1
src/doxygen.cfg 파일 보기

@@ -1224,7 +1224,6 @@ PREDEFINED             = DOXYGEN=1
1224 1224
 # Use the PREDEFINED tag if you want to use a different macro definition.
1225 1225
 
1226 1226
 EXPAND_AS_DEFINED      = __attribute__ \
1227
-                         PACKED \
1228 1227
                          __unused \
1229 1228
                          __used \
1230 1229
                          __aligned \

+ 0
- 3
src/include/compiler.h 파일 보기

@@ -429,9 +429,6 @@ int __debug_disable;
429 429
  */
430 430
 #ifndef ASSEMBLY
431 431
 
432
-/** Declare a data structure as packed. */
433
-#define PACKED __attribute__ (( packed ))
434
-
435 432
 /** Declare a variable or data structure as unused. */
436 433
 #define __unused __attribute__ (( unused ))
437 434
 

Loading…
취소
저장