Felix Singer submitted this change.
chipset_enable.c: Validate physmap() return rcrb value
Validate the physical mapping in enable_flash_silvermont().
Change-Id: Icc5a799a06b3f310d9a191fa5eb99b255b20d79d
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/48225
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67843
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
---
M chipset_enable.c
1 file changed, 21 insertions(+), 0 deletions(-)
diff --git a/chipset_enable.c b/chipset_enable.c
index 67ce761..6220416 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -920,6 +920,8 @@
/* Handle GCS (in RCRB) */
void *rcrb = physmap("BYT RCRB", rcba, 4);
+ if (rcrb == ERROR_PTR)
+ return ERROR_FATAL;
enable_flash_ich_report_gcs(dev, ich_generation, rcrb);
physunmap(rcrb, 4);
To view, visit change 67843. To unsubscribe, or for help writing mail filters, visit settings.