diff options
author | Nico Huber <nico.h@gmx.de> | 2020-07-18 14:54:47 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-08-24 09:13:09 +0000 |
commit | be842cb72d83b347bbc1c3308909f4eac286b47a (patch) | |
tree | e682a6fad4ad45d5764815b2f4754513be0c2c0d /payloads/libpayload/drivers/serial/8250.c | |
parent | b2eafa666cb7f5318daa61962bae62859f4e4e88 (diff) |
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/drivers/serial/8250.c')
-rw-r--r-- | payloads/libpayload/drivers/serial/8250.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/serial/8250.c b/payloads/libpayload/drivers/serial/8250.c index b0e9d03c20..1df34c41ea 100644 --- a/payloads/libpayload/drivers/serial/8250.c +++ b/payloads/libpayload/drivers/serial/8250.c @@ -132,9 +132,9 @@ void serial_init(void) void serial_console_init(void) { - if (!lib_sysinfo.serial) + if (!lib_sysinfo.cb_serial) return; - cb_serial = *lib_sysinfo.serial; + cb_serial = *(struct cb_serial *)phys_to_virt(lib_sysinfo.cb_serial); serial_init(); |