summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2008-04-05 01:07:27 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-04-05 01:07:27 +0000
commit3860404b651d7c92c86a9789f9c163efb7ec9c8a (patch)
treee6bed51ebcb9a0959806b790d0e517713f900915 /payloads/libpayload
parent6c44dfb6497941cf844feef79aafec23f32635b2 (diff)
libpayload: remove unneeded stack stuff
Following on the previous code to streamline the libpayload init code, this removes the now unneeded stack structures. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3217 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/i386/head.S4
-rw-r--r--payloads/libpayload/i386/main.c17
-rw-r--r--payloads/libpayload/libpayload.ldscript7
3 files changed, 3 insertions, 25 deletions
diff --git a/payloads/libpayload/i386/head.S b/payloads/libpayload/i386/head.S
index e548329c66..8dc31aa54d 100644
--- a/payloads/libpayload/i386/head.S
+++ b/payloads/libpayload/i386/head.S
@@ -54,9 +54,9 @@ _init:
movl %esp, %esi
/* Setup new stack. */
- movl _istack, %ebx
+ movl $_stack, %ebx
- movl (%ebx), %esp
+ movl %ebx, %esp
/* Save old stack pointer. */
pushl %esi
diff --git a/payloads/libpayload/i386/main.c b/payloads/libpayload/i386/main.c
index a167218ffc..25e4de46d7 100644
--- a/payloads/libpayload/i386/main.c
+++ b/payloads/libpayload/i386/main.c
@@ -29,23 +29,6 @@
#include <libpayload.h>
-/*
- * This structure seeds the stack. We provide the return address of our main
- * function, and further down, the address of the function that we call when
- * we leave and try to restore the original stack. At the very bottom of the
- * stack we store the original stack pointer from the calling application.
- */
-
-extern void _leave(void);
-
-static struct {
- uint32_t esp;
-} initial_stack __attribute__ ((section(".istack"))) = {
- (uint32_t) &initial_stack,
-};
-
-void *_istack = &initial_stack;
-
/**
* This is our C entry function - set up the system
* and jump into the payload entry point.
diff --git a/payloads/libpayload/libpayload.ldscript b/payloads/libpayload/libpayload.ldscript
index 92ba2c05a8..7ae49e5808 100644
--- a/payloads/libpayload/libpayload.ldscript
+++ b/payloads/libpayload/libpayload.ldscript
@@ -73,17 +73,12 @@ SECTIONS
. = ALIGN(16);
_eheap = .;
- _stack = .;
+ _estack = .;
. += STACK_SIZE;
. = ALIGN(16);
_stack = .;
}
- /* Put the static bits of our inital stack at the bottom */
- .istack : {
- *(.istack)
- }
-
_end = .;
/DISCARD/ : { *(.comment) *(.note) *(.note.*) }