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@redfish-solutions.com> Reviewed-on: http://review.coreboot.org/499 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
committed by
Patrick Georgi
parent
c10cade404
commit
965dacebc5
@@ -113,6 +113,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
|
|||||||
{
|
{
|
||||||
struct cb_header *header;
|
struct cb_header *header;
|
||||||
unsigned char *ptr = addr;
|
unsigned char *ptr = addr;
|
||||||
|
void *forward;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < len; i += 16, ptr += 16) {
|
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). */
|
/* We only care about a few tags here (maybe more later). */
|
||||||
switch (rec->tag) {
|
switch (rec->tag) {
|
||||||
case CB_TAG_FORWARD:
|
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;
|
continue;
|
||||||
case CB_TAG_MEMORY:
|
case CB_TAG_MEMORY:
|
||||||
cb_parse_memory(ptr, info);
|
cb_parse_memory(ptr, info);
|
||||||
|
Reference in New Issue
Block a user