Преглед на файлове

[liba20] Preserve all non-segment registers when calling INT 15,2401

Some BIOSes are reported to corrupt %ebx when using INT 15,2401 (see
http://opensolaris.org/jive/thread.jspa?messageID=377026).  Guard
against this by preserving all (non-segment) registers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown преди 12 години
родител
ревизия
c77aece36a
променени са 1 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 6
    3
      src/arch/i386/transitions/liba20.S

+ 6
- 3
src/arch/i386/transitions/liba20.S Целия файл

96
 	.section ".text16.early", "awx", @progbits
96
 	.section ".text16.early", "awx", @progbits
97
 	.code16
97
 	.code16
98
 enable_a20_bios:
98
 enable_a20_bios:
99
-	/* Preserve registers */
100
-	pushw	%ax
99
+
100
+	/* Preserve registers.  Be very paranoid, since some BIOSes
101
+	 * are reported to clobber %ebx
102
+	 */
103
+	pushal
101
 
104
 
102
 	/* Attempt INT 15,2401 */
105
 	/* Attempt INT 15,2401 */
103
 	movw	$0x2401, %ax
106
 	movw	$0x2401, %ax
108
 	call	test_a20_short
111
 	call	test_a20_short
109
 
112
 
110
 99:	/* Restore registers and return */
113
 99:	/* Restore registers and return */
111
-	popw	%ax
114
+	popal
112
 	ret
115
 	ret
113
 	.size	enable_a20_bios, . - enable_a20_bios
116
 	.size	enable_a20_bios, . - enable_a20_bios
114
 
117
 

Loading…
Отказ
Запис