[pcbios] Don't use "lret $2" to return from an interrupt
[people/lynusvaz/gpxe.git] / src / arch / i386 / firmware / pcbios / fakee820.c
index e171edf..552bf41 100644 (file)
@@ -63,6 +63,8 @@ void fake_e820 ( void ) {
                              "cmpl $0x534d4150, %%edx\n\t"
                              "jne 99f\n\t"
                              "pushaw\n\t"
+                             "movw %%sp, %%bp\n\t"
+                             "andb $~0x01, 22(%%bp)\n\t" /* Clear return CF */
                              "leaw e820map(%%bx), %%si\n\t"
                              "cs rep movsb\n\t"
                              "popaw\n\t"
@@ -73,8 +75,7 @@ void fake_e820 ( void ) {
                              "xorl %%ebx,%%ebx\n\t"
                              "\n1:\n\t"
                              "popfw\n\t"
-                             "clc\n\t"
-                             "lret $2\n\t"
+                             "iret\n\t"
                              "\n99:\n\t"
                              "popfw\n\t"
                              "ljmp *%%cs:real_int15_vector\n\t" )