Ignore:
Timestamp:
2010-05-08T07:53:23Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
051bc69a
Parents:
6c39a907 (diff), 1317380 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/sun4u/sparc64.c

    r6c39a907 r25a76ab8  
    3636#include <debug.h>
    3737#include <config.h>
     38#include <macros.h>
    3839#include <arch/trap/trap.h>
    3940#include <arch/console.h>
     
    5051#include <str.h>
    5152
    52 bootinfo_t bootinfo;
     53memmap_t memmap;
    5354
    5455/** Perform sparc64-specific initialization before main_bsp() is called. */
    55 void arch_pre_main(void)
     56void arch_pre_main(bootinfo_t *bootinfo)
    5657{
    5758        /* Copy init task info. */
    58         init.cnt = bootinfo.taskmap.count;
     59        init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
    5960       
    60         uint32_t i;
    61 
    62         for (i = 0; i < bootinfo.taskmap.count; i++) {
    63                 init.tasks[i].addr = (uintptr_t) bootinfo.taskmap.tasks[i].addr;
    64                 init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
     61        size_t i;
     62        for (i = 0; i < init.cnt; i++) {
     63                init.tasks[i].addr = (uintptr_t) bootinfo->taskmap.tasks[i].addr;
     64                init.tasks[i].size = bootinfo->taskmap.tasks[i].size;
    6565                str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN,
    66                     bootinfo.taskmap.tasks[i].name);
     66                    bootinfo->taskmap.tasks[i].name);
     67        }
     68       
     69        /* Copy physical memory map. */
     70        memmap.total = bootinfo->memmap.total;
     71        memmap.cnt = min(bootinfo->memmap.cnt, MEMMAP_MAX_RECORDS);
     72        for (i = 0; i < memmap.cnt; i++) {
     73                memmap.zones[i].start = bootinfo->memmap.zones[i].start;
     74                memmap.zones[i].size = bootinfo->memmap.zones[i].size;
    6775        }
    6876       
    6977        /* Copy boot allocations info. */
    70         ballocs.base = bootinfo.ballocs.base;
    71         ballocs.size = bootinfo.ballocs.size;
     78        ballocs.base = bootinfo->ballocs.base;
     79        ballocs.size = bootinfo->ballocs.size;
    7280       
    73         ofw_tree_init(bootinfo.ofw_root);
     81        ofw_tree_init(bootinfo->ofw_root);
    7482}
    7583
Note: See TracChangeset for help on using the changeset viewer.