aboutsummaryrefslogtreecommitdiff
path: root/src/include/cpu/amd
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-12-29 12:07:54 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-11-14 15:44:56 +0100
commitabc083e06bcb8d20a58d04323d5c6da7313f987d (patch)
tree60e5d06fa1178a71f21df2779f8ea84bf6be886f /src/include/cpu/amd
parent3eefeea9d58ab2896aec7ded7aa1a15e8e9fa72c (diff)
AMD (K8/fam10): Rewrite CAR migration in post_cache_as_ram
Old routine copied all of CAR region as-is right below CONFIG_RAMTOP. Most of this region was reserved to interleave AP CPU address spaces and unused on BSP CPU. The only part of CAR region requiring a copy in RAM is the sysinfo structure. Improved routine changes this as follows: A region of size 'backup_size' below CONFIG_RAMTOP is cleared. In case of S3 resume, OS context from this region is first copied to high memory (CBMEM_ID_RESUME). At stack switch, CAR stack is discarded. Top of the stack for BSP is located at 'CONFIG_RAMTOP - car_size' for the remaining part of the romstage. This region is part of 'backup_size' and was zeroed before the switch took place. Before CAR is torn down the region of CAR_GLOBALS (and CAR_CBMEM), including the relevant sysinfo data for AP nodes memory training, is copied at 'CONFIG_RAMTOP - car_size'. NOTE: While CAR_GLOBAL variables are recovered, there are currently no means to calculate their offsets in RAM. NOTE: Boards with multiple CPU packages are likely already broken since bbc880ee amdk8/amdfam10: Use CAR_GLOBAL for sysinfo This moved the copy of sysinfo in RAM from above the stack to below the stack, but code for AP CPU's was not adjusted accordingly. Change-Id: Ie45b576aec6a2e006bfcb26b52fdb77c24f72e3b Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/4583 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/include/cpu/amd')
-rw-r--r--src/include/cpu/amd/car.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/cpu/amd/car.h b/src/include/cpu/amd/car.h
index a001c9345f..c00310a61f 100644
--- a/src/include/cpu/amd/car.h
+++ b/src/include/cpu/amd/car.h
@@ -5,8 +5,8 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
void done_cache_as_ram_main(void);
void post_cache_as_ram(void);
-void cache_as_ram_switch_stack(void *resume_backup_memory);
-void cache_as_ram_new_stack(void *resume_backup_memory);
+void cache_as_ram_switch_stack(void *stacktop);
+void cache_as_ram_new_stack(void);
#if CONFIG_CPU_AMD_AGESA
void disable_cache_as_ram(void);