coreboot-kgpe-d16/util
Aaron Durbin 46300aa2ce util/cbmem: be explicit about memory map sizes
The cbmem utility has inherited some workarounds that originated
from the default 1 MiB mapping always working. This 1 MiB mmap
won't necessarily succeed if the 1 MiB encroaches on a subsequent
memory range that has different cacheability.

To fix this, map in only 4 KiB when the table size is not known which is
the case for any forwarding entry or any low table entries on x86. That
smaller mapping is then searched for a valid header. Once a valid header
is found the full table is mapped and parsed allowing a forwarding entry
to take precedence.

Lastly, the lbtable is kept mapped in such that other operations can
just operate on mapping that was previously parsed.

In order to allow multiple in-flight mappings a struct mapping was
added which caused the ripple within the code. However, there shouldn't
be any more reasons for putting weird heuristics for when to fail. If
the tables are bad then it's very much possible that mappings will fail.
Retrying when the exact sizes are already known won't fix those issues.

BUG=b:66681446

Change-Id: Ica0737aada8dc07311eae867e87ef2fd24eae98d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/21718
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-09-28 04:48:52 +00:00
..
abuild abuild: Allow building with any toolchain 2017-09-06 04:31:30 +00:00
acpi tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
amdfwtool amdfwtool: Move normal firmware 2 after fanless firmware2s 2017-04-27 23:27:06 +02:00
amdtools Use more secure HTTPS URLs for coreboot sites 2017-06-07 12:04:50 +02:00
archive archive: build archive tool with HOSTCC 2016-03-08 17:40:05 +01:00
arm_boot_tools/mksunxiboot
autoport util/autoport: Remove copy-pasting of PMIR register 2017-07-31 15:00:43 +00:00
bimgtool codebase: Change makefile $(shell pwd) commands to $(CURDIR) 2016-03-11 18:48:06 +01:00
blobtool util/blobtool: add spec files for DDR3 SPDs 2017-06-27 16:06:53 +00:00
board_status board_status: Tell user where to find output when results are uploaded 2017-09-20 01:22:41 +00:00
broadcom util/broadcom: Check for successful file access 2016-12-16 18:22:43 +01:00
cbfstool util/cbfstool: Add "expand" command to make CBFS span an fmap region 2017-09-20 13:45:00 +00:00
cbmem util/cbmem: be explicit about memory map sizes 2017-09-28 04:48:52 +00:00
checklist util/checklist: Place tables in proper boot order 2016-08-03 18:01:32 +02:00
chromeos util/chromeos: Make scripts executable 2016-07-30 19:34:20 +02:00
crossgcc buildgcc: Fix up cross GCC building 2017-09-02 15:30:52 +00:00
docker util/docker: Update coreboot-sdk dockerfile 2017-09-20 01:29:55 +00:00
dtd_parser util: Look for python2 binary instead of python 2016-01-26 00:25:19 +01:00
ectool util/ectool: Dump ram by default 2017-04-25 18:46:04 +02:00
exynos util: Look for python2 binary instead of python 2016-01-26 00:25:19 +01:00
futility util/futility/Makefile: Update clean target 2017-03-29 05:16:49 +02:00
fuzz-tests tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
genbuild_h genbuild_h: Fix numeric comparison to remove error 2016-03-14 23:37:12 +01:00
genprof
gitconfig lint: update signed-off-by check 2017-08-17 11:26:31 +00:00
hugo util: change coreboot to lowercase 2017-06-27 18:26:01 +00:00
ifdfake util/ifdfake: Add number of regions 2016-12-15 23:47:09 +01:00
ifdtool ifdtool: Refactor some code 2017-09-17 21:31:22 +00:00
intelmetool intelmetool: Add support for Sunrise Point-H 2017-09-06 04:35:02 +00:00
inteltool util/inteltool: Remove duplicated error message, switch to snprintf 2017-08-22 10:10:34 +00:00
intelvbttool intelvbttool: cope with errors in open() 2016-07-31 19:23:29 +02:00
ipqheader util: ipq40xx: Scripts to combine SBL and Coreboot ELFs 2016-05-09 09:36:27 +02:00
k8resdump tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
kbc1126 kbc1126_ec_dump: fix some errors 2017-08-18 15:32:08 +00:00
kconfig Kconfig: Change symbol override from warning to notice 2016-12-12 17:53:32 +01:00
lint util/lint: update checkpatch & spelling.txt to upstream versions 2017-09-20 01:28:13 +00:00
marvell util/marvell: Add Marvell doimage utility and dependency in relevant Makefile 2016-02-11 14:16:08 +01:00
me_cleaner util/me_cleaner: Pull the latest changes from upstream 2017-08-20 21:19:47 +00:00
mma mma: update mma setup script for v2.1018 2017-04-24 19:11:34 +02:00
msrtool util/msrtool: Exit program after displaying the help message 2017-08-22 10:10:49 +00:00
mtkheader util: Look for python2 binary instead of python 2016-01-26 00:25:19 +01:00
nvidia util/nvidia/cbootimage: Update to upstream master 2017-04-24 19:19:39 +02:00
nvramtool util: change coreboot to lowercase 2017-06-27 18:26:01 +00:00
optionlist util: change coreboot to lowercase 2017-06-27 18:26:01 +00:00
post util: Add a very simple utility to test POST cards. 2016-02-26 07:00:33 +01:00
release util/release: Update build-release script 2017-05-16 10:54:06 +02:00
riscvtools RISCV: change make-spike-elf to use the coreboot toolchain. 2016-10-15 00:34:27 +02:00
rockchip rockchip: update make_idb.py 2016-03-16 15:24:10 +01:00
romcc smbus: Fix a typo ("Set the device I'm talking too") 2017-09-27 16:38:18 +00:00
sconfig lib: provide clearer devicetree semantics 2017-04-25 18:14:38 +02:00
scripts util/scripts/cross-repo-cherrypick: improve cros-side rewrite 2017-09-15 20:57:57 +00:00
showdevicetree tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
spkmodem_recv tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
superiotool util/superiotool: Check for libpci before builing 2017-06-28 00:49:32 +00:00
testing util/testing: Don't keep tegra lp0 build results 2017-09-06 11:36:27 +00:00
uio_usbdebug tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
vgabios util/vgabios: Don't call redefined printk in printk 2017-07-21 15:45:41 +00:00
viatool Use more secure HTTPS URLs for coreboot sites 2017-06-07 12:04:50 +02:00
xcompile clang: Enable integrated assembler on clang builds 2017-09-02 15:21:35 +00:00