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>
This commit is contained in:
committed by
Patrick Georgi
parent
b2eafa666c
commit
be842cb72d
@@ -90,10 +90,12 @@ static struct console_input_driver s5p_serial_input =
|
||||
|
||||
void serial_init(void)
|
||||
{
|
||||
if (!lib_sysinfo.serial || !lib_sysinfo.serial->baseaddr)
|
||||
const struct cb_serial *const serial = phys_to_virt(lib_sysinfo.cb_serial);
|
||||
|
||||
if (!lib_sysinfo.cb_serial || !serial->baseaddr)
|
||||
return;
|
||||
|
||||
uart_regs = (struct s5p_uart *)lib_sysinfo.serial->baseaddr;
|
||||
uart_regs = (struct s5p_uart *)serial->baseaddr;
|
||||
}
|
||||
|
||||
void serial_console_init(void)
|
||||
|
Reference in New Issue
Block a user