From d9c84ca7ef0142df99c01832fe8683faec257436 Mon Sep 17 00:00:00 2001 From: Hannah Williams Date: Fri, 13 May 2016 00:47:14 -0700 Subject: soc/apollolake: SOC specific SMM code Add SMI handlers that map to SOC specific SMI events Update relocation_handler in mp_ops Change-Id: Idefddaf41cf28240f5f8172b00462a7f893889e7 Signed-off-by: Hannah Williams Reviewed-on: https://review.coreboot.org/14808 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/intel/apollolake/memmap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/soc/intel/apollolake/memmap.c') diff --git a/src/soc/intel/apollolake/memmap.c b/src/soc/intel/apollolake/memmap.c index bf172cba6e..e57ed53d74 100644 --- a/src/soc/intel/apollolake/memmap.c +++ b/src/soc/intel/apollolake/memmap.c @@ -20,13 +20,27 @@ #include #include #include +#include static uintptr_t smm_region_start(void) { return ALIGN_DOWN(pci_read_config32(NB_DEV_ROOT, TSEG), 1*MiB); } +static size_t smm_region_size(void) +{ + uintptr_t smm_end = + ALIGN_DOWN(pci_read_config32(NB_DEV_ROOT, BGSM), 1*MiB); + return smm_end - smm_region_start(); +} + void *cbmem_top(void) { return (void *)smm_region_start(); } + +void smm_region(void **start, size_t *size) +{ + *start = (void *)smm_region_start(); + *size = smm_region_size(); +} -- cgit v1.2.3