Ignore:
File:
1 edited

Legend:

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

    r4872160 r19f857a  
    6565
    6666/** Performs ppc32-specific initialization before main_bsp() is called. */
    67 void arch_pre_main(bootinfo_t *bootinfo)
    68 {
    69         /* Copy tasks map. */
    70         init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
    71         size_t i;
    72         for (i = 0; i < init.cnt; i++) {
    73                 init.tasks[i].addr = (uintptr_t) bootinfo->taskmap.tasks[i].addr;
    74                 init.tasks[i].size = bootinfo->taskmap.tasks[i].size;
     67void arch_pre_main(void)
     68{
     69        init.cnt = bootinfo.taskmap.count;
     70       
     71        uint32_t i;
     72       
     73        for (i = 0; i < min3(bootinfo.taskmap.count, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) {
     74                init.tasks[i].addr = bootinfo.taskmap.tasks[i].addr;
     75                init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
    7576                str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN,
    76                     bootinfo->taskmap.tasks[i].name);
    77         }
    78        
    79         /* Copy physical memory map. */
    80         memmap.total = bootinfo->memmap.total;
    81         memmap.cnt = min(bootinfo->memmap.cnt, MEMMAP_MAX_RECORDS);
    82         for (i = 0; i < memmap.cnt; i++) {
    83                 memmap.zones[i].start = bootinfo->memmap.zones[i].start;
    84                 memmap.zones[i].size = bootinfo->memmap.zones[i].size;
     77                    bootinfo.taskmap.tasks[i].name);
    8578        }
    8679       
    8780        /* Copy boot allocations info. */
    88         ballocs.base = bootinfo->ballocs.base;
    89         ballocs.size = bootinfo->ballocs.size;
    90        
    91         /* Copy OFW tree. */
    92         ofw_tree_init(bootinfo->ofw_root);
     81        ballocs.base = bootinfo.ballocs.base;
     82        ballocs.size = bootinfo.ballocs.size;
     83       
     84        ofw_tree_init(bootinfo.ofw_root);
    9385}
    9486
Note: See TracChangeset for help on using the changeset viewer.