move the kernel to 0x80000000

This commit is contained in:
Robert Morris 2011-08-31 09:48:52 -04:00
parent 5c292b3d71
commit 15997d5849
3 changed files with 4 additions and 3 deletions

View file

@ -43,7 +43,7 @@ bootmain(void)
// Call the entry point from the ELF header. // Call the entry point from the ELF header.
// Does not return! // Does not return!
entry = (void(*)(void))(elf->entry & 0xFFFFFF); entry = (void(*)(void))(elf->entry - KERNBASE);
entry(); entry();
} }

View file

@ -8,7 +8,8 @@ ENTRY(_start)
SECTIONS SECTIONS
{ {
/* Load the kernel at this address: "." means the current address */ /* Load the kernel at this address: "." means the current address */
. = 0xF0100000; /* Must be equal to KERNLINK */
. = 0x80100000;
.text : AT(0x100000) { .text : AT(0x100000) {
*(.text .stub .text.* .gnu.linkonce.t.*) *(.text .stub .text.* .gnu.linkonce.t.*)

View file

@ -5,7 +5,7 @@
#define DEVSPACE 0xFE000000 // Other devices are at high addresses #define DEVSPACE 0xFE000000 // Other devices are at high addresses
// Key addresses for address space layout (see kmap in vm.c for the layout) // Key addresses for address space layout (see kmap in vm.c for the layout)
#define KERNBASE 0xF0000000 // First kernel virtual address #define KERNBASE 0x80000000 // First kernel virtual address
#define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked #define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__