Changeset 96e0748d in mainline for boot/arch/mips32/loader/main.c


Ignore:
Timestamp:
2009-02-17T22:47:27Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f89979b
Parents:
e662a5f
Message:

make arch_pre_main optional, don't force any specific prototype
simplify boot process
mips32: detect number of configured CPUs in msim

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/mips32/loader/main.c

    re662a5f r96e0748d  
    2929#include "main.h"
    3030#include <printf.h>
     31#include <align.h>
    3132#include <macros.h>
    3233#include "msim.h"
     
    7475       
    7576        printf("\nCopying components\n");
     77       
    7678        unsigned int top = 0;
    7779        bootinfo.cnt = 0;
    78         for (i = 0; i < COMPONENTS; i++) {
     80        for (i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) {
    7981                printf(" %s...", components[i].name);
    8082                top = ALIGN_UP(top, PAGE_SIZE);
     
    8991        }
    9092       
     93        unsigned int *cpumap = (unsigned int *) CPUMAP;
     94        bootinfo.cpumap = 0;
     95        for (i = 0; i < CPUMAP_MAX_RECORDS; i++) {
     96                if (cpumap[i] != 0)
     97                        bootinfo.cpumap |= (1 << i);
     98        }
     99       
    91100        printf("\nBooting the kernel...\n");
    92         jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo, sizeof(bootinfo));
     101        jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo);
    93102}
Note: See TracChangeset for help on using the changeset viewer.