summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-04-13 10:01:14 +0000
committerStefan Reinauer <stepan@openbios.org>2010-04-13 10:01:14 +0000
commitf17ca16624140b0a2509fc37b084616b7857089e (patch)
tree478c309878335ea7b0a662a7e535cdfaa64924e0 /src
parent4d68df779f26b577632c2110dac233c01457b91f (diff)
downloadcoreboot-f17ca16624140b0a2509fc37b084616b7857089e.tar.xz
Speed up coreboot_ram loading by moving the decompression stack
into the cached area. Back to 469ms until coreboot_ram is actually running on epia-cn Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5417 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/init/crt0_romcc_epilogue.inc12
-rw-r--r--src/cpu/via/car/cache_as_ram.inc14
2 files changed, 18 insertions, 8 deletions
diff --git a/src/arch/i386/init/crt0_romcc_epilogue.inc b/src/arch/i386/init/crt0_romcc_epilogue.inc
index 25c3633c66..9476607f1e 100644
--- a/src/arch/i386/init/crt0_romcc_epilogue.inc
+++ b/src/arch/i386/init/crt0_romcc_epilogue.inc
@@ -14,8 +14,16 @@ __main:
movl %ebp, %esi
- /* FIXME: look for a proper place for the stack */
- movl $0x4000000, %esp
+ /* For now: use CONFIG_RAMBASE + 1MB - 64K (counting downwards) as stack. This
+ * makes sure that we stay completely within the 1M-64K of memory that we
+ * preserve for suspend/resume.
+ */
+
+#ifndef HIGH_MEMORY_SAVE
+#warning Need a central place for HIGH_MEMORY_SAVE
+#define HIGH_MEMORY_SAVE ( (1024 - 64) * 1024 )
+#endif
+ movl $(CONFIG_RAMBASE + HIGH_MEMORY_SAVE), %esp
movl %esp, %ebp
pushl %esi
call copy_and_run
diff --git a/src/cpu/via/car/cache_as_ram.inc b/src/cpu/via/car/cache_as_ram.inc
index c926ab6f91..c49c3e4c2e 100644
--- a/src/cpu/via/car/cache_as_ram.inc
+++ b/src/cpu/via/car/cache_as_ram.inc
@@ -270,14 +270,16 @@ __main:
movl %ebp, %esi
- /* FIXME: These values might have to change for suspend-to-ram.
- * the 0x00400000 was chosen as this is a place in memory that
- * should exist in all contemporary configurations (ie. large
- * enough RAM), but doesn't collide with anything coreboot does.
- * Other than that, it's arbitrary.
+ /* For now: use CONFIG_RAMBASE + 1MB - 64K (counting downwards) as stack. This
+ * makes sure that we stay completely within the 1M-64K of memory that we
+ * preserve for suspend/resume.
*/
- movl $0x4000000, %esp
+#ifndef HIGH_MEMORY_SAVE
+#warning Need a central place for HIGH_MEMORY_SAVE
+#define HIGH_MEMORY_SAVE ( (1024 - 64) * 1024 )
+#endif
+ movl $(CONFIG_RAMBASE + HIGH_MEMORY_SAVE), %esp
movl %esp, %ebp
pushl %esi
call copy_and_run