libpayload: Cache physical cbmem console address
Same as with other consoles and drivers that cache an address outside the payload (e.g. video/corebootfb), we should store the physical address, so we can derive the virtual address on demand. This makes it save to use the address across relocations. As a first step in migrating `libsysinfo` to `uintptr_t`, we also switch to the physical address there. Fixes the default build of FILO, tested with Qemu/i440FX and Qemu/Q35. Change-Id: I4b8434af69e0526f78523ae61981a15abb1295b0 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37478 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Patrick Georgi
parent
2f6d5551b0
commit
14adb7eaa9
@@ -110,7 +110,7 @@ static int bootlog_module_init(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct cbmem_console *console = lib_sysinfo.cbmem_cons;
|
||||
struct cbmem_console *console = phys_to_virt(lib_sysinfo.cbmem_cons);
|
||||
if (console == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user