diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-08-14 06:25:55 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-08-28 22:51:27 +0000 |
commit | d53fd704f252ffde35c8bf2f2b16260edce76e79 (patch) | |
tree | af78a8f39e05c14375cd773699e7532ac410ca20 /src/northbridge/intel/nehalem/memmap.c | |
parent | b371e233eb96daaa4b5ee3a75ef78068524210fb (diff) | |
download | coreboot-d53fd704f252ffde35c8bf2f2b16260edce76e79.tar.xz |
intel/smm/gen1: Use smm_subregion()
Change-Id: I371ed41f485b3143e47f091681198d6674928897
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34740
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/nehalem/memmap.c')
-rw-r--r-- | src/northbridge/intel/nehalem/memmap.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/northbridge/intel/nehalem/memmap.c b/src/northbridge/intel/nehalem/memmap.c index 1687ddf78b..fd10542832 100644 --- a/src/northbridge/intel/nehalem/memmap.c +++ b/src/northbridge/intel/nehalem/memmap.c @@ -21,8 +21,8 @@ #include <cbmem.h> #include <console/console.h> #include <cpu/x86/mtrr.h> +#include <cpu/x86/smm.h> #include <program_loading.h> -#include <stage_cache.h> #include <cpu/intel/smm_reloc.h> #include "nehalem.h" @@ -33,12 +33,12 @@ static uintptr_t smm_region_start(void) return tom; } -u32 northbridge_get_tseg_base(void) +static uintptr_t northbridge_get_tseg_base(void) { - return (u32)smm_region_start(); + return smm_region_start(); } -u32 northbridge_get_tseg_size(void) +static size_t northbridge_get_tseg_size(void) { return CONFIG_SMM_TSEG_SIZE; } @@ -48,13 +48,10 @@ void *cbmem_top(void) return (void *) smm_region_start(); } -void stage_cache_external_region(void **base, size_t *size) +void smm_region(uintptr_t *start, size_t *size) { - /* The stage cache lives at the end of TSEG region. - * The top of RAM is defined to be the TSEG base address. */ - *size = CONFIG_SMM_RESERVED_SIZE; - *base = (void *)((uintptr_t)northbridge_get_tseg_base() + - northbridge_get_tseg_size() - CONFIG_SMM_RESERVED_SIZE); + *start = northbridge_get_tseg_base(); + *size = northbridge_get_tseg_size(); } void fill_postcar_frame(struct postcar_frame *pcf) |