diff options
author | Nico Huber <nico.h@gmx.de> | 2023-07-14 23:15:17 +0200 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-08-03 17:55:01 +0000 |
commit | 6e133fa47040c81907c7e423ba92cf76734f35fe (patch) | |
tree | 111651f73da18aa17a09a1d697e7f905c0ed809e /util/cbfstool/cbfs-payload-linux.c | |
parent | 6a50e555fcc8b9de2f17c90c64196c8439bc2e8e (diff) |
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 <nico.h@gmx.de>
Co-authored-by: Bill XIE <persmule@hardenedlinux.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76479
Reviewed-by: Bill XIE <persmule@hardenedlinux.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/cbfstool/cbfs-payload-linux.c')
-rw-r--r-- | util/cbfstool/cbfs-payload-linux.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |