Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/64077 )
Change subject: soc/intel/cmn/fast-spi: Add flash as reserved region ......................................................................
soc/intel/cmn/fast-spi: Add flash as reserved region
Add the boot flash MMIO window to the resources to report this region as reserved to the OS.
Change-Id: Ib3a77e9233c3c63bad4de926670edb4545ceaddf Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/soc/intel/common/block/fast_spi/fast_spi.c 1 file changed, 12 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/64077/1
diff --git a/src/soc/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c index 19b3db7..7b736d6 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi.c @@ -22,6 +22,8 @@ #include <spi_flash.h> #include <spi-generic.h>
+#define FLASH_BASE_ADDR ((0xffffffff - CONFIG_ROM_SIZE) + 1) + /* * Get the FAST_SPIBAR. */ @@ -517,8 +519,17 @@
#endif
+static void fast_spi_read_resources(struct device *dev) +{ + /* Read standard PCI resources. */ + pci_dev_read_resources(dev); + + /* Add SPI boot flash as a reserved resource. */ + mmio_resource(dev, 0, FLASH_BASE_ADDR / KiB, CONFIG_ROM_SIZE / KiB); +} + static struct device_operations fast_spi_dev_ops = { - .read_resources = pci_dev_read_resources, + .read_resources = fast_spi_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, #if CONFIG(HAVE_ACPI_TABLES)