Rev 3387 | Rev 3861 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3387 | Rev 3829 | ||
---|---|---|---|
Line 87... | Line 87... | ||
87 | #endif |
87 | #endif |
88 | 88 | ||
89 | /** Print version information. */ |
89 | /** Print version information. */ |
90 | static void version_print(void) |
90 | static void version_print(void) |
91 | { |
91 | { |
92 | printf("HelenOS PPC32 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp); |
92 | printf("HelenOS PPC32 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n\n", release, revision, timestamp); |
93 | } |
93 | } |
94 | 94 | ||
95 | void bootstrap(void) |
95 | void bootstrap(void) |
96 | { |
96 | { |
97 | version_print(); |
97 | version_print(); |
Line 105... | Line 105... | ||
105 | 105 | ||
106 | check_align(&real_mode, "bootstrap trampoline"); |
106 | check_align(&real_mode, "bootstrap trampoline"); |
107 | check_align(&trans, "translation table"); |
107 | check_align(&trans, "translation table"); |
108 | 108 | ||
109 | if (!ofw_memmap(&bootinfo.memmap)) { |
109 | if (!ofw_memmap(&bootinfo.memmap)) { |
110 | printf("Error: unable to get memory map, halting.\n"); |
110 | printf("Error: Unable to get memory map, halting.\n"); |
111 | halt(); |
111 | halt(); |
112 | } |
112 | } |
113 | 113 | ||
114 | if (bootinfo.memmap.total == 0) { |
114 | if (bootinfo.memmap.total == 0) { |
115 | printf("Error: no memory detected, halting.\n"); |
115 | printf("Error: No memory detected, halting.\n"); |
116 | halt(); |
116 | halt(); |
117 | } |
117 | } |
118 | 118 | ||
119 | if (!ofw_screen(&bootinfo.screen)) |
119 | if (!ofw_screen(&bootinfo.screen)) |
120 | printf("Warning: unable to get screen properties.\n"); |
120 | printf("Warning: Unable to get screen properties.\n"); |
121 | 121 | ||
122 | if (!ofw_keyboard(&bootinfo.keyboard)) |
122 | if (!ofw_macio(&bootinfo.macio)) |
123 | printf("Warning: unable to get keyboard properties.\n"); |
123 | printf("Warning: Unable to get macio properties.\n"); |
124 | 124 | ||
125 | printf("\nDevice statistics\n"); |
125 | printf("Device statistics\n"); |
- | 126 | ||
- | 127 | if (bootinfo.screen.addr) |
|
126 | printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); |
128 | printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); |
- | 129 | ||
- | 130 | if (bootinfo.macio.addr) |
|
127 | printf(" keyboard at %L (size %d bytes)\n", bootinfo.keyboard.addr, bootinfo.keyboard.size); |
131 | printf(" macio at %L (size %d bytes)\n", bootinfo.macio.addr, bootinfo.macio.size); |
128 | 132 | ||
129 | void *real_mode_pa = ofw_translate(&real_mode); |
133 | void *real_mode_pa = ofw_translate(&real_mode); |
130 | void *trans_pa = ofw_translate(&trans); |
134 | void *trans_pa = ofw_translate(&trans); |
131 | void *bootinfo_pa = ofw_translate(&bootinfo); |
135 | void *bootinfo_pa = ofw_translate(&bootinfo); |
132 | 136 |