Changeset 4872160 in mainline for kernel/arch/ppc32/src/ppc32.c


Ignore:
Timestamp:
2010-05-04T10:44:55Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
568db0f
Parents:
bb252ca
Message:

new boot infrastructure

  • more code and metadata unification
  • import of up-to-date implementations from the kernel
  • the boot loaders should behave more similarly on all platforms
  • support for deflate compressed (LZ77) boot components
    • this again allows feasible boot images to be created on mips32
  • IA64 is still not booting
    • the broken forked GNU EFI library has been removed, a replacement of the functionality is on its way
File:
1 edited

Legend:

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

    rbb252ca r4872160  
    6565
    6666/** Performs ppc32-specific initialization before main_bsp() is called. */
    67 void 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;
     67void 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;
    7675                str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN,
    77                     bootinfo.taskmap.tasks[i].name);
     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;
    7885        }
    7986       
    8087        /* Copy boot allocations info. */
    81         ballocs.base = bootinfo.ballocs.base;
    82         ballocs.size = bootinfo.ballocs.size;
    83        
    84         ofw_tree_init(bootinfo.ofw_root);
     88        ballocs.base = bootinfo->ballocs.base;
     89        ballocs.size = bootinfo->ballocs.size;
     90       
     91        /* Copy OFW tree. */
     92        ofw_tree_init(bootinfo->ofw_root);
    8593}
    8694
Note: See TracChangeset for help on using the changeset viewer.