[coreboot] New patch to review for coreboot: db051bf Fix missing VM mapping

Philip Prindeville (pprindeville@gmail.com) gerrit at coreboot.org
Sat Dec 24 01:45:41 CET 2011

Philip Prindeville (pprindeville at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/499


commit db051bf5228810b95952960bdc66fb37f004c09f
Author: Philip Prindeville <philipp at redfish-solutions.com>
Date:   Fri Dec 23 17:36:09 2011 -0700

    Fix missing VM mapping
    When processing FORWARD records, we weren't accounting for the pointer
    being in the physical address space and not the virtual space instead.
    Change-Id: I35ef637fbec7886d4cfeac5fd650a17eae8d555a
    Signed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
 payloads/libpayload/arch/i386/coreboot.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/payloads/libpayload/arch/i386/coreboot.c b/payloads/libpayload/arch/i386/coreboot.c
index 3c99c4f..709f8ae 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) {
-			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);
 		case CB_TAG_MEMORY:
 			cb_parse_memory(ptr, info);

More information about the coreboot mailing list