summaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch/x86/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/arch/x86/head.S')
-rw-r--r--payloads/libpayload/arch/x86/head.S31
1 files changed, 4 insertions, 27 deletions
diff --git a/payloads/libpayload/arch/x86/head.S b/payloads/libpayload/arch/x86/head.S
index 2bac700bda..99842cd54b 100644
--- a/payloads/libpayload/arch/x86/head.S
+++ b/payloads/libpayload/arch/x86/head.S
@@ -38,36 +38,13 @@
* change anything.
*/
_entry:
- jmp _init
-
- .align 4
-
-#define MB_MAGIC 0x1BADB002
-#define MB_FLAGS 0x00010003
-
-mb_header:
- .long MB_MAGIC
- .long MB_FLAGS
- .long -(MB_MAGIC + MB_FLAGS)
- .long mb_header
- .long _start
- .long _edata
- .long _end
- .long _init
-
-/*
- * This function saves off the previous stack and switches us to our
- * own execution environment.
- */
-_init:
- /* No interrupts, please. */
- cli
+ /* Add multiboot header and jump around it when building with multiboot support. */
#if CONFIG(LP_MULTIBOOT)
- /* Store EAX and EBX */
- movl %eax, loader_eax
- movl %ebx, loader_ebx
+ #include "multiboot_header.inc"
#endif
+ /* No interrupts, please. */
+ cli
/* save pointer to coreboot tables */
movl 4(%esp), %eax