Last active
December 17, 2015 23:49
-
-
Save robinsmidsrod/5691673 to your computer and use it in GitHub Desktop.
Workaround patch to iPXE for gcc 4.8 - allows you to compile, but is not an optimal solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/arch/i386/interface/pxe/pxe_call.c b/src/arch/i386/interface/pxe/pxe_call.c | |
index 7fce75a..2ad3e77 100644 | |
--- a/src/arch/i386/interface/pxe/pxe_call.c | |
+++ b/src/arch/i386/interface/pxe/pxe_call.c | |
@@ -271,12 +271,14 @@ int pxe_start_nbp ( void ) { | |
DBG ( "Restarting NBP (%x)\n", jmp ); | |
/* Far call to PXE NBP */ | |
- __asm__ __volatile__ ( REAL_CODE ( "movw %%cx, %%es\n\t" | |
+ __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t" | |
+ "movw %%cx, %%es\n\t" | |
"pushw %%es\n\t" | |
"pushw %%di\n\t" | |
"sti\n\t" | |
"lcall $0, $0x7c00\n\t" | |
- "addw $4, %%sp\n\t" ) | |
+ "addw $4, %%sp\n\t" | |
+ "popl %%ebp\n\t") | |
: "=a" ( status ), "=b" ( discard_b ), | |
"=c" ( discard_c ), "=d" ( discard_d ), | |
"=D" ( discard_D ) | |
@@ -284,7 +286,7 @@ int pxe_start_nbp ( void ) { | |
"c" ( rm_cs ), | |
"d" ( virt_to_phys ( &pxenv ) ), | |
"D" ( __from_text16 ( &ppxe ) ) | |
- : "esi", "ebp", "memory" ); | |
+ : "esi", "memory" ); | |
if ( status ) | |
return -EPXENBP ( status ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment