Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/ppc32.c

    r1b20da0 ra35b458  
    9191                    bootinfo->taskmap.tasks[i].name);
    9292        }
    93        
     93
    9494        /* Copy physical memory map. */
    9595        memmap.total = bootinfo->memmap.total;
     
    9999                memmap.zones[i].size = bootinfo->memmap.zones[i].size;
    100100        }
    101        
     101
    102102        /* Copy boot allocations info. */
    103103        ballocs.base = bootinfo->ballocs.base;
    104104        ballocs.size = bootinfo->ballocs.size;
    105        
     105
    106106        /* Copy OFW tree. */
    107107        ofw_tree_init(bootinfo->ofw_root);
     
    112112        /* Initialize dispatch table */
    113113        interrupt_init();
    114        
     114
    115115        ofw_tree_node_t *cpus_node;
    116116        ofw_tree_node_t *cpu_node;
     
    144144        uint32_t fb_scanline = 0;
    145145        unsigned int visual = VISUAL_UNKNOWN;
    146        
     146
    147147        ofw_tree_property_t *prop = ofw_tree_getprop(node, "address");
    148148        if ((prop) && (prop->value))
    149149                fb_addr = *((uintptr_t *) prop->value);
    150        
     150
    151151        prop = ofw_tree_getprop(node, "width");
    152152        if ((prop) && (prop->value))
    153153                fb_width = *((uint32_t *) prop->value);
    154        
     154
    155155        prop = ofw_tree_getprop(node, "height");
    156156        if ((prop) && (prop->value))
    157157                fb_height = *((uint32_t *) prop->value);
    158        
     158
    159159        prop = ofw_tree_getprop(node, "depth");
    160160        if ((prop) && (prop->value)) {
     
    180180                }
    181181        }
    182        
     182
    183183        prop = ofw_tree_getprop(node, "linebytes");
    184184        if ((prop) && (prop->value))
    185185                fb_scanline = *((uint32_t *) prop->value);
    186        
     186
    187187        if ((fb_addr) && (fb_width > 0) && (fb_height > 0)
    188188            && (fb_scanline > 0) && (visual != VISUAL_UNKNOWN)) {
     
    195195                        .visual = visual,
    196196                };
    197                
     197
    198198                outdev_t *fbdev = fb_init(&fb_prop);
    199199                if (fbdev)
    200200                        stdout_wire(fbdev);
    201201        }
    202        
     202
    203203        return true;
    204204}
     
    213213                /* Map OFW information into sysinfo */
    214214                ofw_sysinfo_map();
    215                
     215
    216216                /* Initialize IRQ routing */
    217217                irq_init(IRQ_COUNT, IRQ_COUNT);
    218                
     218
    219219                /* Merge all zones to 1 big zone */
    220220                zone_merge_all();
     
    225225{
    226226        ofw_pci_reg_t *assigned_address = NULL;
    227        
     227
    228228        ofw_tree_property_t *prop = ofw_tree_getprop(node, "assigned-addresses");
    229229        if ((prop) && (prop->value))
    230230                assigned_address = ((ofw_pci_reg_t *) prop->value);
    231        
     231
    232232        if (assigned_address) {
    233233                /* Initialize PIC */
    234234                pic_init(assigned_address[0].addr, PAGE_SIZE, &pic_cir,
    235235                    &pic_cir_arg);
    236                
     236
    237237#ifdef CONFIG_MAC_KBD
    238238                uintptr_t pa = assigned_address[0].addr + 0x16000;
     
    240240                size_t offset = pa - aligned_addr;
    241241                size_t size = 2 * PAGE_SIZE;
    242                
     242
    243243                cuda_t *cuda = (cuda_t *) (km_map(aligned_addr, offset + size,
    244244                    PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset);
    245                
     245
    246246                /* Initialize I/O controller */
    247247                cuda_instance_t *cuda_instance =
     
    256256                        }
    257257                }
    258                
     258
    259259                /*
    260260                 * This is the necessary evil until the userspace driver is entirely
     
    266266#endif
    267267        }
    268        
     268
    269269        /* Consider only a single device for now */
    270270        return false;
     
    299299            kernel_uarg->uspace_stack_size - SP_DELTA,
    300300            (uintptr_t) kernel_uarg->uspace_entry);
    301        
     301
    302302        /* Unreachable */
    303303        while (true);
Note: See TracChangeset for help on using the changeset viewer.