summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <[email protected]>2010-09-15 16:15:07 -0400
committerAustin Clements <[email protected]>2010-09-15 16:15:07 -0400
commit4c274cef7425614e328eb2127362d36b203543a8 (patch)
treeecba606b2bb63b3169d47f7a9b10382b59b9d66f
parentfaad047ab22cbe989c208bff5ecb42608ecb8d7b (diff)
downloadxv6-labs-4c274cef7425614e328eb2127362d36b203543a8.tar.gz
xv6-labs-4c274cef7425614e328eb2127362d36b203543a8.tar.bz2
xv6-labs-4c274cef7425614e328eb2127362d36b203543a8.zip
Simplify boot loader by removing some JOS'isms
-rw-r--r--bootmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootmain.c b/bootmain.c
index 14f4ff3..f67f8fa 100644
--- a/bootmain.c
+++ b/bootmain.c
@@ -34,7 +34,7 @@ bootmain(void)
ph = (struct proghdr*)((uchar*)elf + elf->phoff);
eph = ph + elf->phnum;
for(; ph < eph; ph++) {
- va = (uchar*)(ph->va & 0xFFFFFF);
+ va = (uchar*)ph->va;
readseg(va, ph->filesz, ph->offset);
if(ph->memsz > ph->filesz)
stosb(va + ph->filesz, 0, ph->memsz - ph->filesz);
@@ -42,7 +42,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);
entry();
}