- printk ("Booting cnachos86...\n");
-
- /* 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 - 6);
- printk ("ram: detected %'d kB main memory.\n", ram_pages * 4);
-
- /* Memory from the end of the kernel through the end of memory
- is free. Give it to the page allocator. */
- palloc_init ((void *) (KERN_BASE + kernel_pages * PGSIZE),
- (void *) (PHYS_BASE + ram_pages * PGSIZE));
+
+ /* Greet user. */
+ printk ("Booting cnachos86 with %'d kB RAM...\n", ram_pages * 4);
+
+ /* Initialize memory system. */
+ palloc_init ();