diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/main.c | 2 | ||||
-rw-r--r-- | kernel/memlayout.h | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/kernel/main.c b/kernel/main.c index efdf277..077f645 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -26,10 +26,12 @@ main() fileinit(); // file table virtio_disk_init(); // emulated hard disk userinit(); // first user process + __sync_synchronize(); started = 1; } else { while(started == 0) ; + __sync_synchronize(); printf("hart %d starting\n", cpuid()); kvminithart(); // turn on paging trapinithart(); // install kernel trap vector diff --git a/kernel/memlayout.h b/kernel/memlayout.h index fdfeab7..8ffd538 100644 --- a/kernel/memlayout.h +++ b/kernel/memlayout.h @@ -10,7 +10,6 @@ // 10001000 -- virtio disk // 80000000 -- boot ROM jumps here in machine mode // -kernel loads the kernel here -// 88000000 -- -initrd fs.img ramdisk image. // unused RAM after 80000000. // the kernel uses physical memory thus: @@ -42,8 +41,6 @@ #define PLIC_MCLAIM(hart) (PLIC + 0x200004 + (hart)*0x2000) #define PLIC_SCLAIM(hart) (PLIC + 0x201004 + (hart)*0x2000) -#define RAMDISK 0x88000000L - // the kernel expects there to be RAM // for use by the kernel and user pages // from physical address 0x80000000 to PHYSTOP. |