summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 02:20:27 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 19:45:59 +0000
commit6a00113de8b9060a7227bcfa79b3786e3e592a33 (patch)
tree467f5653272ed2d16f6d8033ed8cd0e7391fb426 /src/arch/x86
parent9f244a5494192707bfbb72e60f17411e9a35434a (diff)
downloadcoreboot-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/arch/x86')
-rw-r--r--src/arch/x86/acpi.c4
-rw-r--r--src/arch/x86/gdt.c3
-rw-r--r--src/arch/x86/include/arch/acpi.h73
-rw-r--r--src/arch/x86/include/arch/io.h12
-rw-r--r--src/arch/x86/include/arch/pci_mmio_cfg.h12
-rw-r--r--src/arch/x86/include/arch/pirq_routing.h7
-rw-r--r--src/arch/x86/include/arch/registers.h14
-rw-r--r--src/arch/x86/include/arch/smp/mpspec.h23
8 files changed, 76 insertions, 72 deletions
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index f8c5b52a3d..02884c494c 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -855,7 +855,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
}
#endif
-unsigned long __attribute__ ((weak)) fw_cfg_acpi_tables(unsigned long start)
+unsigned long __attribute__((weak)) fw_cfg_acpi_tables(unsigned long start)
{
return 0;
}
@@ -1122,7 +1122,7 @@ void acpi_save_gnvs(u32 gnvs_address)
*gnvs = gnvs_address;
}
-__attribute__ ((weak)) int acpi_get_gpe(int gpe)
+__attribute__((weak)) int acpi_get_gpe(int gpe)
{
return -1; /* implemented by SOC */
}
diff --git a/src/arch/x86/gdt.c b/src/arch/x86/gdt.c
index c81bd61cd5..baf125cf1e 100644
--- a/src/arch/x86/gdt.c
+++ b/src/arch/x86/gdt.c
@@ -15,6 +15,7 @@
#include <types.h>
#include <string.h>
+#include <compiler.h>
#include <cbmem.h>
#include <console/console.h>
#include <cpu/x86/gdt.h>
@@ -27,7 +28,7 @@ struct gdtarg {
#else
u32 base;
#endif
-} __attribute__((packed));
+} __packed;
/* Copy GDT to new location and reload it.
* FIXME: We only do this for BSP CPU.
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 95cd3ac8e2..13e1e9347a 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -45,6 +45,7 @@
#if !defined(__ASSEMBLER__) && !defined(__ACPI__) && !defined(__ROMCC__)
#include <stdint.h>
+#include <compiler.h>
#include <rules.h>
#include <commonlib/helpers.h>
#include <device/device.h>
@@ -77,7 +78,7 @@ typedef struct acpi_rsdp {
u64 xsdt_address; /* Physical address of XSDT (64 bits) */
u8 ext_checksum; /* Checksum of the whole table */
u8 reserved[3];
-} __attribute__ ((packed)) acpi_rsdp_t;
+} __packed acpi_rsdp_t;
/* Note: ACPI 1.0 didn't have length, xsdt_address, and ext_checksum. */
/* GAS (Generic Address Structure) */
@@ -92,7 +93,7 @@ typedef struct acpi_gen_regaddr {
};
u32 addrl; /* Register address, low 32 bits */
u32 addrh; /* Register address, high 32 bits */
-} __attribute__ ((packed)) acpi_addr_t;
+} __packed acpi_addr_t;
#define ACPI_ADDRESS_SPACE_MEMORY 0 /* System memory */
#define ACPI_ADDRESS_SPACE_IO 1 /* System I/O */
@@ -128,7 +129,7 @@ typedef struct acpi_table_header {
u32 oem_revision; /* OEM revision number */
char asl_compiler_id[4]; /* ASL compiler vendor ID */
u32 asl_compiler_revision; /* ASL compiler revision number */
-} __attribute__ ((packed)) acpi_header_t;
+} __packed acpi_header_t;
/* A maximum number of 32 ACPI tables ought to be enough for now. */
#define MAX_ACPI_TABLES 32
@@ -137,13 +138,13 @@ typedef struct acpi_table_header {
typedef struct acpi_rsdt {
struct acpi_table_header header;
u32 entry[MAX_ACPI_TABLES];
-} __attribute__ ((packed)) acpi_rsdt_t;
+} __packed acpi_rsdt_t;
/* XSDT (Extended System Description Table) */
typedef struct acpi_xsdt {
struct acpi_table_header header;
u64 entry[MAX_ACPI_TABLES];
-} __attribute__ ((packed)) acpi_xsdt_t;
+} __packed acpi_xsdt_t;
/* HPET timers */
typedef struct acpi_hpet {
@@ -153,20 +154,20 @@ typedef struct acpi_hpet {
u8 number;
u16 min_tick;
u8 attributes;
-} __attribute__ ((packed)) acpi_hpet_t;
+} __packed acpi_hpet_t;
/* MCFG (PCI Express MMIO config space BAR description table) */
typedef struct acpi_mcfg {
struct acpi_table_header header;
u8 reserved[8];
-} __attribute__ ((packed)) acpi_mcfg_t;
+} __packed acpi_mcfg_t;
typedef struct acpi_tcpa {
struct acpi_table_header header;
u16 platform_class;
u32 laml;
u64 lasa;
-} __attribute__ ((packed)) acpi_tcpa_t;
+} __packed acpi_tcpa_t;
typedef struct acpi_mcfg_mmconfig {
u32 base_address;
@@ -175,7 +176,7 @@ typedef struct acpi_mcfg_mmconfig {
u8 start_bus_number;
u8 end_bus_number;
u8 reserved[4];
-} __attribute__ ((packed)) acpi_mcfg_mmconfig_t;
+} __packed acpi_mcfg_mmconfig_t;
/* SRAT (System Resource Affinity Table) */
typedef struct acpi_srat {
@@ -183,7 +184,7 @@ typedef struct acpi_srat {
u32 resv;
u64 resv1;
/* Followed by static resource allocation structure[n] */
-} __attribute__ ((packed)) acpi_srat_t;
+} __packed acpi_srat_t;
/* SRAT: Processor Local APIC/SAPIC Affinity Structure */
typedef struct acpi_srat_lapic {
@@ -195,7 +196,7 @@ typedef struct acpi_srat_lapic {
u8 local_sapic_eid; /* Local SAPIC EID */
u8 proximity_domain_31_8[3]; /* Proximity domain bits[31:8] */
u32 resv; /* TODO: Clock domain in ACPI 4.0. */
-} __attribute__ ((packed)) acpi_srat_lapic_t;
+} __packed acpi_srat_lapic_t;
/* SRAT: Memory Affinity Structure */
typedef struct acpi_srat_mem {
@@ -212,20 +213,20 @@ typedef struct acpi_srat_mem {
* other bits reserved to 0
*/
u32 resv2[2];
-} __attribute__ ((packed)) acpi_srat_mem_t;
+} __packed acpi_srat_mem_t;
/* SLIT (System Locality Distance Information Table) */
typedef struct acpi_slit {
struct acpi_table_header header;
/* Followed by static resource allocation 8+byte[num*num] */
-} __attribute__ ((packed)) acpi_slit_t;
+} __packed acpi_slit_t;
/* MADT (Multiple APIC Description Table) */
typedef struct acpi_madt {
struct acpi_table_header header;
u32 lapic_addr; /* Local APIC address */
u32 flags; /* Multiple APIC flags */
-} __attribute__ ((packed)) acpi_madt_t;
+} __packed acpi_madt_t;
/* VFCT image header */
struct acpi_vfct_image_hdr {
@@ -239,7 +240,7 @@ struct acpi_vfct_image_hdr {
u32 Revision;
u32 ImageLength;
u8 VbiosContent; // dummy - copy VBIOS here
-} __attribute__ ((packed));
+} __packed;
/* VFCT (VBIOS Fetch Table) */
struct acpi_vfct {
@@ -249,10 +250,10 @@ struct acpi_vfct {
u32 Lib1ImageOffset;
u32 Reserved[4];
struct acpi_vfct_image_hdr image_hdr;
-} __attribute__ ((packed));
+} __packed;
typedef struct acpi_ivrs_info {
-} __attribute__ ((packed)) acpi_ivrs_info_t;
+} __packed acpi_ivrs_info_t;
/* IVRS IVHD (I/O Virtualization Hardware Definition Block) Type 10h */
typedef struct acpi_ivrs_ivhd {
@@ -267,7 +268,7 @@ typedef struct acpi_ivrs_ivhd {
uint16_t iommu_info;
uint32_t iommu_feature_info;
uint8_t entry[0];
-} __attribute__ ((packed)) acpi_ivrs_ivhd_t;
+} __packed acpi_ivrs_ivhd_t;
/* IVRS (I/O Virtualization Reporting Structure) Type 10h */
typedef struct acpi_ivrs {
@@ -275,7 +276,7 @@ typedef struct acpi_ivrs {
uint32_t iv_info;
uint32_t reserved[2];
struct acpi_ivrs_ivhd ivhd;
-} __attribute__ ((packed)) acpi_ivrs_t;
+} __packed acpi_ivrs_t;
enum dev_scope_type {
SCOPE_PCI_ENDPOINT = 1,
@@ -293,8 +294,8 @@ typedef struct dev_scope {
struct {
u8 dev;
u8 fn;
- } __attribute__((packed)) path[0];
-} __attribute__ ((packed)) dev_scope_t;
+ } __packed path[0];
+} __packed dev_scope_t;
enum dmar_type {
DMAR_DRHD = 0,
@@ -319,7 +320,7 @@ typedef struct dmar_entry {
u8 reserved;
u16 segment;
u64 bar;
-} __attribute__ ((packed)) dmar_entry_t;
+} __packed dmar_entry_t;
typedef struct dmar_atsr_entry {
u16 type;
@@ -327,7 +328,7 @@ typedef struct dmar_atsr_entry {
u8 flags;
u8 reserved;
u16 segment;
-} __attribute__ ((packed)) dmar_atsr_entry_t;
+} __packed dmar_atsr_entry_t;
/* DMAR (DMA Remapping Reporting Structure) */
typedef struct acpi_dmar {
@@ -336,7 +337,7 @@ typedef struct acpi_dmar {
u8 flags;
u8 reserved[10];
dmar_entry_t structure[0];
-} __attribute__ ((packed)) acpi_dmar_t;
+} __packed acpi_dmar_t;
/* MADT: APIC Structure Types */
/* TODO: Convert to ALLCAPS. */
@@ -363,7 +364,7 @@ typedef struct acpi_madt_lapic {
u8 processor_id; /* ACPI processor ID */
u8 apic_id; /* Local APIC ID */
u32 flags; /* Local APIC flags */
-} __attribute__ ((packed)) acpi_madt_lapic_t;
+} __packed acpi_madt_lapic_t;
/* MADT: Local APIC NMI Structure */
typedef struct acpi_madt_lapic_nmi {
@@ -372,7 +373,7 @@ typedef struct acpi_madt_lapic_nmi {
u8 processor_id; /* ACPI processor ID */
u16 flags; /* MPS INTI flags */
u8 lint; /* Local APIC LINT# */
-} __attribute__ ((packed)) acpi_madt_lapic_nmi_t;
+} __packed acpi_madt_lapic_nmi_t;
/* MADT: I/O APIC Structure */
typedef struct acpi_madt_ioapic {
@@ -382,7 +383,7 @@ typedef struct acpi_madt_ioapic {
u8 reserved;
u32 ioapic_addr; /* I/O APIC address */
u32 gsi_base; /* Global system interrupt base */
-} __attribute__ ((packed)) acpi_madt_ioapic_t;
+} __packed acpi_madt_ioapic_t;
/* MADT: Interrupt Source Override Structure */
typedef struct acpi_madt_irqoverride {
@@ -392,7 +393,7 @@ typedef struct acpi_madt_irqoverride {
u8 source; /* Bus-relative int. source (IRQ) */
u32 gsirq; /* Global system interrupt */
u16 flags; /* MPS INTI flags */
-} __attribute__ ((packed)) acpi_madt_irqoverride_t;
+} __packed acpi_madt_irqoverride_t;
/* FADT (Fixed ACPI Description Table) */
typedef struct acpi_fadt {
@@ -452,7 +453,7 @@ typedef struct acpi_fadt {
struct acpi_gen_regaddr x_pm_tmr_blk;
struct acpi_gen_regaddr x_gpe0_blk;
struct acpi_gen_regaddr x_gpe1_blk;
-} __attribute__ ((packed)) acpi_fadt_t;
+} __packed acpi_fadt_t;
/* FADT TABLE Revision values */
#define ACPI_FADT_REV_ACPI_1_0 1
@@ -524,7 +525,7 @@ typedef struct acpi_facs {
u32 x_firmware_waking_vector_h; /* X FW waking vector, high */
u8 version; /* ACPI 4.0: 2 */
u8 resv[31]; /* FIXME: 4.0: ospm_flags */
-} __attribute__ ((packed)) acpi_facs_t;
+} __packed acpi_facs_t;
/* FACS flags */
#define ACPI_FACS_S4BIOS_F (1 << 0)
@@ -539,14 +540,14 @@ typedef struct acpi_ecdt {
u32 uid; /* UID */
u8 gpe_bit; /* GPE bit */
u8 ec_id[]; /* EC ID */
-} __attribute__ ((packed)) acpi_ecdt_t;
+} __packed acpi_ecdt_t;
/* HEST (Hardware Error Source Table) */
typedef struct acpi_hest {
struct acpi_table_header header;
u32 error_source_count;
/* error_source_struct(s) */
-} __attribute__ ((packed)) acpi_hest_t;
+} __packed acpi_hest_t;
/* Error Source Descriptors */
typedef struct acpi_hest_esd {
@@ -559,7 +560,7 @@ typedef struct acpi_hest_esd {
* pre-allocate for this error source.
*/
u32 max_section_per_record;
-} __attribute__ ((packed)) acpi_hest_esd_t;
+} __packed acpi_hest_esd_t;
/* Hardware Error Notification */
typedef struct acpi_hest_hen {
@@ -572,14 +573,14 @@ typedef struct acpi_hest_hen {
u32 sw2poll_threshold_win;
u32 error_threshold_val;
u32 error_threshold_win;
-} __attribute__ ((packed)) acpi_hest_hen_t;
+} __packed acpi_hest_hen_t;
typedef struct acpi_cstate {
u8 ctype;
u16 latency;
u32 power;
acpi_addr_t resource;
-} __attribute__ ((packed)) acpi_cstate_t;
+} __packed acpi_cstate_t;
typedef struct acpi_tstate {
u32 percent;
@@ -587,7 +588,7 @@ typedef struct acpi_tstate {
u32 latency;
u32 control;
u32 status;
-} __attribute__ ((packed)) acpi_tstate_t;
+} __packed acpi_tstate_t;
unsigned long fw_cfg_acpi_tables(unsigned long start);
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h
index a59ac2c50b..d35e9647ab 100644
--- a/src/arch/x86/include/arch/io.h
+++ b/src/arch/x86/include/arch/io.h
@@ -432,28 +432,28 @@ void pnp_set_drq(pnp_devfn_t dev, unsigned int index, unsigned int drq)
#include <device/pci_ops.h>
#endif
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_or_config8(device_t dev, unsigned int where, u8 ormask)
{
u8 value = pci_read_config8(dev, where);
pci_write_config8(dev, where, value | ormask);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_or_config16(device_t dev, unsigned int where, u16 ormask)
{
u16 value = pci_read_config16(dev, where);
pci_write_config16(dev, where, value | ormask);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_or_config32(device_t dev, unsigned int where, u32 ormask)
{
u32 value = pci_read_config32(dev, where);
pci_write_config32(dev, where, value | ormask);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_update_config8(device_t dev, int reg, u8 mask, u8 or)
{
u8 reg8;
@@ -464,7 +464,7 @@ void pci_update_config8(device_t dev, int reg, u8 mask, u8 or)
pci_write_config8(dev, reg, reg8);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_update_config16(device_t dev, int reg, u16 mask, u16 or)
{
u16 reg16;
@@ -475,7 +475,7 @@ void pci_update_config16(device_t dev, int reg, u16 mask, u16 or)
pci_write_config16(dev, reg, reg16);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_update_config32(device_t dev, int reg, u32 mask, u32 or)
{
u32 reg32;
diff --git a/src/arch/x86/include/arch/pci_mmio_cfg.h b/src/arch/x86/include/arch/pci_mmio_cfg.h
index 9b9f702630..efd8269ad2 100644
--- a/src/arch/x86/include/arch/pci_mmio_cfg.h
+++ b/src/arch/x86/include/arch/pci_mmio_cfg.h
@@ -20,7 +20,7 @@
#define DEFAULT_PCIEXBAR CONFIG_MMCONF_BASE_ADDRESS
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
u8 pci_mmio_read_config8(pci_devfn_t dev, unsigned int where)
{
void *addr;
@@ -28,7 +28,7 @@ u8 pci_mmio_read_config8(pci_devfn_t dev, unsigned int where)
return read8(addr);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
u16 pci_mmio_read_config16(pci_devfn_t dev, unsigned int where)
{
void *addr;
@@ -36,7 +36,7 @@ u16 pci_mmio_read_config16(pci_devfn_t dev, unsigned int where)
return read16(addr);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
u32 pci_mmio_read_config32(pci_devfn_t dev, unsigned int where)
{
void *addr;
@@ -44,7 +44,7 @@ u32 pci_mmio_read_config32(pci_devfn_t dev, unsigned int where)
return read32(addr);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_mmio_write_config8(pci_devfn_t dev, unsigned int where, u8 value)
{
void *addr;
@@ -52,7 +52,7 @@ void pci_mmio_write_config8(pci_devfn_t dev, unsigned int where, u8 value)
write8(addr, value);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_mmio_write_config16(pci_devfn_t dev, unsigned int where, u16 value)
{
void *addr;
@@ -60,7 +60,7 @@ void pci_mmio_write_config16(pci_devfn_t dev, unsigned int where, u16 value)
write16(addr, value);
}
-static inline __attribute__ ((always_inline))
+static inline __attribute__((always_inline))
void pci_mmio_write_config32(pci_devfn_t dev, unsigned int where, u32 value)
{
void *addr;
diff --git a/src/arch/x86/include/arch/pirq_routing.h b/src/arch/x86/include/arch/pirq_routing.h
index 5236b90f7e..1ca7618f14 100644
--- a/src/arch/x86/include/arch/pirq_routing.h
+++ b/src/arch/x86/include/arch/pirq_routing.h
@@ -28,6 +28,7 @@
#define MAX_INTX_ENTRIES 4
#include <stdint.h>
+#include <compiler.h>
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
#define PIRQ_VERSION 0x0100
@@ -37,10 +38,10 @@ struct irq_info {
struct {
u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
u16 bitmap; /* Available IRQs */
- } __attribute__((packed)) irq[4];
+ } __packed irq[4];
u8 slot; /* Slot number, 0=onboard */
u8 rfu;
-} __attribute__((packed));
+} __packed;
struct irq_routing_table {
u32 signature; /* PIRQ_SIGNATURE should be here */
@@ -53,7 +54,7 @@ struct irq_routing_table {
u8 rfu[11];
u8 checksum; /* Modulo 256 checksum must give zero */
struct irq_info slots[CONFIG_IRQ_SLOT_COUNT];
-} __attribute__((packed));
+} __packed;
unsigned long copy_pirq_routing_table(unsigned long addr,
const struct irq_routing_table *routing_table);
diff --git a/src/arch/x86/include/arch/registers.h b/src/arch/x86/include/arch/registers.h
index 2ffcafb0a9..76fda2851d 100644
--- a/src/arch/x86/include/arch/registers.h
+++ b/src/arch/x86/include/arch/registers.h
@@ -16,7 +16,7 @@
#ifndef __ARCH_REGISTERS_H
#define __ARCH_REGISTERS_H
-#define __PACKED __attribute__((packed))
+#include <compiler.h>
#define DOWNTO8(A) \
union { \
@@ -25,22 +25,22 @@
struct { \
uint8_t A##l; \
uint8_t A##h; \
- } __PACKED; \
+ } __packed; \
uint16_t A##x; \
- } __PACKED; \
+ } __packed; \
uint16_t h##A##x; \
- } __PACKED; \
+ } __packed; \
uint32_t e##A##x; \
- } __PACKED;
+ } __packed;
#define DOWNTO16(A) \
union { \
struct { \
uint16_t A; \
uint16_t h##A; \
- } __PACKED; \
+ } __packed; \
uint32_t e##A; \
- } __PACKED;
+ } __packed;
struct eregs {
DOWNTO8(a);
diff --git a/src/arch/x86/include/arch/smp/mpspec.h b/src/arch/x86/include/arch/smp/mpspec.h
index 4c80dbb45a..8b3e8bb8f9 100644
--- a/src/arch/x86/include/arch/smp/mpspec.h
+++ b/src/arch/x86/include/arch/smp/mpspec.h
@@ -16,6 +16,7 @@
#ifndef __ASM_MPSPEC_H
#define __ASM_MPSPEC_H
+#include <compiler.h>
#include <device/device.h>
#include <cpu/x86/lapic_def.h>
@@ -52,7 +53,7 @@ struct intel_mp_floating {
u8 mpf_feature3; /* Unused (0) */
u8 mpf_feature4; /* Unused (0) */
u8 mpf_feature5; /* Unused (0) */
-} __attribute__((packed));
+} __packed;
struct mp_config_table {
char mpc_signature[4];
@@ -69,7 +70,7 @@ struct mp_config_table {
u16 mpe_length; /* Extended Table size */
u8 mpe_checksum; /* Extended Table checksum */
u8 reserved;
-} __attribute__((packed));
+} __packed;
/* Followed by entries */
@@ -92,13 +93,13 @@ struct mpc_config_processor {
#define MPC_CPU_FAMILY_MASK 0xF00
u32 mpc_featureflag; /* CPUID feature value */
u32 mpc_reserved[2];
-} __attribute__((packed));
+} __packed;
struct mpc_config_bus {
u8 mpc_type;
u8 mpc_busid;
u8 mpc_bustype[6];
-} __attribute__((packed));
+} __packed;
#define BUSTYPE_EISA "EISA"
#define BUSTYPE_ISA "ISA"
@@ -115,7 +116,7 @@ struct mpc_config_ioapic {
u8 mpc_flags;
#define MPC_APIC_USABLE 0x01
void *mpc_apicaddr;
-} __attribute__((packed));
+} __packed;
struct mpc_config_intsrc {
u8 mpc_type;
@@ -125,7 +126,7 @@ struct mpc_config_intsrc {
u8 mpc_srcbusirq;
u8 mpc_dstapic;
u8 mpc_dstirq;
-} __attribute__((packed));
+} __packed;
enum mp_irq_source_types {
mp_INT = 0,
@@ -153,7 +154,7 @@ struct mpc_config_lintsrc {
u8 mpc_destapic;
#define MP_APIC_ALL 0xFF
u8 mpc_destapiclint;
-} __attribute__((packed));
+} __packed;
/*
* Default configurations
@@ -185,7 +186,7 @@ enum mp_bustype {
struct mp_exten_config {
u8 mpe_type;
u8 mpe_length;
-} __attribute__((packed));
+} __packed;
typedef struct mp_exten_config *mpe_t;
@@ -201,7 +202,7 @@ struct mp_exten_system_address_space {
u32 mpe_address_base_high;
u32 mpe_address_length_low;
u32 mpe_address_length_high;
-} __attribute__((packed));
+} __packed;
struct mp_exten_bus_hierarchy {
u8 mpe_type;
@@ -211,7 +212,7 @@ struct mp_exten_bus_hierarchy {
#define BUS_SUBTRACTIVE_DECODE 1
u8 mpe_parent_busid;
u8 reserved[3];
-} __attribute__((packed));
+} __packed;
struct mp_exten_compatibility_address_space {
u8 mpe_type;
@@ -237,7 +238,7 @@ struct mp_exten_compatibility_address_space {
* XFB0 - XFBB
* XFC0 - XCDF
*/
-} __attribute__((packed));
+} __packed;
void mptable_init(struct mp_config_table *mc, u32 lapic_addr);
void *smp_next_mpc_entry(struct mp_config_table *mc);