Author: uwe Date: 2008-04-05 03:07:27 +0200 (Sat, 05 Apr 2008) New Revision: 3217
Modified: trunk/payloads/libpayload/i386/head.S trunk/payloads/libpayload/i386/main.c trunk/payloads/libpayload/libpayload.ldscript Log: 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
Modified: trunk/payloads/libpayload/i386/head.S =================================================================== --- trunk/payloads/libpayload/i386/head.S 2008-04-04 16:49:09 UTC (rev 3216) +++ trunk/payloads/libpayload/i386/head.S 2008-04-05 01:07:27 UTC (rev 3217) @@ -54,9 +54,9 @@ movl %esp, %esi
/* Setup new stack. */ - movl _istack, %ebx + movl $_stack, %ebx
- movl (%ebx), %esp + movl %ebx, %esp
/* Save old stack pointer. */ pushl %esi
Modified: trunk/payloads/libpayload/i386/main.c =================================================================== --- trunk/payloads/libpayload/i386/main.c 2008-04-04 16:49:09 UTC (rev 3216) +++ trunk/payloads/libpayload/i386/main.c 2008-04-05 01:07:27 UTC (rev 3217) @@ -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.
Modified: trunk/payloads/libpayload/libpayload.ldscript =================================================================== --- trunk/payloads/libpayload/libpayload.ldscript 2008-04-04 16:49:09 UTC (rev 3216) +++ trunk/payloads/libpayload/libpayload.ldscript 2008-04-05 01:07:27 UTC (rev 3217) @@ -73,17 +73,12 @@ . = 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.*) }