summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/include/amdblocks/acpimmio.h
diff options
context:
space:
mode:
authorMarshall Dawson <marshalldawson3rd@gmail.com>2019-05-21 18:45:07 -0600
committerMarshall Dawson <marshalldawson3rd@gmail.com>2019-06-11 14:39:05 +0000
commit2395917adfd267a737beb38285a8e689b27235aa (patch)
treec6c3e26bef682b51f9e336bead30903d0a45b873 /src/soc/amd/common/block/include/amdblocks/acpimmio.h
parent1cf5ea5f1db6f780cd6da052c615a920c7201462 (diff)
downloadcoreboot-2395917adfd267a737beb38285a8e689b27235aa.tar.xz
soc/amd/common: Add errors for invalid AcpiMmio access
Add a method for the soc/amd/<product> to indicate what AcpiMmio ranges are supported. Induce a build error if soc or mainboard code is added which attempts to use an unsupported block. This patch attempts to dissuade accessing unsupported blocks without requiring the complexity of structures or reinitializing at the beginning of a new stage. TEST=boot grunt, force build errors by removing blocks in iomap.h BUG=b:131682806 Change-Id: I2121df108fd3caf07e5588bc3201bcdd8dcaaa00 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32934 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Diffstat (limited to 'src/soc/amd/common/block/include/amdblocks/acpimmio.h')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/acpimmio.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/acpimmio.h b/src/soc/amd/common/block/include/amdblocks/acpimmio.h
index 6be856bc5c..32da867137 100644
--- a/src/soc/amd/common/block/include/amdblocks/acpimmio.h
+++ b/src/soc/amd/common/block/include/amdblocks/acpimmio.h
@@ -18,6 +18,69 @@
#ifndef __AMDBLOCKS_ACPIMMIO_H__
#define __AMDBLOCKS_ACPIMMIO_H__
+/* iomap.h must indicate if the device uses a block, optional if unused. */
+#include <soc/iomap.h>
+#ifndef SUPPORTS_ACPIMMIO_SMI_BASE
+ #define SUPPORTS_ACPIMMIO_SMI_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_PMIO_BASE
+ #define SUPPORTS_ACPIMMIO_PMIO_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_PMIO2_BASE
+ #define SUPPORTS_ACPIMMIO_PMIO2_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_BIOSRAM_BASE
+ #define SUPPORTS_ACPIMMIO_BIOSRAM_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_CMOSRAM_BASE
+ #define SUPPORTS_ACPIMMIO_CMOSRAM_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_CMOS_BASE
+ #define SUPPORTS_ACPIMMIO_CMOS_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_ACPI_BASE
+ #define SUPPORTS_ACPIMMIO_ACPI_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_ASF_BASE
+ #define SUPPORTS_ACPIMMIO_ASF_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_SMBUS_BASE
+ #define SUPPORTS_ACPIMMIO_SMBUS_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_WDT_BASE
+ #define SUPPORTS_ACPIMMIO_WDT_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_HPET_BASE
+ #define SUPPORTS_ACPIMMIO_HPET_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_IOMUX_BASE
+ #define SUPPORTS_ACPIMMIO_IOMUX_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_MISC_BASE
+ #define SUPPORTS_ACPIMMIO_MISC_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_DPVGA_BASE
+ #define SUPPORTS_ACPIMMIO_DPVGA_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_GPIO0_BASE
+ #define SUPPORTS_ACPIMMIO_GPIO0_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_GPIO1_BASE
+ #define SUPPORTS_ACPIMMIO_GPIO1_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_GPIO2_BASE
+ #define SUPPORTS_ACPIMMIO_GPIO2_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_XHCIPM_BASE
+ #define SUPPORTS_ACPIMMIO_XHCIPM_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_ACDCTMR_BASE
+ #define SUPPORTS_ACPIMMIO_ACDCTMR_BASE 0
+#endif
+#ifndef SUPPORTS_ACPIMMIO_AOAC_BASE
+ #define SUPPORTS_ACPIMMIO_AOAC_BASE 0
+#endif
+
/*
* The following AcpiMmio register block mapping represents definitions
* that have been documented in AMD publications. All blocks aren't