Attention is currently required from: Arthur Heymans.

Arthur Heymans would like Arthur Heymans to review this change.

View Change

libpayload: Parse the ACPI RSDP table entry

Change-Id: I583cda63c3f0b58f8d198ed5ecea7c4619c7a897
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
---
M payloads/libpayload/include/coreboot_tables.h
M payloads/libpayload/include/sysinfo.h
M payloads/libpayload/libc/coreboot.c
3 files changed, 21 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/62576/1
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 3fd3fc8..0e0078f 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -83,6 +83,7 @@
CB_TAG_BOARD_CONFIG = 0x0040,
CB_TAG_ACPI_CNVS = 0x0041,
CB_TAG_TYPE_C_INFO = 0x0042,
+ CB_TAG_ACPI_RSDP = 0x0043,
CB_TAG_CMOS_OPTION_TABLE = 0x00c8,
CB_TAG_OPTION = 0x00c9,
CB_TAG_OPTION_ENUM = 0x00ca,
@@ -422,6 +423,16 @@
u32 type;
};

+/*
+ * Handoff the ACPI RSDP
+ */
+struct cb_acpi_rsdp {
+ uint32_t tag;
+ uint32_t size;
+ uint64_t rsdp_pointer; /* Address of the ACPI RSDP */
+} __packed;
+
+
/* Helpful inlines */

static inline u64 cb_unpack64(struct cbuint64 val)
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index 376f298..d0afde8 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -110,6 +110,7 @@
uintptr_t mrc_cache;
uintptr_t acpi_gnvs;
uintptr_t acpi_cnvs;
+ uintptr_t acpi_rsdp;

#define UNDEFINED_STRAPPING_ID (~0)
#define UNDEFINED_FW_CONFIG ~((uint64_t)0)
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 72d7664..9a6b9e2 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -265,6 +265,12 @@
}
}

+static void cb_parse_rsdp(void *ptr, struct sysinfo_t *info)
+{
+ const struct cb_acpi_rsdp *cb_acpi_rsdp = ptr;
+ info->acpi_rsdp = cb_acpi_rsdp->rsdp_pointer;
+}
+
int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
{
struct cb_header *header;
@@ -405,6 +411,9 @@
cb_parse_tsc_info(ptr, info);
break;
#endif
+ case CB_TAG_ACPI_RSDP:
+ cb_parse_rsdp(ptr, info);
+ break;
default:
cb_parse_arch_specific(rec, info);
break;

To view, visit change 62576. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I583cda63c3f0b58f8d198ed5ecea7c4619c7a897
Gerrit-Change-Number: 62576
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur.heymans@9elements.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Attention: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-MessageType: newchange