From 6e133fa47040c81907c7e423ba92cf76734f35fe Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 14 Jul 2023 23:15:17 +0200 Subject: linux_trampoline: Handle 64-bit framebuffer addresses To support full 64-bit addresses, there is a new field `ext_lfb_base` since Linux 4.1. It is unclear, however, how a loader is supposed to know if the kernel is compatible with this. Filling these previously reserved bits doesn't hurt, but an old kernel would probably ignore them and not know that it's handling a clipped, invalid address. So we play safe, and only allow 64-bit addresses for kernels after the 2.15 version bump of the boot protocol. Change-Id: Ib20184cf207f092062a91ac3e6aa819b956efd33 Signed-off-by: Nico Huber Co-authored-by: Bill XIE Reviewed-on: https://review.coreboot.org/c/coreboot/+/76479 Reviewed-by: Bill XIE Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- util/cbfstool/cbfs-payload-linux.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util/cbfstool/cbfs-payload-linux.c') diff --git a/util/cbfstool/cbfs-payload-linux.c b/util/cbfstool/cbfs-payload-linux.c index f9d0d111c7..53d455cfee 100644 --- a/util/cbfstool/cbfs-payload-linux.c +++ b/util/cbfstool/cbfs-payload-linux.c @@ -265,6 +265,10 @@ int parse_bzImage_to_payload(const struct buffer *input, * this information for its jump to real Linux. */ params.kernel_start = kernel_base; + /* To make decisions based on the protocol version, + copy that as well. */ + params.param_block_version = hdr->protocol_version; + if (bzp_add_kernel(&bzp, input, setup_size) != 0) return -1; -- cgit v1.2.3