mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
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/+/67868 Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
eaf701dc68
commit
2e3e10669d
@ -988,6 +988,8 @@ static int enable_flash_silvermont(struct pci_dev *dev, const char *name)
|
|||||||
|
|
||||||
/* Handle GCS (in RCRB) */
|
/* Handle GCS (in RCRB) */
|
||||||
void *rcrb = physmap("BYT RCRB", rcba, 4);
|
void *rcrb = physmap("BYT RCRB", rcba, 4);
|
||||||
|
if (rcrb == ERROR_PTR)
|
||||||
|
return ERROR_FATAL;
|
||||||
const enum chipbustype boot_buses = enable_flash_ich_report_gcs(dev, ich_generation, rcrb);
|
const enum chipbustype boot_buses = enable_flash_ich_report_gcs(dev, ich_generation, rcrb);
|
||||||
physunmap(rcrb, 4);
|
physunmap(rcrb, 4);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user