summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2011-08-31 09:48:52 -0400
committerRobert Morris <[email protected]>2011-08-31 09:48:52 -0400
commit15997d58497f4c716c227787acf9591439e5fe9c (patch)
treee3a14381f70030ec8034afb8450b7e8aef6c2af7
parent5c292b3d7167022e765c7228b0748cb50ab7d7f1 (diff)
downloadxv6-labs-15997d58497f4c716c227787acf9591439e5fe9c.tar.gz
xv6-labs-15997d58497f4c716c227787acf9591439e5fe9c.tar.bz2
xv6-labs-15997d58497f4c716c227787acf9591439e5fe9c.zip
move the kernel to 0x80000000
-rw-r--r--bootmain.c2
-rw-r--r--kernel.ld3
-rw-r--r--memlayout.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/bootmain.c b/bootmain.c
index 6c9f1ff..72f3927 100644
--- a/bootmain.c
+++ b/bootmain.c
@@ -43,7 +43,7 @@ bootmain(void)
// Call the entry point from the ELF header.
// Does not return!
- entry = (void(*)(void))(elf->entry & 0xFFFFFF);
+ entry = (void(*)(void))(elf->entry - KERNBASE);
entry();
}
diff --git a/kernel.ld b/kernel.ld
index 3726f4e..f13ba61 100644
--- a/kernel.ld
+++ b/kernel.ld
@@ -8,7 +8,8 @@ ENTRY(_start)
SECTIONS
{
/* Load the kernel at this address: "." means the current address */
- . = 0xF0100000;
+ /* Must be equal to KERNLINK */
+ . = 0x80100000;
.text : AT(0x100000) {
*(.text .stub .text.* .gnu.linkonce.t.*)
diff --git a/memlayout.h b/memlayout.h
index c2879b1..e155e07 100644
--- a/memlayout.h
+++ b/memlayout.h
@@ -5,7 +5,7 @@
#define DEVSPACE 0xFE000000 // Other devices are at high addresses
// 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
#ifndef __ASSEMBLER__