X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Finit.c;h=54a98d256236eb54fa2ba1a515949285b10d8085;hb=8ed1dcfb47df08fa29070c8543453926cecdcd34;hp=234c41eb249c64def96f49d22d6775c3d3ee52ba;hpb=57da1efd4f622d93e33dfbd26ca2cd141744aaa2;p=pintos-anon diff --git a/src/threads/init.c b/src/threads/init.c index 234c41e..54a98d2 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -18,6 +18,7 @@ #include "vga.h" #ifdef FILESYS #include "filesys.h" +#include "disk.h" #endif /* Size of kernel static code and data, in 4 kB pages. */ @@ -32,7 +33,8 @@ void power_off (void); static void main_thread (void *aux UNUSED) { - printk ("execute=%d\n", (int) thread_execute ("a.out")); + disk_init (); + thread_execute ("a.out"); } int @@ -50,7 +52,7 @@ main (void) /* Calculate how much RAM the kernel uses, and find out from the bootloader how much RAM this machine has. */ kernel_pages = (&_end - &_text + 4095) / 4096; - ram_pages = *(uint32_t *) (0x7e00 - 8); + ram_pages = *(uint32_t *) (0x7e00 - 6); printk ("Initializing nachos-x86, %d kB RAM detected.\n", ram_pages * 4); @@ -71,7 +73,6 @@ main (void) #ifdef FILESYS filesys_init (false); - filesys_self_test (); #endif thread_init ();