Changeset 96e0748d in mainline for kernel/arch/ppc32


Ignore:
Timestamp:
2009-02-17T22:47:27Z (17 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

Location:
kernel/arch/ppc32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/include/arch.h

    re662a5f r96e0748d  
    2727 */
    2828
    29 /** @addtogroup ppc32   
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
     
    3636#define KERN_ppc32_ARCH_H_
    3737
    38 #include <arch/drivers/cuda.h>
     38extern void arch_pre_main(void);
    3939
    4040#endif
  • kernel/arch/ppc32/include/boot/boot.h

    re662a5f r96e0748d  
    2727 */
    2828
    29 /** @addtogroup ppc32   
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
     
    3636#define KERN_ppc32_BOOT_H_
    3737
    38 #define BOOT_OFFSET             0x8000
     38#define BOOT_OFFSET  0x8000
    3939
    4040/* Temporary stack size for boot process */
    41 #define TEMP_STACK_SIZE 0x1000
     41#define TEMP_STACK_SIZE  0x1000
    4242
    43 #define TASKMAP_MAX_RECORDS 32
    44 #define MEMMAP_MAX_RECORDS 32
     43#define TASKMAP_MAX_RECORDS  32
     44#define MEMMAP_MAX_RECORDS   32
    4545
    4646#ifndef __ASM__
  • kernel/arch/ppc32/src/boot/boot.S

    re662a5f r96e0748d  
    3434.global kernel_image_start
    3535kernel_image_start:
    36 
     36       
    3737        # load temporal kernel stack
    3838       
     
    5353       
    5454        addis r3, r3, 0x8000
    55 
     55       
    5656        lis r31, bootinfo@ha
    5757        addi r31, r31, bootinfo@l  # r31 = bootinfo
  • kernel/arch/ppc32/src/ppc32.c

    re662a5f r96e0748d  
    4646#include <ddi/irq.h>
    4747#include <arch/drivers/pic.h>
     48#include <macros.h>
    4849
    49 #define IRQ_COUNT       64
     50#define IRQ_COUNT  64
    5051
    5152bootinfo_t bootinfo;
     
    5354void arch_pre_main(void)
    5455{
    55         /* Setup usermode */
    5656        init.cnt = bootinfo.taskmap.count;
    5757       
    5858        uint32_t i;
    5959       
    60         for (i = 0; i < bootinfo.taskmap.count; i++) {
     60        for (i = 0; i < min3(bootinfo.taskmap.count, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) {
    6161                init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr);
    6262                init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
Note: See TracChangeset for help on using the changeset viewer.