summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/drivers/options.c2
-rw-r--r--payloads/libpayload/include/sysinfo.h2
-rw-r--r--payloads/libpayload/libc/coreboot.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c
index 3a14d77df9..9e437f93f0 100644
--- a/payloads/libpayload/drivers/options.c
+++ b/payloads/libpayload/drivers/options.c
@@ -53,7 +53,7 @@ struct nvram_accessor *use_mem = &(struct nvram_accessor) {
struct cb_cmos_option_table *get_system_option_table(void)
{
- return lib_sysinfo.option_table;
+ return phys_to_virt(lib_sysinfo.cmos_option_table);
}
int options_checksum_valid(const struct nvram_accessor *nvram)
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index 3b1b9c9742..c3d8c7fd53 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -63,7 +63,7 @@ struct sysinfo_t {
unsigned int type;
} memrange[SYSINFO_MAX_MEM_RANGES];
- struct cb_cmos_option_table *option_table;
+ uintptr_t cmos_option_table;
u32 cmos_range_start;
u32 cmos_range_end;
u32 cmos_checksum_location;
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 25812e5a95..cb47a8317b 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -170,8 +170,8 @@ static void cb_parse_sku_id(unsigned char *ptr, struct sysinfo_t *info)
#if CONFIG(LP_NVRAM)
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
- /* ptr points to a coreboot table entry and is already virtual */
- info->option_table = ptr;
+ /* ptr is already virtual, but we want to keep physical addresses */
+ info->cmos_option_table = virt_to_phys(ptr);
}
static void cb_parse_checksum(void *ptr, struct sysinfo_t *info)