summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-07-18 14:54:47 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-08-24 09:13:09 +0000
commitbe842cb72d83b347bbc1c3308909f4eac286b47a (patch)
treee682a6fad4ad45d5764815b2f4754513be0c2c0d /payloads/libpayload/libc
parentb2eafa666cb7f5318daa61962bae62859f4e4e88 (diff)
downloadcoreboot-be842cb72d83b347bbc1c3308909f4eac286b47a.tar.xz
libpayload: Cache physical location of serial-console struct
In the presence of self-relocating payloads, it's safer to keep physical addresses in `libsysinfo`. Change-Id: Icd30e95c6b8115d16dd793914fb01a1a9da1854f Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43577 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads/libpayload/libc')
-rw-r--r--payloads/libpayload/libc/coreboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index cb47a8317b..5ecdd51fab 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -86,7 +86,7 @@ static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
static void cb_parse_serial(void *ptr, struct sysinfo_t *info)
{
- info->serial = ((struct cb_serial *)ptr);
+ info->cb_serial = virt_to_phys(ptr);
}
static void cb_parse_vboot_workbuf(unsigned char *ptr, struct sysinfo_t *info)