summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/arch/i386/coreboot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/payloads/libpayload/arch/i386/coreboot.c b/payloads/libpayload/arch/i386/coreboot.c
index 3c99c4fde0..709f8ae00f 100644
--- a/payloads/libpayload/arch/i386/coreboot.c
+++ b/payloads/libpayload/arch/i386/coreboot.c
@@ -113,6 +113,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
{
struct cb_header *header;
unsigned char *ptr = addr;
+ void *forward;
int i;
for (i = 0; i < len; i += 16, ptr += 16) {
@@ -145,7 +146,8 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
/* We only care about a few tags here (maybe more later). */
switch (rec->tag) {
case CB_TAG_FORWARD:
- return cb_parse_header((void *)(unsigned long)((struct cb_forward *)rec)->forward, len, info);
+ forward = phys_to_virt((void *)(unsigned long)((struct cb_forward *)rec)->forward);
+ return cb_parse_header(forward, len, info);
continue;
case CB_TAG_MEMORY:
cb_parse_memory(ptr, info);