summaryrefslogtreecommitdiff
path: root/src/soc/intel/xeon_sp
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-06-01 18:12:16 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-07-10 12:55:46 +0000
commite7fa24470dc3b3403eabd757a87cfb993f316b1a (patch)
tree6497bd70076905089fc81ed777cbec34486569c0 /src/soc/intel/xeon_sp
parenta9997f891facaf3c855d7f2c9c6840acbf101193 (diff)
cbmem_top: Change the return value to uintptr_t
Change-Id: Ib757c0548f6f643747ba8d70228b3d6dfa5182cd Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82752 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Reviewed-by: Jakub Czapiga <czapiga@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/xeon_sp')
-rw-r--r--src/soc/intel/xeon_sp/memmap.c2
-rw-r--r--src/soc/intel/xeon_sp/uncore.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/intel/xeon_sp/memmap.c b/src/soc/intel/xeon_sp/memmap.c
index 8fe21e8430..bf4c13e4d3 100644
--- a/src/soc/intel/xeon_sp/memmap.c
+++ b/src/soc/intel/xeon_sp/memmap.c
@@ -30,7 +30,7 @@ void smm_region(uintptr_t *start, size_t *size)
void fill_postcar_frame(struct postcar_frame *pcf)
{
- const uintptr_t top_of_ram = (uintptr_t)cbmem_top();
+ const uintptr_t top_of_ram = cbmem_top();
uintptr_t cbmem_base;
size_t cbmem_size;
diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c
index 96451913fd..2e5023d04e 100644
--- a/src/soc/intel/xeon_sp/uncore.c
+++ b/src/soc/intel/xeon_sp/uncore.c
@@ -139,7 +139,7 @@ static void mc_report_map_entries(struct device *dev, uint64_t *values)
static void configure_dpr(struct device *dev)
{
- const uintptr_t cbmem_top_mb = ALIGN_UP((uintptr_t)cbmem_top(), MiB) / MiB;
+ const uintptr_t cbmem_top_mb = ALIGN_UP(cbmem_top(), MiB) / MiB;
union dpr_register dpr = { .raw = pci_read_config32(dev, VTD_LTDPR) };
/* The DPR lock bit has to be set sufficiently early. It looks like
@@ -245,7 +245,7 @@ static void mc_add_dram_resources(struct device *dev, int *res_count)
LOG_RESOURCE("low_ram", dev, res);
/* top_of_ram -> cbmem_top */
- res = ram_from_to(dev, index++, top_of_ram, (uintptr_t)cbmem_top());
+ res = ram_from_to(dev, index++, top_of_ram, cbmem_top());
LOG_RESOURCE("cbmem_ram", dev, res);
/* Mark TSEG/SMM region as reserved */
@@ -261,7 +261,7 @@ static void mc_add_dram_resources(struct device *dev, int *res_count)
* DPR has a 1M granularity so it's possible if cbmem_top is not 1M
* aligned that some memory does not get marked as assigned.
*/
- res = reserved_ram_from_to(dev, index++, (uintptr_t)cbmem_top(),
+ res = reserved_ram_from_to(dev, index++, cbmem_top(),
(dpr.top - dpr.size) * MiB);
LOG_RESOURCE("unused_dram", dev, res);