From 5348a94a6e7a16a070c502c29db30a08253a99a3 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Tue, 2 Sep 2014 14:53:09 +0200 Subject: Debugging paging problem on VirtualBox (VT-x) --- boot/mbr.asm | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'boot/mbr.asm') diff --git a/boot/mbr.asm b/boot/mbr.asm index 4ece914..ca851c3 100644 --- a/boot/mbr.asm +++ b/boot/mbr.asm @@ -61,7 +61,7 @@ jmp $ ;entry for other processors ;) BOOT_DRIVE: db 0xff STR_VERSION: - db "v0.4",0 + db "v0.5",0 VESA_CHECK1: db "1",0 VESA_CHECK2: @@ -145,17 +145,30 @@ boot_32_pm: ; ;http://www.brokenthorn.com/Resources/OSDev9.html ; ;Method 3.1: Enables A20 through keyboard controller ; ;Not all keyboard controllers support this -; ;todo: check if this has any effect at all !?!? - mov al, 0xdd ; command 0xdd: enable a20 -; ;mov al, 0xdf ; command 0xdf: disable a20 - out 0x64, al ; send command to controller +; ; does not work in virtual box (with VT-x accerleration?) - mov eax,0 -; +; mov al, 0xdd ; command 0xdd: enable a20 +; mov al, 0xdf ; command 0xdf: disable a20 +; out 0x64, al ; send command to controller + + ;Fast A20 Gate: + ;http://wiki.osdev.org/A20_Line + + in al, 0x92 + or al, 2 + out 0x92, al + + ; call kernel! + mov eax,0 ;booting processor call KERNEL_OFFSET ;jump into our Kernel! ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; + +;fill partition table (4x16byte) with zeroes. +;(otherwise my Acer Aspire will not boot) +times 64 db 0x0 + ;so we get identified as MBR times 510-($-$$) db 0x0 ;dw 0x0 -- cgit v1.2.3