diff options
author | Yinghai Lu <yinghailu@gmail.com> | 2006-04-03 20:38:34 +0000 |
---|---|---|
committer | Yinghai Lu <yinghailu@gmail.com> | 2006-04-03 20:38:34 +0000 |
commit | 9a791dffeae2097aa0a18f645ce07acfed41b9bc (patch) | |
tree | 2d0359536fe3c1a0c313440b6be4ed09397dade9 /src/cpu/amd/car/disable_cache_as_ram.c | |
parent | ffb7d8a31ae899f611235cd0a7f3579d34cd8cde (diff) |
new cache_as_ram support
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2232 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/amd/car/disable_cache_as_ram.c')
-rw-r--r-- | src/cpu/amd/car/disable_cache_as_ram.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/cpu/amd/car/disable_cache_as_ram.c b/src/cpu/amd/car/disable_cache_as_ram.c index 06a558f413..56e60eefb7 100644 --- a/src/cpu/amd/car/disable_cache_as_ram.c +++ b/src/cpu/amd/car/disable_cache_as_ram.c @@ -3,10 +3,7 @@ static inline __attribute__((always_inline)) void disable_cache_as_ram(void) { __asm__ volatile ( - /* - FIXME : backup stack in CACHE_AS_RAM into mmx and sse and after we get STACK up, we restore that. - It is only needed if we want to go back - */ + /* We don't need cache as ram for now on */ /* disable cache */ "movl %cr0, %eax\n\t" @@ -43,5 +40,30 @@ static inline __attribute__((always_inline)) void disable_cache_as_ram(void) "movl %cr0, %eax\n\t" "andl $0x9fffffff,%eax\n\t" "movl %eax, %cr0\n\t" + ); } +/* be warned, this file will be used core 0 / node 0 and ram stack is ready*/ + +static void disable_cache_as_ram_bsp(void) +{ + __asm__ volatile ( + + "pushl %ecx\n\t" + "pushl %edx\n\t" + "pushl %eax\n\t" + + ); + + disable_cache_as_ram(); + + __asm__ volatile ( + + "popl %eax\n\t" + "popl %edx\n\t" + "popl %ecx\n\t" + + ); +} + + |