- Timestamp:
- 2009-01-29T17:24:35Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 43d6401
- Parents:
- 26c67a8
- Location:
- boot
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ppc32/loader/main.c
r26c67a8 rf817d3a 90 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 … … 108 108 109 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 111 halt(); 112 112 } 113 113 114 114 if (bootinfo.memmap.total == 0) { 115 printf("Error: no memory detected, halting.\n");115 printf("Error: No memory detected, halting.\n"); 116 116 halt(); 117 117 } 118 118 119 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))123 printf("Warning: unable to get keyboardproperties.\n");122 if (!ofw_macio(&bootinfo.macio)) 123 printf("Warning: Unable to get macio properties.\n"); 124 124 125 printf("\nDevice statistics\n"); 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); 127 printf(" keyboard at %L (size %d bytes)\n", bootinfo.keyboard.addr, bootinfo.keyboard.size); 125 printf("Device statistics\n"); 126 127 if (bootinfo.screen.addr) 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) 131 printf(" macio at %L (size %d bytes)\n", bootinfo.macio.addr, bootinfo.macio.size); 128 132 129 133 void *real_mode_pa = ofw_translate(&real_mode); -
boot/arch/ppc32/loader/main.h
r26c67a8 rf817d3a 48 48 taskmap_t taskmap; 49 49 screen_t screen; 50 keyboard_t keyboard;50 macio_t macio; 51 51 } bootinfo_t; 52 52 -
boot/arch/ppc32/loader/ofwarch.c
r26c67a8 rf817d3a 49 49 } 50 50 51 int ofw_ keyboard(keyboard_t *keyboard)51 int ofw_macio(macio_t *macio) 52 52 { 53 53 char device_name[BUF_SIZE]; … … 55 55 if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0) 56 56 return false; 57 57 58 58 phandle device = ofw_find_device(device_name); 59 59 if (device == -1) 60 60 return false; 61 62 pci_reg_t macio;63 if (ofw_get_property(device, "assigned-addresses", & macio, sizeof(macio)) <= 0)61 62 pci_reg_t pci_reg; 63 if (ofw_get_property(device, "assigned-addresses", &pci_reg, sizeof(pci_reg)) <= 0) 64 64 return false; 65 keyboard->addr = (void *) macio.addr.addr_lo; 66 keyboard->size = macio.size_lo; 65 66 macio->addr = (void *) pci_reg.addr.addr_lo; 67 macio->size = pci_reg.size_lo; 67 68 68 69 return true; -
boot/genarch/ofw.h
r26c67a8 rf817d3a 75 75 void *addr; 76 76 uint32_t size; 77 } keyboard_t;77 } macio_t; 78 78 79 79 typedef struct { … … 123 123 extern int ofw_memmap(memmap_t *map); 124 124 extern int ofw_screen(screen_t *screen); 125 extern int ofw_ keyboard(keyboard_t *keyboard);125 extern int ofw_macio(macio_t *macio); 126 126 extern int setup_palette(void); 127 127 extern void ofw_quiesce(void);
Note:
See TracChangeset
for help on using the changeset viewer.