Changes in kernel/arch/ppc32/src/ppc32.c [1b20da0:a35b458] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/ppc32.c
r1b20da0 ra35b458 91 91 bootinfo->taskmap.tasks[i].name); 92 92 } 93 93 94 94 /* Copy physical memory map. */ 95 95 memmap.total = bootinfo->memmap.total; … … 99 99 memmap.zones[i].size = bootinfo->memmap.zones[i].size; 100 100 } 101 101 102 102 /* Copy boot allocations info. */ 103 103 ballocs.base = bootinfo->ballocs.base; 104 104 ballocs.size = bootinfo->ballocs.size; 105 105 106 106 /* Copy OFW tree. */ 107 107 ofw_tree_init(bootinfo->ofw_root); … … 112 112 /* Initialize dispatch table */ 113 113 interrupt_init(); 114 114 115 115 ofw_tree_node_t *cpus_node; 116 116 ofw_tree_node_t *cpu_node; … … 144 144 uint32_t fb_scanline = 0; 145 145 unsigned int visual = VISUAL_UNKNOWN; 146 146 147 147 ofw_tree_property_t *prop = ofw_tree_getprop(node, "address"); 148 148 if ((prop) && (prop->value)) 149 149 fb_addr = *((uintptr_t *) prop->value); 150 150 151 151 prop = ofw_tree_getprop(node, "width"); 152 152 if ((prop) && (prop->value)) 153 153 fb_width = *((uint32_t *) prop->value); 154 154 155 155 prop = ofw_tree_getprop(node, "height"); 156 156 if ((prop) && (prop->value)) 157 157 fb_height = *((uint32_t *) prop->value); 158 158 159 159 prop = ofw_tree_getprop(node, "depth"); 160 160 if ((prop) && (prop->value)) { … … 180 180 } 181 181 } 182 182 183 183 prop = ofw_tree_getprop(node, "linebytes"); 184 184 if ((prop) && (prop->value)) 185 185 fb_scanline = *((uint32_t *) prop->value); 186 186 187 187 if ((fb_addr) && (fb_width > 0) && (fb_height > 0) 188 188 && (fb_scanline > 0) && (visual != VISUAL_UNKNOWN)) { … … 195 195 .visual = visual, 196 196 }; 197 197 198 198 outdev_t *fbdev = fb_init(&fb_prop); 199 199 if (fbdev) 200 200 stdout_wire(fbdev); 201 201 } 202 202 203 203 return true; 204 204 } … … 213 213 /* Map OFW information into sysinfo */ 214 214 ofw_sysinfo_map(); 215 215 216 216 /* Initialize IRQ routing */ 217 217 irq_init(IRQ_COUNT, IRQ_COUNT); 218 218 219 219 /* Merge all zones to 1 big zone */ 220 220 zone_merge_all(); … … 225 225 { 226 226 ofw_pci_reg_t *assigned_address = NULL; 227 227 228 228 ofw_tree_property_t *prop = ofw_tree_getprop(node, "assigned-addresses"); 229 229 if ((prop) && (prop->value)) 230 230 assigned_address = ((ofw_pci_reg_t *) prop->value); 231 231 232 232 if (assigned_address) { 233 233 /* Initialize PIC */ 234 234 pic_init(assigned_address[0].addr, PAGE_SIZE, &pic_cir, 235 235 &pic_cir_arg); 236 236 237 237 #ifdef CONFIG_MAC_KBD 238 238 uintptr_t pa = assigned_address[0].addr + 0x16000; … … 240 240 size_t offset = pa - aligned_addr; 241 241 size_t size = 2 * PAGE_SIZE; 242 242 243 243 cuda_t *cuda = (cuda_t *) (km_map(aligned_addr, offset + size, 244 244 PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset); 245 245 246 246 /* Initialize I/O controller */ 247 247 cuda_instance_t *cuda_instance = … … 256 256 } 257 257 } 258 258 259 259 /* 260 260 * This is the necessary evil until the userspace driver is entirely … … 266 266 #endif 267 267 } 268 268 269 269 /* Consider only a single device for now */ 270 270 return false; … … 299 299 kernel_uarg->uspace_stack_size - SP_DELTA, 300 300 (uintptr_t) kernel_uarg->uspace_entry); 301 301 302 302 /* Unreachable */ 303 303 while (true);
Note:
See TracChangeset
for help on using the changeset viewer.