Changes between Version 21 and Version 22 of boot_loader
- Timestamp:
- Mar 21, 2015, 12:39:47 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
boot_loader
v21 v22 10 10 == Phase 1 : Reset Initialization == 11 11 12 After 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:12 After hard reset, all processors execute the same ''reset'' code (also called ''preloader'' code) stored in the external ROM. The work done depends on the processor global index: 13 13 * Processor P(0,0,0) load the GIET_VM boot-loader code from the external disk (or another bootable peripheral), to the physical memory bank in cluster(0,0): segments seg_boot_code and seg_boot_data. 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. … … 42 42 In each cluster(x,y), processor P(x,y,0) makes the schedulers initialization for all processors in the cluster (function '''boot_schedulers init()''') as specified in the mapping: 43 43 * There is one scheduler per processor. 44 * The HWI, PTI, WTI interrupts vectors are initialised. 45 * The local IRQs routing (defined by the XCU masks) is statically defined. 44 46 * Any task defined in any application can be allocated to any processor. 45 47 * The allocation of task to processors is fully static (no task migration). 46 48 * One single processor cannot schedule more than 14 tasks. 47 49 * One scheduler occupies 8 Kbytes, and contains the contexts of all tasks allocated to the processor (256 bytes per task). 48 50 49 51 === step 5 === … … 56 58 == Phase 3 : Kernel Initialisation == 57 59 58 This code is executed in parallel by all processors P(x,y,p). All processors enter the same [source:soft/giet_vm/giet_kernel/kernel_init.c kernel_init.c] code and execute the following steps, separated 59 by synchronization barriers when required.60 This code is executed in parallel by all processors P(x,y,p). All processors enter the same [source:soft/giet_vm/giet_kernel/kernel_init.c kernel_init.c] code and execute the following steps, separated by synchronization barriers. Step 0 is done by processor P(0,0,0) only, 61 others steps are done by all processors in parallel. 60 62 61 63 === step 0 === 62 Processor P(0,0,0) makes kernel_heap[x][y] array, kernel fat initialization,TTY0 lock initialization, and barrier initialization.64 Processor P(0,0,0) makes kernel_heap[x][y] array, TTY0 lock initialization, and barrier initialization. 63 65 64 66 === step 1 === … … 66 68 67 69 === step 2 === 68 Each processor P(x,y,p) loops on all allocated tasks to build the _ptabs_vaddr[vspace] & _ptabs_ptprs[vspace] arrays from the tasks contexts. 70 Each processor P(x,y,p) loops on all allocated tasks to build the _ptabs_vaddr[vspace] & _ptabs_ptprs[vspace] arrays from the tasks contexts, 71 and to complete the tasks contexts initialization (CTX_RA and CTS_EPC slots). 69 72 70 73 === step 3 === 71 Each processor P(x,y,p) comp utes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors.74 Each processor P(x,y,p) completes its private idle_task context. Each processor P(x,y,p) starts its TICK timer if it has at least one task allocated. Processor P(0,0,0) initializes the kernel FAT. 72 75 73 === step 4 === 74 Each processor P(x,y,p) starts its TICK timer if it has at least one task allocated. 75 76 === step 5 === 77 Each processor updates its private idle_task context (CTX_SP, CTX_RA, CTX_EPC). 78 79 === step 6 === 76 === step 4 === 80 77 Each processor P(x,y,p) set registers SP, SR, PTPR, EPC, with the values corresponding to the first allocated task, and jump to user code. 81 78