Rev 1896 | Rev 1899 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1896 | Rev 1897 | ||
---|---|---|---|
Line 55... | Line 55... | ||
55 | if (bootinfo.memmap.total == 0) { |
55 | if (bootinfo.memmap.total == 0) { |
56 | printf("Error: no memory detected, halting.\n"); |
56 | printf("Error: no memory detected, halting.\n"); |
57 | halt(); |
57 | halt(); |
58 | } |
58 | } |
59 | 59 | ||
60 | if (!ofw_screen(&bootinfo.screen)) { |
- | |
61 | printf("Error: unable to get screen properties, halting.\n"); |
- | |
62 | halt(); |
- | |
63 | } |
- | |
64 | bootinfo.screen.addr = ofw_translate(bootinfo.screen.addr); |
- | |
65 | /* transform scanline to bytes with respect to potential alignment */ |
- | |
66 | bootinfo.screen.scanline = bootinfo.screen.scanline*bpp2align[bootinfo.screen.bpp >> 3]; |
- | |
67 | - | ||
68 | if (!ofw_cpu(&bootinfo.cpu)) |
60 | if (!ofw_cpu(&bootinfo.cpu)) |
69 | printf("Error: unable to get cpu properties\n"); |
61 | printf("Error: unable to get cpu properties\n"); |
70 | 62 | ||
71 | printf("\nDevice statistics\n"); |
63 | printf("\nDevice info\n"); |
72 | printf(" cpu: %dMHz\n", bootinfo.cpu.clock_frequency/1000000); |
64 | printf(" cpu: %dMHz\n", bootinfo.cpu.clock_frequency/1000000); |
73 | printf(" memory: %dM\n", bootinfo.memmap.total>>20); |
65 | printf(" memory: %dM\n", bootinfo.memmap.total>>20); |
74 | printf(" screen at %P, resolution %dx%d, %d bpp (scanline %d bytes)\n", (uintptr_t) bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); |
- | |
75 | 66 | ||
76 | printf("\nMemory statistics\n"); |
67 | printf("\nMemory statistics\n"); |
77 | printf(" kernel entry point at %P\n", KERNEL_VIRTUAL_ADDRESS); |
68 | printf(" kernel entry point at %P\n", KERNEL_VIRTUAL_ADDRESS); |
78 | printf(" %P: boot info structure\n", &bootinfo); |
69 | printf(" %P: boot info structure\n", &bootinfo); |
79 | 70 |