libpayload: remove unneeded stack stuff
authorJordan Crouse <jordan.crouse@amd.com>
Sat, 5 Apr 2008 01:07:27 +0000 (01:07 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Sat, 5 Apr 2008 01:07:27 +0000 (01:07 +0000)
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

payloads/libpayload/i386/head.S
payloads/libpayload/i386/main.c
payloads/libpayload/libpayload.ldscript

index e548329c6675037bc638a299926f0ff8671a4584..8dc31aa54dc9df3dacda49339b9c86108c2e0e8e 100644 (file)
@@ -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
index a167218ffc56d409dcc390a0359c3a6ee31fbc39..25e4de46d7838d3d5d744df9eba824a82ac7e83f 100644 (file)
 
 #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.
index 92ba2c05a82f77857c1162c2f6356aa2c6c1188c..7ae49e5808e802d926c7cb9fa4ecbf51d7a5f492 100644 (file)
@@ -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.*) }