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

[pcbios] Save/restore %es in INT 15,e820

Our INT 15,e820 code was setting %es=%ss (as part of the "look ahead
in the memory map" logic), but failing to restore %es afterwards.
This is a serious bug, but wasn't affecting many platforms because
almost all callers seem to set %es=%ss anyway.
tags/v0.9.5
Michael Brown преди 16 години
родител
ревизия
50dc9344b7
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2
    0
      src/arch/i386/firmware/pcbios/e820mangler.S

+ 2
- 0
src/arch/i386/firmware/pcbios/e820mangler.S Целия файл

@@ -436,6 +436,7 @@ get_mangled_e820:
436 436
 
437 437
 	/* Peek ahead to see if there are any further nonempty regions */
438 438
 	pushal
439
+	pushw	%es
439 440
 	subw	$20, %sp
440 441
 	movl	$0xe820, %eax
441 442
 	movl	$SMAP, %edx
@@ -445,6 +446,7 @@ get_mangled_e820:
445 446
 	movw	%sp, %di
446 447
 	call	get_nonempty_e820
447 448
 	addr32 leal 20(%esp), %esp /* avoid changing flags */
449
+	popw	%es
448 450
 	popal
449 451
 	jnc	99f /* There are further nonempty regions */
450 452
 

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