summaryrefslogtreecommitdiff
path: root/src/soc/intel/braswell
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/braswell')
-rw-r--r--src/soc/intel/braswell/cpu.c4
-rw-r--r--src/soc/intel/braswell/memmap.c17
-rw-r--r--src/soc/intel/braswell/northcluster.c4
3 files changed, 11 insertions, 14 deletions
diff --git a/src/soc/intel/braswell/cpu.c b/src/soc/intel/braswell/cpu.c
index bde4b1c418..1cee4b9ca4 100644
--- a/src/soc/intel/braswell/cpu.c
+++ b/src/soc/intel/braswell/cpu.c
@@ -150,7 +150,7 @@ static int get_cpu_count(void)
static void get_smm_info(uintptr_t *perm_smbase, size_t *perm_smsize,
size_t *smm_save_state_size)
{
- void *smm_base;
+ uintptr_t smm_base;
size_t smm_size;
/* All range registers are aligned to 4KiB */
@@ -158,7 +158,7 @@ static void get_smm_info(uintptr_t *perm_smbase, size_t *perm_smsize,
/* Initialize global tracking state. */
smm_region(&smm_base, &smm_size);
- relo_attrs.smbase = (uint32_t)smm_base;
+ relo_attrs.smbase = smm_base;
relo_attrs.smrr_base = relo_attrs.smbase | MTRR_TYPE_WRBACK;
relo_attrs.smrr_mask = ~(smm_size - 1) & rmask;
relo_attrs.smrr_mask |= MTRR_PHYS_MASK_VALID;
diff --git a/src/soc/intel/braswell/memmap.c b/src/soc/intel/braswell/memmap.c
index 69bbe58727..01594eabb0 100644
--- a/src/soc/intel/braswell/memmap.c
+++ b/src/soc/intel/braswell/memmap.c
@@ -28,9 +28,9 @@ static size_t smm_region_size(void)
return smm_size;
}
-void smm_region(void **start, size_t *size)
+void smm_region(uintptr_t *start, size_t *size)
{
- *start = (void *)((iosf_bunit_read(BUNIT_SMRRL) & 0xFFFF) << 20);
+ *start = (iosf_bunit_read(BUNIT_SMRRL) & 0xFFFF) << 20;
*size = smm_region_size();
}
@@ -43,15 +43,13 @@ void smm_region(void **start, size_t *size)
* | (TSEG) |
* +-------------------------+ BUNIT_SMRRL
*/
-int smm_subregion(int sub, void **start, size_t *size)
+int smm_subregion(int sub, uintptr_t *start, size_t *size)
{
uintptr_t sub_base;
- void *sub_ptr;
size_t sub_size;
const size_t cache_size = CONFIG_SMM_RESERVED_SIZE;
- smm_region(&sub_ptr, &sub_size);
- sub_base = (uintptr_t)sub_ptr;
+ smm_region(&sub_base, &sub_size);
switch (sub) {
case SMM_SUBREGION_HANDLER:
@@ -67,15 +65,14 @@ int smm_subregion(int sub, void **start, size_t *size)
return -1;
}
- *start = (void *)sub_base;
+ *start = sub_base;
*size = sub_size;
-
return 0;
}
void *cbmem_top(void)
{
- char *smm_base;
+ uintptr_t smm_base;
size_t smm_size;
/*
@@ -106,6 +103,6 @@ void *cbmem_top(void)
* +-------------------------+
*/
- smm_region((void **)&smm_base, &smm_size);
+ smm_region(&smm_base, &smm_size);
return (void *)smm_base;
}
diff --git a/src/soc/intel/braswell/northcluster.c b/src/soc/intel/braswell/northcluster.c
index e37e0d6e7d..ff58ebfeec 100644
--- a/src/soc/intel/braswell/northcluster.c
+++ b/src/soc/intel/braswell/northcluster.c
@@ -87,7 +87,7 @@ static void nc_read_resources(struct device *dev)
unsigned long mmconf;
unsigned long bmbound_k;
unsigned long bmbound_hi;
- void *smm_base;
+ uintptr_t smm_base;
size_t smm_size;
unsigned long tseg_base_k;
unsigned long tseg_top_k;
@@ -102,7 +102,7 @@ static void nc_read_resources(struct device *dev)
/* Determine TSEG data */
smm_region(&smm_base, &smm_size);
- tseg_base_k = RES_IN_KIB((unsigned long) smm_base);
+ tseg_base_k = RES_IN_KIB(smm_base);
tseg_top_k = tseg_base_k + RES_IN_KIB(smm_size);
/* Determine the base of the FSP reserved memory */