Browse Source

[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 years ago
parent
commit
307b39c08c

+ 4
- 4
src/arch/i386/include/pxe.h View File

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

+ 52
- 52
src/arch/i386/include/pxe_api.h View File

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

+ 2
- 2
src/arch/i386/include/pxe_types.h View File

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

+ 12
- 12
src/arch/i386/include/registers.h View File

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

+ 0
- 1
src/doxygen.cfg View File

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

+ 0
- 3
src/include/compiler.h View File

429
  */
429
  */
430
 #ifndef ASSEMBLY
430
 #ifndef ASSEMBLY
431
 
431
 
432
-/** Declare a data structure as packed. */
433
-#define PACKED __attribute__ (( packed ))
434
-
435
 /** Declare a variable or data structure as unused. */
432
 /** Declare a variable or data structure as unused. */
436
 #define __unused __attribute__ (( unused ))
433
 #define __unused __attribute__ (( unused ))
437
 
434
 

Loading…
Cancel
Save