Rev 971 | Rev 986 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 971 | Rev 981 | ||
---|---|---|---|
Line 50... | Line 50... | ||
50 | halt(); |
50 | halt(); |
51 | } |
51 | } |
52 | printf("total memory %d MB\n", memmap.total >> 20); |
52 | printf("total memory %d MB\n", memmap.total >> 20); |
53 | 53 | ||
54 | // FIXME: map just the kernel |
54 | // FIXME: map just the kernel |
55 | if (ofw_map((void *) KERNEL_PHYSICAL_ADDRESS, (void *) KERNEL_VIRTUAL_ADDRESS, memmap.total - 16 * 1024 * 1024, 0) != 0) { |
55 | if (ofw_map((void *) KERNEL_PHYSICAL_ADDRESS, (void *) KERNEL_VIRTUAL_ADDRESS, memmap.total - 64 * 1024 * 1024, 0) != 0) { |
56 | printf("Unable to map kernel memory at %L (physical %L)\n", KERNEL_VIRTUAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS); |
56 | printf("Unable to map kernel memory at %L (physical %L)\n", KERNEL_VIRTUAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS); |
57 | halt(); |
57 | halt(); |
58 | } |
58 | } |
59 | printf("kernel memory mapped at %L (physical %L, size %d bytes)\n", KERNEL_VIRTUAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS, KERNEL_SIZE); |
59 | printf("kernel memory mapped at %L (physical %L, size %d bytes)\n", KERNEL_VIRTUAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS, KERNEL_SIZE); |
60 | // FIXME: relocate the kernel in real mode |
60 | // FIXME: relocate the kernel in real mode |
61 | memcpy((void *) KERNEL_VIRTUAL_ADDRESS, KERNEL_START, KERNEL_SIZE); |
61 | memcpy((void *) KERNEL_VIRTUAL_ADDRESS, KERNEL_START, KERNEL_SIZE); |
62 | 62 | ||
63 | // FIXME: proper framebuffer mapping |
63 | // FIXME: proper hardware detection & mapping |
64 | ofw_map((void *) 0x84000000, (void *) 0xf0000000, 2 * 1024 * 1024, 0); |
64 | ofw_map((void *) 0x84000000, (void *) 0xf0000000, 0x01000000, 0); |
- | 65 | ofw_map((void *) 0x80816000, (void *) 0xf2000000, 0x00018000, 0); |
|
65 | 66 | ||
66 | printf("Booting the kernel...\n"); |
67 | printf("Booting the kernel...\n"); |
67 | 68 | ||
68 | flush_instruction_cache(); |
69 | flush_instruction_cache(); |
69 | jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, ofw_translate(&memmap)); |
70 | jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, ofw_translate(&memmap)); |