coreboot/payloads/libpayload/libcbfs
Julius Werner 4be8900ca3 libpayload: cbfs: Remove absolute pointer special case from ram_media
This patch changes the ram_media CBFS backend implementation to no
longer detect an absolute address that is inside the "memory region"
used to back the CBFS image (which on x86 is really just the
memory-mapped flash due to a depthcharge implementation detail). This
was (as far as I know only) used to support the ugly CBFS header pointer
situation with SeaBIOS, which is now resolved. It is a very dangerous
feature, since it's perfectly possible for a negative offset relative to
the end of the image to overlap that region. We only get lucky that in
our existing use cases the embedded CBFS is further away from the end of
the ROM than it's own size... if we instead had a 3MB image from
0xfffd0000 to 0xffff0000, then we might want to pass in an address like
0xfffe8000 (interpreted as a relative offset from the end) to refer to
the absolute address 0xfffd8000, but this feature would prevent that
since it fits inside the window when interpreted absolutely. (Also, it
is unlikely but possible that a non-memory-mapped architecture which
starts DRAM at 0x0 may put its bounce buffer within the first few
megabyte of the address space, so that a relative offset from the start
of the image could be interpreted as an absolute offset inside the
buffer.

CQ-DEPEND=CL:229962
BRANCH=None
BUG=None
TEST=Built and booted on Falco and Nyan_Blaze, confirmed that legacy
mode still works as well as before.

Change-Id: I0c9149d725adeecef2520342b307ce7ea52990c1
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/229976
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2014-12-03 06:09:59 +00:00
..
cbfs.c CBFS: Automate ROM image layout and remove hardcoded offsets 2014-12-03 06:09:54 +00:00
cbfs_core.c CBFS: Automate ROM image layout and remove hardcoded offsets 2014-12-03 06:09:54 +00:00
Makefile.inc libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig. 2013-08-14 17:05:33 -07:00
ram_media.c libpayload: cbfs: Remove absolute pointer special case from ram_media 2014-12-03 06:09:59 +00:00