aboutsummaryrefslogtreecommitdiffstats
path: root/opaque.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@chromium.org>2019-11-26 23:48:51 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2021-01-25 22:39:13 +0000
commita2d9a40ec486798db14593b6641e2d5920ca50a0 (patch)
treed18c052617f4df9aeb31e32e6003bc40a3aeb7c3 /opaque.c
parent1a21cc70d69d9d8f34d6b1faab1f942f57888585 (diff)
downloadflashrom-a2d9a40ec486798db14593b6641e2d5920ca50a0.tar.gz
flashrom-a2d9a40ec486798db14593b6641e2d5920ca50a0.tar.bz2
flashrom-a2d9a40ec486798db14593b6641e2d5920ca50a0.zip
cbtable.c: don't assume high addresses can fully map 1 MiB
Forward port the downstream `commit b17e9e41838`. When using a forwarding table entry for finding the coreboot table don't assume one has access to a full 1 MiB where the forwarding table entry points to. The reason is that the 1 MiB may cover address regions that have differing cacheability type. As such the kernel will complain and the mapping will fail. Instead, check the header first then map in the bytes that it indicates after sanity validation. That way there is no attempt at requesting an invalid mapping that spans different memory cacheability attributes. V.2: Incorperate Nico's and Angels comments from upstream. BUG=b:66681446 BRANCH=None TEST=Can successfully run 'flashrom -p host --wp-status' on kahlee without generating PAT errors. Original-Change-Id: Ic6c5832b069300cced66e11f4ca4a0bbc6e496de Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/685608 Original-Reviewed-by: Martin Roth <martinroth@chromium.org> Original-Reviewed-by: Justin TerAvest <teravest@chromium.org> Change-Id: I43705c19dd7c816098d03f528bde6f180c4c8f24 Signed-off-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/37240 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sam McNally <sammc@google.com>
Diffstat (limited to 'opaque.c')
0 files changed, 0 insertions, 0 deletions