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/soc/intel/broadwell | |
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/soc/intel/broadwell')
-rw-r--r-- | src/soc/intel/broadwell/include/soc/device_nvs.h | 3 | ||||
-rw-r--r-- | src/soc/intel/broadwell/include/soc/gpio.h | 3 | ||||
-rw-r--r-- | src/soc/intel/broadwell/include/soc/me.h | 51 | ||||
-rw-r--r-- | src/soc/intel/broadwell/include/soc/nvs.h | 3 | ||||
-rw-r--r-- | src/soc/intel/broadwell/include/soc/pei_data.h | 7 | ||||
-rw-r--r-- | src/soc/intel/broadwell/include/soc/smm.h | 3 | ||||
-rw-r--r-- | src/soc/intel/broadwell/spi.c | 3 |
7 files changed, 40 insertions, 33 deletions
diff --git a/src/soc/intel/broadwell/include/soc/device_nvs.h b/src/soc/intel/broadwell/include/soc/device_nvs.h index a436a4c661..15240d13b4 100644 --- a/src/soc/intel/broadwell/include/soc/device_nvs.h +++ b/src/soc/intel/broadwell/include/soc/device_nvs.h @@ -17,6 +17,7 @@ #define _BROADWELL_DEVICE_NVS_H_ #include <stdint.h> +#include <compiler.h> /* Offset in Global NVS where this structure lives */ #define DEVICE_NVS_OFFSET 0x1000 @@ -35,6 +36,6 @@ typedef struct { u8 enable[9]; u32 bar0[9]; u32 bar1[9]; -} __attribute__((packed)) device_nvs_t; +} __packed device_nvs_t; #endif diff --git a/src/soc/intel/broadwell/include/soc/gpio.h b/src/soc/intel/broadwell/include/soc/gpio.h index 7aba8dcf60..c8f0300f15 100644 --- a/src/soc/intel/broadwell/include/soc/gpio.h +++ b/src/soc/intel/broadwell/include/soc/gpio.h @@ -17,6 +17,7 @@ #define _BROADWELL_GPIO_H_ #include <stdint.h> +#include <compiler.h> #define CROS_GPIO_DEVICE_NAME "PCH-LP" #define CROS_GPIO_ACPI_DEVICE_NAME "INT3437:00" @@ -167,7 +168,7 @@ struct gpio_config { u8 reset; u8 blink; u8 pirq; -} __attribute__ ((packed)); +} __packed; /* Configure GPIOs with mainboard provided settings */ void init_one_gpio(int gpio_num, struct gpio_config *config); diff --git a/src/soc/intel/broadwell/include/soc/me.h b/src/soc/intel/broadwell/include/soc/me.h index 0d0ad7b3d4..34b44816e8 100644 --- a/src/soc/intel/broadwell/include/soc/me.h +++ b/src/soc/intel/broadwell/include/soc/me.h @@ -16,6 +16,7 @@ #ifndef _BROADWELL_ME_H_ #define _BROADWELL_ME_H_ +#include <compiler.h> #include <commonlib/loglevel.h> #define ME_RETRY 100000 /* 1 second */ @@ -75,7 +76,7 @@ struct me_hfs { u32 boot_options_present: 1; u32 ack_data: 3; u32 bios_msg_ack: 4; -} __attribute__ ((packed)); +} __packed; #define PCI_ME_UMA 0x44 @@ -85,7 +86,7 @@ struct me_uma { u32 valid: 1; u32 reserved_0: 14; u32 set_to_one: 1; -} __attribute__ ((packed)); +} __packed; #define PCI_ME_H_GS 0x4c #define ME_INIT_DONE 1 @@ -104,7 +105,7 @@ struct me_did { u32 rapid_start: 1; u32 status: 4; u32 init_done: 4; -} __attribute__ ((packed)); +} __packed; /* * Apparently the GMES register is renamed to HFS2 (or HFSTS2 according @@ -195,7 +196,7 @@ struct me_hfs2 { u32 current_state: 8; u32 current_pmevent: 4; u32 progress_code: 4; -} __attribute__ ((packed)); +} __packed; #define PCI_ME_HFS5 0x68 @@ -212,7 +213,7 @@ struct me_heres { u32 reserved: 26; u32 extend_feature_present: 1; u32 extend_reg_valid: 1; -} __attribute__ ((packed)); +} __packed; /* * Management Engine MEI registers @@ -233,7 +234,7 @@ struct mei_csr { u32 buffer_read_ptr: 8; u32 buffer_write_ptr: 8; u32 buffer_depth: 8; -} __attribute__ ((packed)); +} __packed; #define MEI_ADDRESS_CORE 0x01 #define MEI_ADDRESS_AMT 0x02 @@ -251,7 +252,7 @@ struct mei_header { u32 length: 9; u32 reserved: 6; u32 is_complete: 1; -} __attribute__ ((packed)); +} __packed; #define MKHI_GROUP_ID_CBM 0x00 #define MKHI_GLOBAL_RESET 0x0b @@ -274,7 +275,7 @@ struct mkhi_header { u32 is_response: 1; u32 reserved: 8; u32 result: 8; -} __attribute__ ((packed)); +} __packed; struct me_fw_version { u16 code_minor; @@ -285,7 +286,7 @@ struct me_fw_version { u16 recovery_major; u16 recovery_build_number; u16 recovery_hot_fix; -} __attribute__ ((packed)); +} __packed; /* ICC Messages */ #define ICC_SET_CLOCK_ENABLES 0x3 @@ -297,14 +298,14 @@ struct icc_header { u32 icc_status; u32 length; u32 reserved; -} __attribute__ ((packed)); +} __packed; struct icc_clock_enables_msg { u32 clock_enables; u32 clock_mask; u32 no_response: 1; u32 reserved: 31; -} __attribute__ ((packed)); +} __packed; #define HECI_EOP_STATUS_SUCCESS 0x0 #define HECI_EOP_PERFORM_GLOBAL_RESET 0x1 @@ -318,7 +319,7 @@ struct icc_clock_enables_msg { struct me_global_reset { u8 request_origin; u8 reset_type; -} __attribute__ ((packed)); +} __packed; typedef enum { ME_NORMAL_BIOS_PATH, @@ -364,21 +365,21 @@ typedef struct { u32 mbp_size : 8; u32 num_entries : 8; u32 rsvd : 16; -} __attribute__ ((packed)) mbp_header; +} __packed mbp_header; typedef struct { u32 app_id : 8; u32 item_id : 8; u32 length : 8; u32 rsvd : 8; -} __attribute__ ((packed)) mbp_item_header; +} __packed mbp_item_header; typedef struct { u32 major_version : 16; u32 minor_version : 16; u32 hotfix_version : 16; u32 build_version : 16; -} __attribute__ ((packed)) mbp_fw_version_name; +} __packed mbp_fw_version_name; typedef struct { u32 full_net : 1; @@ -400,13 +401,13 @@ typedef struct { u32 reserved_4 : 1; u32 wlan : 1; u32 reserved_5 : 8; -} __attribute__ ((packed)) mbp_mefwcaps; +} __packed mbp_mefwcaps; typedef struct { u16 device_id; u16 fuse_test_flags; u32 umchid[4]; -} __attribute__ ((packed)) mbp_rom_bist_data; +} __packed mbp_rom_bist_data; typedef struct { u32 key[8]; @@ -424,7 +425,7 @@ typedef struct { u32 image_type: 4; u32 brand: 4; u32 rsvd1: 16; -} __attribute__ ((packed)) mbp_me_firmware_type; +} __packed mbp_me_firmware_type; typedef struct { mbp_me_firmware_type rule_data; @@ -434,7 +435,7 @@ typedef struct { typedef struct { u16 icc_start_address; u16 mask; -} __attribute__ ((packed)) icc_address_mask; +} __packed icc_address_mask; typedef struct { u8 num_icc_profiles; @@ -443,7 +444,7 @@ typedef struct { u8 reserved; u32 icc_reg_bundles; icc_address_mask icc_address_mask[0]; -} __attribute__ ((packed)) mbp_icc_profile; +} __packed mbp_icc_profile; typedef struct { u16 lock_state : 1; @@ -452,24 +453,24 @@ typedef struct { u16 flash_wear_out : 1; u16 flash_variable_security : 1; u16 reserved : 11; -} __attribute__ ((packed)) tdt_state_flag; +} __packed tdt_state_flag; typedef struct { u8 state; u8 last_theft_trigger; tdt_state_flag flags; -} __attribute__ ((packed)) mbp_at_state; +} __packed mbp_at_state; typedef struct { u32 wake_event_mrst_time_ms; u32 mrst_pltrst_time_ms; u32 pltrst_cpurst_time_ms; -} __attribute__ ((packed)) mbp_plat_time; +} __packed mbp_plat_time; typedef struct { u32 device_type : 2; u32 reserved : 30; -} __attribute__ ((packed)) mbp_nfc_data; +} __packed mbp_nfc_data; typedef struct { mbp_fw_version_name *fw_version_name; @@ -489,7 +490,7 @@ struct me_fwcaps { u8 length; mbp_mefwcaps caps_sku; u8 reserved[3]; -} __attribute__ ((packed)); +} __packed; void intel_me_hsio_version(uint16_t *version, uint16_t *checksum); diff --git a/src/soc/intel/broadwell/include/soc/nvs.h b/src/soc/intel/broadwell/include/soc/nvs.h index 55d6c8b4ea..a7d6d7c9fc 100644 --- a/src/soc/intel/broadwell/include/soc/nvs.h +++ b/src/soc/intel/broadwell/include/soc/nvs.h @@ -17,6 +17,7 @@ #ifndef _BROADWELL_NVS_H_ #define _BROADWELL_NVS_H_ +#include <compiler.h> #include <vendorcode/google/chromeos/gnvs.h> #include <soc/device_nvs.h> @@ -56,7 +57,7 @@ typedef struct { /* Device specific (0x1000) */ device_nvs_t dev; -} __attribute__((packed)) global_nvs_t; +} __packed global_nvs_t; void acpi_create_gnvs(global_nvs_t *gnvs); #ifdef __SMM__ diff --git a/src/soc/intel/broadwell/include/soc/pei_data.h b/src/soc/intel/broadwell/include/soc/pei_data.h index 318cb882d8..339dadd4d6 100644 --- a/src/soc/intel/broadwell/include/soc/pei_data.h +++ b/src/soc/intel/broadwell/include/soc/pei_data.h @@ -30,6 +30,7 @@ #define PEI_DATA_H #include <types.h> +#include <compiler.h> #include <memory_info.h> #define PEI_VERSION 22 @@ -74,7 +75,7 @@ struct usb2_port_setting { uint8_t enable; uint8_t oc_pin; uint8_t location; -} __attribute__((packed)); +} __packed; struct usb3_port_setting { uint8_t enable; @@ -84,7 +85,7 @@ struct usb3_port_setting { * Set to 1 if trace length is <= 5 inches */ uint8_t fixed_eq; -} __attribute__((packed)); +} __packed; struct pei_data { uint32_t pei_version; @@ -191,7 +192,7 @@ struct pei_data { void *data_to_save; int data_to_save_size; struct memory_info meminfo; -} __attribute__((packed)); +} __packed; typedef struct pei_data PEI_DATA; diff --git a/src/soc/intel/broadwell/include/soc/smm.h b/src/soc/intel/broadwell/include/soc/smm.h index be7e24c087..9a749c9051 100644 --- a/src/soc/intel/broadwell/include/soc/smm.h +++ b/src/soc/intel/broadwell/include/soc/smm.h @@ -17,13 +17,14 @@ #define _BROADWELL_SMM_H_ #include <stdint.h> +#include <compiler.h> #include <cpu/x86/msr.h> struct ied_header { char signature[10]; u32 size; u8 reserved[34]; -} __attribute__ ((packed)); +} __packed; struct smm_relocation_params { u32 smram_base; diff --git a/src/soc/intel/broadwell/spi.c b/src/soc/intel/broadwell/spi.c index a573e32981..eea3ade7f5 100644 --- a/src/soc/intel/broadwell/spi.c +++ b/src/soc/intel/broadwell/spi.c @@ -13,6 +13,7 @@ /* This file is derived from the flashrom project. */ #include <stdint.h> +#include <compiler.h> #include <stdlib.h> #include <string.h> #include <bootstate.h> @@ -92,7 +93,7 @@ typedef struct ich9_spi_regs { uint32_t srdl; uint32_t srdc; uint32_t srd; -} __attribute__((packed)) ich9_spi_regs; +} __packed ich9_spi_regs; typedef struct ich_spi_controller { int locked; |