set virtual offset to 0x0, kernel now runs in qemu / VirtualBox

git-svn-id: svn://anubis/hos/trunk@73 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
josh 2010-01-06 05:37:04 +00:00
parent f6e71b9891
commit 76ac4f88a4
3 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@
%define MULTIBOOT_HEADER_MAGIC 0x1BADB002 %define MULTIBOOT_HEADER_MAGIC 0x1BADB002
%define MULTIBOOT_HEADER_FLAGS 0x00000003 %define MULTIBOOT_HEADER_FLAGS 0x00000003
%define VIRTUAL_OFFSET 0xE0000000 ; kernel virtual addr %define VIRTUAL_OFFSET 0x00000000 ; kernel virtual addr
%define CONSOLE_MEMORY 0xB8000 %define CONSOLE_MEMORY 0xB8000
%define PAGE_SIZE 0x1000 ; 4KB pages %define PAGE_SIZE 0x1000 ; 4KB pages
@ -131,7 +131,7 @@ KERNEL_CODE_32_TMP_SEG equ $-gdt_tmp32 ; 8
db 0x00 ; base 23:16 db 0x00 ; base 23:16
db 0x9a ; access db 0x9a ; access
db 0xcf ; flags / limit 19:16 db 0xcf ; flags / limit 19:16
db 0x20 ; base 31:24 db 0x00 ; base 31:24
KERNEL_DATA_32_TMP_SEG equ $-gdt_tmp32 ; 16 KERNEL_DATA_32_TMP_SEG equ $-gdt_tmp32 ; 16
db 0xff ; limit 7:0 db 0xff ; limit 7:0
@ -141,6 +141,6 @@ KERNEL_DATA_32_TMP_SEG equ $-gdt_tmp32 ; 16
db 0x00 ; base 23:16 db 0x00 ; base 23:16
db 0x92 ; access db 0x92 ; access
db 0xcf ; flags / limit 19:16 db 0xcf ; flags / limit 19:16
db 0x20 ; base 31:24 db 0x00 ; base 31:24
gdt_end_tmp32: gdt_end_tmp32:

View File

@ -8,7 +8,7 @@
extern "C" { extern "C" {
#endif #endif
#define KERNEL_OFFSET 0xE0000000 #define KERNEL_OFFSET 0x00000000
#define PAGE_LOG_SIZE 12 #define PAGE_LOG_SIZE 12
#define PAGE_SIZE (1 << PAGE_LOG_SIZE) #define PAGE_SIZE (1 << PAGE_LOG_SIZE)

View File

@ -1,6 +1,6 @@
OUTPUT_FORMAT(elf32-i386) OUTPUT_FORMAT(elf32-i386)
ENTRY(start) ENTRY(start)
virt = 0xE0100000; virt = 0x00100000;
phys = 0x00100000; phys = 0x00100000;
SECTIONS SECTIONS
{ {