diff options
author | Patrick Georgi <pgeorgi@google.com> | 2015-10-23 20:25:03 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-11-05 17:39:42 +0100 |
commit | f86d0351051bddf98ed96a5da044b9779e35e9a1 (patch) | |
tree | bf631f705025891a68b368af55f913c523881342 /payloads/libpayload/libcbfs | |
parent | 593e7de5a777db0310da7221f81982b6b3ed4929 (diff) |
libpayload: Allow non-default CBFS media
CBFS requests were always fulfilled using the CBFS specified in
cbtables. That's a great policy when default requests are sought, but
not so great when the user deliberately asked for something else.
So check if they want default CBFS media information, otherwise ignore
cbtables data.
BUG=chromium:445938
BRANCH=none
TEST=none
Change-Id: I01b63049eebfba6f467808ac84ef77385840c204
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 621c916ab14c0de4bae3dde09c05060c4f3c63c5
Original-Change-Id: Ia4a8848fd7db9d9a2bf9f5c226566fe3936ff543
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/308520
Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12232
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/libcbfs')
-rw-r--r-- | payloads/libpayload/libcbfs/cbfs_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/payloads/libpayload/libcbfs/cbfs_core.c b/payloads/libpayload/libcbfs/cbfs_core.c index ff3c527f46..14a2001855 100644 --- a/payloads/libpayload/libcbfs/cbfs_core.c +++ b/payloads/libpayload/libcbfs/cbfs_core.c @@ -100,7 +100,8 @@ static int get_cbfs_range(uint32_t *offset, uint32_t *cbfs_end, { const struct cbfs_header *header; - if (lib_sysinfo.cbfs_offset && lib_sysinfo.cbfs_size) { + if (media == CBFS_DEFAULT_MEDIA && + lib_sysinfo.cbfs_offset && lib_sysinfo.cbfs_size) { *offset = lib_sysinfo.cbfs_offset; *cbfs_end = *offset + lib_sysinfo.cbfs_size; return 0; |