summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/coreboot_tables.h
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/include/coreboot_tables.h')
-rw-r--r--payloads/libpayload/include/coreboot_tables.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index bd23d34c83..1d38c19a80 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -91,10 +91,7 @@ enum {
CB_TAG_OPTION_CHECKSUM = 0x00cc,
};
-struct cbuint64 {
- u32 lo;
- u32 hi;
-};
+typedef __aligned(4) uint64_t cb_uint64_t;
struct cb_header {
u8 signature[4];
@@ -111,8 +108,8 @@ struct cb_record {
};
struct cb_memory_range {
- struct cbuint64 start;
- struct cbuint64 size;
+ cb_uint64_t start;
+ cb_uint64_t size;
u32 type;
};
@@ -271,14 +268,14 @@ struct cb_gpios {
struct lb_range {
uint32_t tag;
uint32_t size;
- uint64_t range_start;
+ cb_uint64_t range_start;
uint32_t range_size;
};
struct cb_cbmem_tab {
uint32_t tag;
uint32_t size;
- uint64_t cbmem_tab;
+ cb_uint64_t cbmem_tab;
};
struct cb_x86_rom_mtrr {
@@ -316,10 +313,10 @@ struct cb_boot_media_params {
uint32_t tag;
uint32_t size;
/* offsets are relative to start of boot media */
- uint64_t fmap_offset;
- uint64_t cbfs_offset;
- uint64_t cbfs_size;
- uint64_t boot_media_size;
+ cb_uint64_t fmap_offset;
+ cb_uint64_t cbfs_offset;
+ cb_uint64_t cbfs_size;
+ cb_uint64_t boot_media_size;
};
@@ -327,7 +324,7 @@ struct cb_cbmem_entry {
uint32_t tag;
uint32_t size;
- uint64_t address;
+ cb_uint64_t address;
uint32_t entry_size;
uint32_t id;
};
@@ -369,7 +366,7 @@ struct cb_board_config {
uint32_t tag;
uint32_t size;
- struct cbuint64 fw_config;
+ cb_uint64_t fw_config;
uint32_t board_id;
uint32_t ram_code;
uint32_t sku_id;
@@ -429,17 +426,12 @@ struct cb_cmos_checksum {
struct cb_acpi_rsdp {
uint32_t tag;
uint32_t size;
- struct cbuint64 rsdp_pointer; /* Address of the ACPI RSDP */
+ cb_uint64_t rsdp_pointer; /* Address of the ACPI RSDP */
};
/* Helpful inlines */
-static inline u64 cb_unpack64(struct cbuint64 val)
-{
- return (((u64) val.hi) << 32) | val.lo;
-}
-
static inline u16 cb_checksum(const void *ptr, unsigned len)
{
return ipchksum(ptr, len);