diff options
Diffstat (limited to 'payloads/libpayload')
-rw-r--r-- | payloads/libpayload/arch/armv7/coreboot.c | 2 | ||||
-rw-r--r-- | payloads/libpayload/arch/x86/coreboot.c | 2 | ||||
-rw-r--r-- | payloads/libpayload/include/sysinfo.h | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/payloads/libpayload/arch/armv7/coreboot.c b/payloads/libpayload/arch/armv7/coreboot.c index 0003c292c1..9545f29d68 100644 --- a/payloads/libpayload/arch/armv7/coreboot.c +++ b/payloads/libpayload/arch/armv7/coreboot.c @@ -129,6 +129,7 @@ static void cb_parse_mrc_cache(unsigned char *ptr, struct sysinfo_t *info) #ifdef CONFIG_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; } @@ -144,6 +145,7 @@ static void cb_parse_checksum(void *ptr, struct sysinfo_t *info) #ifdef CONFIG_COREBOOT_VIDEO_CONSOLE static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info) { + /* ptr points to a coreboot table entry and is already virtual */ info->framebuffer = ptr; } #endif diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c index e8bc380fc8..f4f9b86f9e 100644 --- a/payloads/libpayload/arch/x86/coreboot.c +++ b/payloads/libpayload/arch/x86/coreboot.c @@ -137,6 +137,7 @@ static void cb_parse_mrc_cache(unsigned char *ptr, struct sysinfo_t *info) #ifdef CONFIG_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; } @@ -152,6 +153,7 @@ static void cb_parse_checksum(void *ptr, struct sysinfo_t *info) #ifdef CONFIG_COREBOOT_VIDEO_CONSOLE static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info) { + /* ptr points to a coreboot table entry and is already virtual */ info->framebuffer = ptr; } #endif diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index 4c7ce4521b..e05ef9f4d6 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -39,6 +39,12 @@ struct cb_serial; +/* + * All pointers in here shall be virtual. + * + * If a relocation happens after the last call to lib_get_sysinfo(), + * it is up to the user to call lib_get_sysinfo() again. + */ struct sysinfo_t { unsigned int cpu_khz; struct cb_serial *serial; |