Changes between Version 9 and Version 10 of boot_loader
- Timestamp:
- Nov 5, 2014, 6:06:14 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
boot_loader
v9 v10 1 1 = GIET_VM / Boot Procedure = 2 2 3 The system boot is done in three phases. 3 The boot procedure is done in three steps: 4 * 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. 5 * The ''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. 6 * Finally, the ''kernel_init()'' function is executed by all processors, and completes the kernel initialisation.The system boot is done in three phases. 4 7 5 == __ Phase1 : Reset Initialization__ ==8 == __Step 1 : Reset Initialization__ == 6 9 7 This phase is executed in case of hard reset: all processors execute the ''reset'' code (also called ''preloader'' code) stored in the external ROM, 8 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. 10 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. 9 11 * 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). 10 12 * 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. 11 13 12 == __ Phase2 : Boot Initialization__ ==14 == __Step 2 : Boot Initialization__ == 13 15 14 In this this phase the GIET_VM boot-loader is executed by processor (0,0,0), while other processors are in wait state.16 The GIET_VM boot-loader is executed by processor (0,0,0), while other processors are in wait state. 15 17 The GIET-VM boot-loader is defined in the [source:soft/giet_vm/giet_boot/boot.c boot.c] file. 16 18 The main steps are the following: … … 48 50 to the ''kernel_init()'' function. 49 51 50 == __ Phase3 : Kernel Initialization__ ==52 == __Step 3 : Kernel Initialization__ == 51 53 52 This phase is executed by all processors in parallel. All processors enter the same [source:soft/giet_vm/giet_kernel/kernel_init.c kernel_init()] function. 53 The main steps are the following: 54 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()] function that makes the following actions: 54 55 55 * Step 1 : each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[] array initialisation56 * step2 : each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts.57 * step3 : each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors.58 * step 4 : each processor starts its TICK timer if it has at least at least one task allocated59 * step5 : each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC).60 * 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 code56 .1 : each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[] array initialisation. 57 .2 : each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts. 58 .3 : each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors. 59 .4 : each processor starts its TICK timer if it has at least at least one task allocated. 60 .5 : each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC). 61 .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. 61 62 62 63