soc/amd/common/block/spi: Enforce default ROM mapping
Make sure that the ROM2 MMIO area starts at flash address 0. Document 56780 Change-Id: I1fc06517ea496441147375579800f7349e39facc Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87176 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
e6358d98c4
commit
fdb0701336
1 changed files with 8 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <boot_device.h>
|
||||
#include <endian.h>
|
||||
#include <spi_flash.h>
|
||||
#include <amdblocks/spi.h>
|
||||
|
||||
#if CONFIG_ROM_SIZE >= (16 * MiB)
|
||||
#define ROM_SIZE (16 * MiB)
|
||||
|
|
@ -18,6 +19,13 @@ static const struct mem_region_device boot_dev =
|
|||
|
||||
const struct region_device *boot_device_ro(void)
|
||||
{
|
||||
/*
|
||||
* The following code assumes that ROM2 is mapped at flash offset 0. This is the default
|
||||
* configuration currently enforced by soft-straps.
|
||||
*/
|
||||
if (fch_spi_rom_remapping() != 0)
|
||||
die("Non default SPI ROM remapping is not supported!");
|
||||
|
||||
return &boot_dev.rdev;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue