Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2010-05-08T07:53:23Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
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/sun4v/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>
     
    5253#include <arch/drivers/niagara.h>
    5354
    54 bootinfo_t bootinfo;
     55memmap_t memmap;
    5556
    5657/** Perform sparc64-specific initialization before main_bsp() is called. */
    57 void arch_pre_main(void)
     58void arch_pre_main(bootinfo_t *bootinfo)
    5859{
    5960        /* Copy init task info. */
    60         init.cnt = bootinfo.taskmap.count;
     61        init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
    6162       
    62         uint32_t i;
    63 
    64         for (i = 0; i < bootinfo.taskmap.count; i++) {
    65                 init.tasks[i].addr = (uintptr_t) bootinfo.taskmap.tasks[i].addr;
    66                 init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
     63        size_t i;
     64        for (i = 0; i < init.cnt; i++) {
     65                init.tasks[i].addr = (uintptr_t) bootinfo->taskmap.tasks[i].addr;
     66                init.tasks[i].size = bootinfo->taskmap.tasks[i].size;
    6767                str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN,
    68                     bootinfo.taskmap.tasks[i].name);
     68                    bootinfo->taskmap.tasks[i].name);
    6969        }
    70 
     70       
     71        /* Copy physical memory map. */
     72        memmap.total = bootinfo->memmap.total;
     73        memmap.cnt = min(bootinfo->memmap.cnt, MEMMAP_MAX_RECORDS);
     74        for (i = 0; i < memmap.cnt; i++) {
     75                memmap.zones[i].start = bootinfo->memmap.zones[i].start;
     76                memmap.zones[i].size = bootinfo->memmap.zones[i].size;
     77        }
     78       
    7179        md_init();
    7280}
Note: See TracChangeset for help on using the changeset viewer.