Changes between Version 13 and Version 14 of boot_loader
- Timestamp:
- Dec 7, 2014, 9:46:20 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
boot_loader
v13 v14 4 4 5 5 The boot procedure is done in three steps: 6 * The generic ''reset'' code (hard-coded in the external ROM) is executed by processor (0,0,0), and load the ''boot-loader'' code from the hard disk to the physical memory.6 * The generic ''reset'' code (hard-coded in the external ROM) is executed by processor (0,0,0), and load the GIRT_VM ''boot-loader'' code from the hard disk to the physical memory. 7 7 * The GIET_VM ''boot-loader'' is executed by processor (0,0,0). It load the ''map.bin'' file, build the page tables, initializes the schedulers as specified in the mapping, initializes the peripherals, and load the kernel code, as well as the user application(s) code into memory. 8 8 * Finally, the GIET_VM ''kernel_init()'' function is executed by all processors, and completes the kernel initialisation.The system boot is done in three phases. 9 9 10 == __ Step1 : Reset Initialization__ ==10 == __Phase 1 : Reset Initialization__ == 11 11 12 12 In case of hard reset, all processors execute the same ''reset'' code (also called ''preloader'' code) stored in the external ROM, but the work done depends on the processor global index. This ''reset'' code is generic. It is entirely defined by the target hardware architecture, and can be used to boot any operating system. … … 14 14 * 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. 15 15 16 == __ Step2 : Boot Initialization__ ==16 == __Phase 2 : Boot Initialization__ == 17 17 18 18 The GIET_VM boot-loader is executed by processor (0,0,0), while other processors are in wait state. … … 52 52 to the ''kernel_init()'' function. 53 53 54 == __ Step3 : Kernel Initialization__ ==54 == __Phase 3 : Kernel Initialization__ == 55 55 56 This code is executed by all processors in parallel. All processors enter the same [source:soft/giet_vm/giet_kernel/kernel_init.c kernel_init()] functionthat makes the following actions:56 This code is executed by all processors, but sequencially. All processors enter the same [source:soft/giet_vm/giet_kernel/kernel_init.c kernel_init.c] code that makes the following actions: 57 57 58 1. each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[] array initialisation. 59 2. each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts. 60 3. each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors. 61 4. each processor starts its TICK timer if it has at least at least one task allocated. 62 5. each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC). 63 6. when all processors reach the synchronisation barrier, each processor set registers SP, SR, PTPR, EPC, with the values corresponding to the first allocated task, and jump to user code. 58 * step 0 : processor(0][0][0] makes kernel_heap[x][y] array and kernel fat initialisation. 59 * step 1 : each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[x][y][p] array initialisation. 60 * step 2 : each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts. 61 * step 3 : each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors. 62 * step 4 : each processor starts its TICK timer if it has at least one task allocated. 63 * step 5 : each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC). 64 * step 6 : when all processors reach the synchronisation barrier, each processor set registers SP, SR, PTPR, EPC, with the values corresponding to the first allocated task, and jump to user code. 64 65 65 66