Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12232
-gerrit
commit fed9bbe447f71a5e9446d58c7023101730c74644 Author: Patrick Georgi pgeorgi@google.com Date: Fri Oct 23 20:25:03 2015 +0200
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 --- payloads/libpayload/libcbfs/cbfs_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/libcbfs/cbfs_core.c b/payloads/libpayload/libcbfs/cbfs_core.c index ff3c527..14a2001 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;