Changes between Version 3 and Version 4 of boot_loader
- Timestamp:
- Nov 5, 2014, 4:36:31 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
boot_loader
v3 v4 1 = GIET_VM / Boot -Loader=1 = GIET_VM / Boot Procedure = 2 2 3 == __Phase 0 : Reset__ == 4 5 This phase is executed in case of hard reset : all processors execute the ''reset'' code (also called ''preloader'' code) stored in the external ROM. 6 Processor (0,0,0) load the GIET_VM boot-loader code from the external disk (or any other mass storage peripheral), to the physical memory of cluster(0,0). 7 This ''reset'' code is generic. It is entirely defined by the target hardware architecture, and can be used to boot any operating system. 8 All other processors initialize their private interrupt controller, to be able to receive an inter-processor interrupt (WTI), and enter ''wait_state'' in low-power mode. 9 10 == __Phase 1 : Boot__ == 11 12 In this this phase the GIET_VM boot-loader is executed by processor (0,0,0), while other processors are in wait state. 3 13 The GIET-VM boot-loader is defined in the [source:soft/giet_vm/giet_boot/boot.c boot.c] file. 4 5 The ''boot_init()'' function makes the initialisation in two steps: 6 7 == __Sequencial step__ == 8 9 The first step executed by proc[0][0][0], while other processors are in wait state. 14 The main steps are the following: 10 15 11 16 === void '''boot_pmem_init()''' === … … 23 28 on the cluster-coordinates: for the kernel code, a given virtual address is mapped to different physical addresses, depending on the cluster coordinates. 24 29 25 26 27 28 30 === '''boot_schedulers init()''' === 29 31 This function makes the schedulers initialisation, as specified in the mapping, with the following principles. … … 32 34 * The allocation of task to processors is fully static (no task migration). 33 35 * One single processor cannot schedule more than 14 tasks. 34 s One scheduler occupies 8 Kbytes. The user35 * Peripherals initialisation : ''boot_peripherals_init()''36 * Kernel & application code loading : ''boot_elf_load()'' 37 * Start all other processors 36 One scheduler occupies 8 Kbytes, and contains the contexts of all tasks allocated to the processor (256 bytes per task). 37 38 === '''boot_peripherals_init()''' === 39 This function makes the external peripherals and coprocessors initialisation. 38 40 39 == __Parallel step__ ==40 41 41 This second step is executed in parallel by all processors: 42 * CP0_SCHED register initialisation 43 * MMU Activation 44 * Status Register Initialisation (to use the GIET_VM exception handler). 45 * Jump to ''kernel_init()'' 42 === '''''boot_elf_load()''' === 43 This function load into memory the kernel code (''kernel.elf'' file), and the user code for all applications specified in the mapping. 44 45 46 Finally, processor(0,0,0) starts all other processors, using an inter-processor interrupt (WTI). 47 Each processor initializes its own CP0_SCHED register, its own CP2_MODE register to activates its MMU, its own CP0_SR register to use the GIET_VM exception handler, and jumps 48 to the ''kernel_init()'' function. 49 50 == __Phase 2__ == 51 52