/* * file : boot_entry.S * date : 01/17/2014 * author : Cesar Fuguet & Alain Greiner & Hao Liu * * This file contains the boot_entry() function that is the entry * point for the GIET_VM bootloader. * It supports a generic multi-clusters / multi-processors architecture, * containing at most 1024 processors. * - The number of clusters is defined by the (X_SIZE,Y_SIZE) parameters * in the hard_config.h file (up to 256 clusters). * - The number of processors per cluster is defined by the NB_PROCS_MAX * parameter in the hard_config.h file (up to 4 processors per cluster). * * This assembly code is executed by all processors. * It initializes the stack pointer depending on the proc_id, * and using the SEG_BOOT_STACK_BASE and SEG_BOOT_STACK_SIZE * parameters defined in the hard_config.h file, and jumps * to the boot_init() fuction defined in the boot.c file. * * - each processor P[x,y,0] uses a larger stack: 1,25 Kbytes. * - Other processors use a smaller stack: 0,25 Kbytes. * => the SEG_BOOT_STACK_SIZE cannot be smaller than * 256 * (1024 + 256) + (1024 - 256) * 256 = 512 Kbytes */ #include "mips32_registers.h" #include "hard_config.h" .section .text,"ax",@progbits .globl boot_entry .ent boot_entry .align 2 .set noreorder boot_entry: /* The (x,y,lpid) values are obtained from the processor CP0 register, */ /* where proc_id == (((x<