Browse Source

vga: save real mode interrupt vectors so realemu and vga can work

These can not be wiped out, graphics depends on them.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 3 years ago
parent
commit
7099f0ddb8
2 changed files with 5 additions and 5 deletions
  1. 0 5
      sys/src/9/amd64/entry.S
  2. 5 0
      sys/src/9/amd64/pamap.c

+ 0 - 5
sys/src/9/amd64/entry.S

@@ -80,11 +80,6 @@ start:
 	movl	%esi, %edi
 	rep stosl
 
-	// Zero the real mode IVT.
-	movl	$0, %edi
-	movl	$1024, %ecx
-	rep stosb
-
 	// We could zero the BSS here, but the loader does it for us.
 
 	// Set the stack and find the start of the page tables.

+ 5 - 0
sys/src/9/amd64/pamap.c

@@ -205,6 +205,11 @@ pamapinsert(u64 addr, usize size, int type)
 void
 pamapmerge(void)
 {
+	// real mode interrupt vectors etc.
+	// These *must* be preserved for realemu,
+	// and hence VESA, to work.
+	pamapinsert(0x0, 0x1000, PamKRDONLY);
+
 	// Extended BIOS Data Area
 	pamapinsert(0x80000, 0xA0000 - 0x80000, PamKRDWR);