diff options
author | Wonkyu Kim <wonkyu.kim@intel.com> | 2021-09-01 23:32:23 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-05-16 13:09:58 +0000 |
commit | d107e810c9b188bd313c25638a2878bd4fc61615 (patch) | |
tree | 0bc1da2c77b1d0da1ce0ca6403348634a69f4e35 /src/soc/intel/common/block/ioc | |
parent | 169302aa7f52c9d9e842700575741a932a64ac99 (diff) |
soc/intel/common: Implement IOC driver
Starting with Meteor Lake SoC, the PCR/DMI interface to program GPMR
is replaced with IOC (I/O Cache), hence, this patch implements IOC
driver to support that migration.
Reference: 643504 MTL FAS section 7.5.2
TEST=Build and boot to OS for TGL RVP and MTL PSS
Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Change-Id: I768027c2ca78310c03845f70f17df19dc8cd0982
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63198
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/ioc')
-rw-r--r-- | src/soc/intel/common/block/ioc/Kconfig | 7 | ||||
-rw-r--r-- | src/soc/intel/common/block/ioc/Makefile.inc | 3 | ||||
-rw-r--r-- | src/soc/intel/common/block/ioc/ioc.c | 24 |
3 files changed, 34 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/ioc/Kconfig b/src/soc/intel/common/block/ioc/Kconfig new file mode 100644 index 0000000000..19c6f8487f --- /dev/null +++ b/src/soc/intel/common/block/ioc/Kconfig @@ -0,0 +1,7 @@ +config SOC_INTEL_COMMON_BLOCK_IOC + bool + depends on SOC_INTEL_COMMON_BLOCK_SA + help + Intel Processor common IO Cache (IOC). + IOC will replace DMI interface starting with Meteor Lake SoC + (which does not have the PCH die). diff --git a/src/soc/intel/common/block/ioc/Makefile.inc b/src/soc/intel/common/block/ioc/Makefile.inc new file mode 100644 index 0000000000..5896534729 --- /dev/null +++ b/src/soc/intel/common/block/ioc/Makefile.inc @@ -0,0 +1,3 @@ +bootblock-$(CONFIG_SOC_INTEL_COMMON_BLOCK_IOC) += ioc.c +romstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_IOC) += ioc.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_IOC) += ioc.c diff --git a/src/soc/intel/common/block/ioc/ioc.c b/src/soc/intel/common/block/ioc/ioc.c new file mode 100644 index 0000000000..639ec90f8f --- /dev/null +++ b/src/soc/intel/common/block/ioc/ioc.c @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/mmio.h> +#include <intelblocks/ioc.h> +#include <soc/iomap.h> + +void ioc_reg_write32(uint32_t offset, uint32_t value) +{ + write32p(MCH_BASE_ADDRESS + offset, value); +} + +uint32_t ioc_reg_read32(uint32_t offset) +{ + return read32p(MCH_BASE_ADDRESS + offset); +} + +void ioc_reg_or32(uint32_t offset, uint32_t ordata) +{ + uint32_t data32; + + data32 = read32p(MCH_BASE_ADDRESS + offset); + data32 |= ordata; + write32p(MCH_BASE_ADDRESS + offset, data32); +} |