From d6c58b79e72dbea8f3221c592039c5fad569d93a Mon Sep 17 00:00:00 2001 From: Jincheng Li Date: Sun, 2 Jun 2024 20:53:25 +0800 Subject: soc/intel/common/block: Move VTd basic definitions into header file TEST=Build and boot on intel/archercity CRB Change-Id: I4f9e606cf9ec01ec157ef4dd7c26f6b5eb88c7b7 Signed-off-by: Jincheng Li Signed-off-by: Shuo Liu Reviewed-on: https://review.coreboot.org/c/coreboot/+/82941 Reviewed-by: Felix Held Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/vtd/vtd.c | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'src/soc/intel/common/block/vtd/vtd.c') diff --git a/src/soc/intel/common/block/vtd/vtd.c b/src/soc/intel/common/block/vtd/vtd.c index f67d8dbfd5..12ca151c7a 100644 --- a/src/soc/intel/common/block/vtd/vtd.c +++ b/src/soc/intel/common/block/vtd/vtd.c @@ -12,19 +12,6 @@ #include #include -/* VT-d specification: https://cdrdv2.intel.com/v1/dl/getContent/671081 */ -#define VER_REG 0x0 -#define CAP_REG 0x8 -#define CAP_PMR_LO BIT(5) -#define CAP_PMR_HI BIT(6) -#define PMEN_REG 0x64 -#define PMEN_EPM BIT(31) -#define PMEN_PRS BIT(0) -#define PLMBASE_REG 0x68 -#define PLMLIMIT_REG 0x6C -#define PHMBASE_REG 0x70 -#define PHMLIMIT_REG 0x78 - /* FSP 2.x VT-d HOB from edk2-platforms */ static const uint8_t vtd_pmr_info_data_hob_guid[16] = { 0x45, 0x16, 0xb6, 0x6f, 0x68, 0xf1, 0xbe, 0x46, @@ -40,26 +27,6 @@ struct vtd_pmr_info_hob { static struct vtd_pmr_info_hob *pmr_hob; -static __always_inline uint32_t vtd_read32(uintptr_t vtd_base, uint32_t reg) -{ - return read32p(vtd_base + reg); -} - -static __always_inline void vtd_write32(uintptr_t vtd_base, uint32_t reg, uint32_t value) -{ - return write32p(vtd_base + reg, value); -} - -static __always_inline uint64_t vtd_read64(uintptr_t vtd_base, uint32_t reg) -{ - return read64p(vtd_base + reg); -} - -static __always_inline void vtd_write64(uintptr_t vtd_base, uint32_t reg, uint64_t value) -{ - return write64p(vtd_base + reg, value); -} - static bool is_vtd_enabled(uintptr_t vtd_base) { uint32_t version = vtd_read32(vtd_base, VER_REG); -- cgit v1.2.3