7 | | * The GIET_VM boot-loader is executed in parallel by all processors (x,y,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. |
| 7 | * The GIET_VM boot-loader is executed in parallel by all processors P(x,y,0): one processor per cluster. It loads 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. |
22 | | Processor P(0,0,0) initializes the FAT, initializes the TTY0 lock, initialises the synchronisation barrier, and load the ''map.bin''file. Then processor P(0,0,0) use inter-processor-interrupts (WTI) to start the parallel execution, and activate processor P(x,y,0) in all clusters containing processors. |
| 29 | Processor P(0,0,0) initializes the FAT, initializes the TTY0 lock, initialises the synchronisation barrier, and load the ''map.bin''file. Then processor P(0,0,0) use inter-processor-interrupts (WTI) to start the parallel execution, and activate processors P(x,y,0) in all clusters containing processors. |
31 | | In each cluster(x,y), processor P(x,y,0) makes the local page table initialisation (function '''boot_ptabs_init()''') as specified in the mapping. There is one page table per user application (vspace) defined in the mapping, and it is replicated in all clusters containing processors. In each cluster, all pages tables are packed in one segment (seg_ptab) occupying one single big page (2 Mbytes). Global vsegs are mapped in all vspaces. Any vseg (but the peripherals)can be mapped on any physical segment. As the kernel read-only segments (seg_kcode and seg_kinit) are replicated in all clusters to avoid contention, the content of the page tables depends on the cluster-coordinates: for the kernel code, a given virtual address is mapped to different physical addresses, depending on the cluster coordinates. |
| 38 | In each cluster(x,y), processor P(x,y,0) makes the local page table initialisation (function '''boot_ptabs_init()''') as specified in the mapping. There is one page table per user application (vspace) defined in the mapping, and it is replicated in all clusters containing processors. In each cluster, all pages tables are packed in one segment (seg_ptab) occupying one single big page (2 Mbytes). Global vsegs are mapped in all vspaces. Any vseg (but the peripherals) can be mapped on any physical segment. As the kernel read-only segments (seg_kcode and seg_kinit) are replicated in all clusters to avoid contention, the content of the page tables depends on the cluster-coordinates: for the kernel code, a given virtual address is mapped to different physical addresses, depending on the cluster coordinates. |
52 | | * '''step 0''' : processor[0][0][0] makes kernel_heap[x][y] array and kernel fat initialisation. |
53 | | * '''step 1''' : each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[x][y][p] array initialisation. |
54 | | * '''step 2''' : each processor loops on all allocated tasks to build the _ptabs_vaddr[vspace] & _ptabs_ptprs[vspace] arrays from the tasks contexts. |
55 | | * '''step 3''' : each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors. |
56 | | * '''step 4''' : each processor starts its TICK timer if it has at least one task allocated. |
57 | | * '''step 5''' : each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC). |
58 | | * '''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. |
| 60 | === step 0 === |
| 61 | Processor P(0,0,0) makes kernel_heap[x][y] array, kernel fat initialization, TTY0 lock initialization, and barrier initialization. |
| 62 | |
| 63 | === step 1 === |
| 64 | Each processor P(x,y,p) get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[x][y][p] array initialization. |
| 65 | |
| 66 | === step 2 === |
| 67 | 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. |
| 68 | |
| 69 | === step 3 === |
| 70 | Each processor P(x,y,p) computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors. |
| 71 | |
| 72 | === step 4 === |
| 73 | Each processor P(x,y,p) starts its TICK timer if it has at least one task allocated. |
| 74 | |
| 75 | === step 5 === |
| 76 | Each processor updates its private idle_task context (CTX_SP, CTX_RA, CTX_EPC). |
| 77 | |
| 78 | === step 6 === |
| 79 | 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. |