From: Kevin O'Connor Date: Mon, 15 Mar 2010 23:58:55 +0000 (-0400) Subject: Restore segment limits in handle_1589 code. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=c35e1e50c389c6d63227e7f8d922cbcf4dea68aa;p=seabios.git Restore segment limits in handle_1589 code. Before transitioning back to real mode, the segment registers should be reloaded so that the hidden register limits are updated. --- diff --git a/src/system.c b/src/system.c index f3031af..898c3cc 100644 --- a/src/system.c +++ b/src/system.c @@ -143,6 +143,11 @@ handle_1587(struct bregs *regs) " xorw %%di, %%di\n" " rep movsw\n" + // Restore DS and ES segment limits to 0xffff + " movw $(5<<3), %%ax\n" // 5th descriptor in table (SS) + " movw %%ax, %%ds\n" + " movw %%ax, %%es\n" + // Disable protected mode " movl %%cr0, %%eax\n" " andl $~" __stringify(CR0_PE) ", %%eax\n"