Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43577 )
Change subject: libpayload: Cache physical location of serial-console struct ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/43577/1/payloads/libpayload/drivers... File payloads/libpayload/drivers/serial/8250.c:
https://review.coreboot.org/c/coreboot/+/43577/1/payloads/libpayload/drivers... PS1, Line 137: cb_serial = *(struct cb_serial *)phys_to_virt(lib_sysinfo.cb_serial); nit: might be nice to have a wrapper function for this (e.g. cb_get_serial() or something). Then drivers like this wouldn't need a local copy at all they could just keep using that.