diff --git a/src/soc/intel/alderlake/systemagent.c b/src/soc/intel/alderlake/systemagent.c index be0c6996a4..bbc421b0cb 100644 --- a/src/soc/intel/alderlake/systemagent.c +++ b/src/soc/intel/alderlake/systemagent.c @@ -116,7 +116,7 @@ void soc_add_configurable_mmio_resources(struct device *dev, int *resource_cnt) } /* TSEG */ - size = sa_get_tseg_size(); + size = CONFIG_SMM_TSEG_SIZE; tseg_base = sa_get_tseg_base(); if (size > 0) set_mmio_resource(&(cfg_rsrc[count++]), tseg_base, size, "TSEG"); diff --git a/src/soc/intel/common/block/include/intelblocks/systemagent.h b/src/soc/intel/common/block/include/intelblocks/systemagent.h index a3ae8c38bf..5047f1d9aa 100644 --- a/src/soc/intel/common/block/include/intelblocks/systemagent.h +++ b/src/soc/intel/common/block/include/intelblocks/systemagent.h @@ -91,8 +91,6 @@ uintptr_t sa_get_tolud_base(void); uintptr_t sa_get_gsm_base(void); /* API to get TSEG base address */ uintptr_t sa_get_tseg_base(void); -/* API to get TSEG size */ -size_t sa_get_tseg_size(void); /* API to lock PAM registers */ void sa_lock_pam(void); /* API to get MMIO config size */ diff --git a/src/soc/intel/common/block/systemagent/memmap.c b/src/soc/intel/common/block/systemagent/memmap.c index 3b0fb6e8ae..9a3971098f 100644 --- a/src/soc/intel/common/block/systemagent/memmap.c +++ b/src/soc/intel/common/block/systemagent/memmap.c @@ -54,7 +54,7 @@ void smm_region(uintptr_t *start, size_t *size) { *start = sa_get_tseg_base(); - *size = sa_get_tseg_size(); + *size = CONFIG_SMM_TSEG_SIZE; } void fill_postcar_frame(struct postcar_frame *pcf) diff --git a/src/soc/intel/common/block/systemagent/systemagent_early.c b/src/soc/intel/common/block/systemagent/systemagent_early.c index aecdfbb429..993d008eb6 100644 --- a/src/soc/intel/common/block/systemagent/systemagent_early.c +++ b/src/soc/intel/common/block/systemagent/systemagent_early.c @@ -146,11 +146,6 @@ uintptr_t sa_get_tseg_base(void) return ALIGN_DOWN(pci_read_config32(SA_DEV_ROOT, TSEG), 1*MiB); } -size_t sa_get_tseg_size(void) -{ - return sa_get_gsm_base() - sa_get_tseg_base(); -} - union dpr_register txt_get_chipset_dpr(void) { return (union dpr_register) { .raw = pci_read_config32(SA_DEV_ROOT, DPR) }; diff --git a/src/soc/intel/meteorlake/systemagent.c b/src/soc/intel/meteorlake/systemagent.c index bb841aa60b..9dc771f6e2 100644 --- a/src/soc/intel/meteorlake/systemagent.c +++ b/src/soc/intel/meteorlake/systemagent.c @@ -108,7 +108,7 @@ void soc_add_configurable_mmio_resources(struct device *dev, int *resource_cnt) } /* TSEG */ - size = sa_get_tseg_size(); + size = CONFIG_SMM_TSEG_SIZE; tseg_base = sa_get_tseg_base(); if (size > 0) set_mmio_resource(&(cfg_rsrc[count++]), tseg_base, size, "TSEG"); diff --git a/src/soc/intel/pantherlake/systemagent.c b/src/soc/intel/pantherlake/systemagent.c index c1a081cb1b..f88aedb95c 100644 --- a/src/soc/intel/pantherlake/systemagent.c +++ b/src/soc/intel/pantherlake/systemagent.c @@ -105,7 +105,7 @@ void soc_add_configurable_mmio_resources(struct device *dev, int *resource_cnt) } /* TSEG */ - size = sa_get_tseg_size(); + size = CONFIG_SMM_TSEG_SIZE; tseg_base = sa_get_tseg_base(); if (size > 0) set_mmio_resource(&(cfg_rsrc[count++]), tseg_base, size, "TSEG");