diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-07-13 02:20:27 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-07-13 19:45:59 +0000 |
commit | 6a00113de8b9060a7227bcfa79b3786e3e592a33 (patch) | |
tree | 467f5653272ed2d16f6d8033ed8cd0e7391fb426 /src/northbridge/intel | |
parent | 9f244a5494192707bfbb72e60f17411e9a35434a (diff) | |
download | coreboot-6a00113de8b9060a7227bcfa79b3786e3e592a33.tar.xz |
Rename __attribute__((packed)) --> __packed
Also unify __attribute__ ((..)) to __attribute__((..)) and
handle ((__packed__)) like ((packed))
Change-Id: Ie60a51c3fa92b5009724a5b7c2932e361bf3490c
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/15921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r-- | src/northbridge/intel/common/mrc_cache.h | 4 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/haswell.h | 3 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/pei_data.h | 8 | ||||
-rw-r--r-- | src/northbridge/intel/i82830/smihandler.c | 11 | ||||
-rw-r--r-- | src/northbridge/intel/i945/raminit.h | 4 | ||||
-rw-r--r-- | src/northbridge/intel/nehalem/raminit.c | 5 | ||||
-rw-r--r-- | src/northbridge/intel/sandybridge/pei_data.h | 4 | ||||
-rw-r--r-- | src/northbridge/intel/sandybridge/raminit.h | 3 | ||||
-rw-r--r-- | src/northbridge/intel/sandybridge/raminit_mrc.c | 3 |
9 files changed, 29 insertions, 16 deletions
diff --git a/src/northbridge/intel/common/mrc_cache.h b/src/northbridge/intel/common/mrc_cache.h index 1fb6667669..6f0dd6ef74 100644 --- a/src/northbridge/intel/common/mrc_cache.h +++ b/src/northbridge/intel/common/mrc_cache.h @@ -1,6 +1,8 @@ #ifndef NORTHBRIDGE_INTEL_COMMON_MRC_CACHE_H #define NORTHBRIDGE_INTEL_COMMON_MRC_CACHE_H +#include <compiler.h> + #define MRC_DATA_ALIGN 0x1000 #define MRC_DATA_SIGNATURE (('M'<<0)|('R'<<8)|('C'<<16)|('D'<<24)) @@ -10,7 +12,7 @@ struct mrc_data_container { u32 mrc_checksum; // IP style checksum u32 reserved; // For header alignment u8 mrc_data[0]; // Variable size, platform/run time dependent. -} __attribute__ ((packed)); +} __packed; struct mrc_data_container *find_current_mrc_cache(void); struct mrc_data_container *store_current_mrc_cache(void *data, unsigned length); diff --git a/src/northbridge/intel/haswell/haswell.h b/src/northbridge/intel/haswell/haswell.h index 00616afb49..2d03a68da1 100644 --- a/src/northbridge/intel/haswell/haswell.h +++ b/src/northbridge/intel/haswell/haswell.h @@ -186,13 +186,14 @@ #define DMIDRCCFG 0xeb4 /* 32bit */ #ifndef __ASSEMBLER__ +#include <compiler.h> static inline void barrier(void) { asm("" ::: "memory"); } struct ied_header { char signature[10]; u32 size; u8 reserved[34]; -} __attribute__ ((packed)); +} __packed; #define PCI_DEVICE_ID_HSW_MOBILE 0x0c04 #define PCI_DEVICE_ID_HSW_ULT 0x0a04 diff --git a/src/northbridge/intel/haswell/pei_data.h b/src/northbridge/intel/haswell/pei_data.h index f92c0a68e0..f4023e0a6b 100644 --- a/src/northbridge/intel/haswell/pei_data.h +++ b/src/northbridge/intel/haswell/pei_data.h @@ -30,6 +30,8 @@ #ifndef PEI_DATA_H #define PEI_DATA_H +#include <compiler.h> + typedef void (*tx_byte_func)(unsigned char byte); #define PEI_VERSION 15 @@ -56,12 +58,12 @@ struct usb2_port_setting { uint8_t enable; uint8_t over_current_pin; uint8_t location; -} __attribute__((packed)); +} __packed; struct usb3_port_setting { uint8_t enable; uint8_t over_current_pin; -} __attribute__((packed)); +} __packed; struct pei_data { @@ -110,6 +112,6 @@ struct pei_data struct usb3_port_setting usb3_ports[MAX_USB3_PORTS]; uint8_t spd_data[4][256]; tx_byte_func tx_byte; -} __attribute__((packed)); +} __packed; #endif diff --git a/src/northbridge/intel/i82830/smihandler.c b/src/northbridge/intel/i82830/smihandler.c index 51841e5969..569e62ec7b 100644 --- a/src/northbridge/intel/i82830/smihandler.c +++ b/src/northbridge/intel/i82830/smihandler.c @@ -15,6 +15,7 @@ */ #include <types.h> +#include <compiler.h> #include <string.h> #include <arch/io.h> #include <console/console.h> @@ -51,7 +52,7 @@ typedef struct { u32 function; u32 retsts; u32 rfu; -} __attribute__((packed)) banner_id_t; +} __packed banner_id_t; #define MSH_OK 0x0000 #define MSH_OK_RESTART 0x0001 @@ -111,7 +112,7 @@ typedef struct { u16 versionmajor; u16 versionminor; u32 smicombuffersize; -} __attribute__((packed)) version_t; +} __packed version_t; typedef struct { u16 header_id; @@ -122,14 +123,14 @@ typedef struct { u32 type; u32 header_ext; u8 name[0]; -} __attribute__((packed)) mbi_header_t; +} __packed mbi_header_t; typedef struct { banner_id_t banner; u64 handle; u32 objnum; mbi_header_t header; -} __attribute__((packed)) obj_header_t; +} __packed obj_header_t; typedef struct { banner_id_t banner; @@ -139,7 +140,7 @@ typedef struct { u32 numbytes; u32 buflen; u32 buffer; -} __attribute__((packed)) get_object_t; +} __packed get_object_t; static void mbi_call(u8 subf, banner_id_t *banner_id) { diff --git a/src/northbridge/intel/i945/raminit.h b/src/northbridge/intel/i945/raminit.h index bc4491fe2f..4c97d05b7d 100644 --- a/src/northbridge/intel/i945/raminit.h +++ b/src/northbridge/intel/i945/raminit.h @@ -16,6 +16,8 @@ #ifndef RAMINIT_H #define RAMINIT_H +#include <compiler.h> + #define DIMM_SOCKETS 2 #define DIMM_TCO_BASE 0x30 @@ -61,7 +63,7 @@ struct sys_info { u8 banksize[2 * 2 * DIMM_SOCKETS]; const u8 *spd_addresses; -} __attribute__ ((packed)); +} __packed; void receive_enable_adjust(struct sys_info *sysinfo); void sdram_initialize(int boot_path, const u8 *sdram_addresses); diff --git a/src/northbridge/intel/nehalem/raminit.c b/src/northbridge/intel/nehalem/raminit.c index 122b8ac7cf..b7b445ec86 100644 --- a/src/northbridge/intel/nehalem/raminit.c +++ b/src/northbridge/intel/nehalem/raminit.c @@ -22,6 +22,7 @@ #if REAL #include <stdlib.h> +#include <compiler.h> #include <console/console.h> #include <string.h> #include <arch/io.h> @@ -1906,7 +1907,7 @@ static void send_heci_uma_message(struct raminfo *info) u8 result; u8 field2; u8 unk3[0x48 - 4 - 1]; - } __attribute__ ((packed)) reply; + } __packed reply; struct uma_message { u8 group_id; u8 cmd; @@ -1916,7 +1917,7 @@ static void send_heci_uma_message(struct raminfo *info) u64 heci_uma_addr; u32 memory_reserved_for_heci_mb; u16 c3; - } __attribute__ ((packed)) msg = { + } __packed msg = { 0, MKHI_SET_UMA, 0, 0, 0x82, info->heci_uma_addr, info->memory_reserved_for_heci_mb, 0}; diff --git a/src/northbridge/intel/sandybridge/pei_data.h b/src/northbridge/intel/sandybridge/pei_data.h index 136d31046e..41fc33fd9a 100644 --- a/src/northbridge/intel/sandybridge/pei_data.h +++ b/src/northbridge/intel/sandybridge/pei_data.h @@ -30,6 +30,8 @@ #ifndef PEI_DATA_H #define PEI_DATA_H +#include <compiler.h> + typedef struct { uint16_t mode; // 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto uint16_t hs_port_switch_mask; // 4 bit mask, 1: switchable, 0: not switchable @@ -129,6 +131,6 @@ struct pei_data * 2 Always enable double rate */ int ddr_refresh_rate_config; -} __attribute__((packed)); +} __packed; #endif diff --git a/src/northbridge/intel/sandybridge/raminit.h b/src/northbridge/intel/sandybridge/raminit.h index 4e684ec409..66a94f48d8 100644 --- a/src/northbridge/intel/sandybridge/raminit.h +++ b/src/northbridge/intel/sandybridge/raminit.h @@ -16,6 +16,7 @@ #ifndef RAMINIT_H #define RAMINIT_H +#include <compiler.h> #include "pei_data.h" struct sys_info { @@ -23,7 +24,7 @@ struct sys_info { #define BOOT_PATH_NORMAL 0 #define BOOT_PATH_RESET 1 #define BOOT_PATH_RESUME 2 -} __attribute__ ((packed)); +} __packed; void sdram_initialize(struct pei_data *pei_data); void save_mrc_data(struct pei_data *pei_data); diff --git a/src/northbridge/intel/sandybridge/raminit_mrc.c b/src/northbridge/intel/sandybridge/raminit_mrc.c index 3f7d1c64ba..7145841ac2 100644 --- a/src/northbridge/intel/sandybridge/raminit_mrc.c +++ b/src/northbridge/intel/sandybridge/raminit_mrc.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include <compiler.h> #include <console/console.h> #include <console/usb.h> #include <bootmode.h> @@ -183,7 +184,7 @@ static void report_memory_config(void) void sdram_initialize(struct pei_data *pei_data) { struct sys_info sysinfo; - int (*entry) (struct pei_data *pei_data) __attribute__ ((regparm(1))); + int (*entry) (struct pei_data *pei_data) __attribute__((regparm(1))); report_platform_info(); |