Changes between Version 27 and Version 28 of boot_loader
- Timestamp:
- Jul 28, 2015, 12:40:26 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
boot_loader
v27 v28 11 11 12 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 * Processor P(0,0,0) loads the GIET_VM boot-loader code from the external block device, to the physical memory bank in cluster(0,0). It load the two segments seg_boot_code and seg_boot_data from the ''boot.elf'' file that must be stored a (lba = 2) on the block device.13 * Processor P(0,0,0) loads the GIET_VM boot-loader code from the external block device, to the physical memory bank in cluster(0,0). It load the two segments seg_boot_code and seg_boot_data from the ''boot.elf'' file that must be stored at (lba = 2) on the block device. 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 This ''reset'' code is generic, and can be used to boot any operating system. … … 18 18 19 19 The GIET_VM boot-loader is defined in the [source:soft/giet_vm/giet_boot/boot.c boot.c] and [source:soft/giet_vm/giet_boot/boot_entry.S boot_entry.S] files. 20 The step 1 isexecuted by processor P(0,0,0) only, but the other steps are executed in parallel by all processor P(x,y,0) : one processor per cluster.20 The steps 0 and 1 are executed by processor P(0,0,0) only, but the other steps are executed in parallel by all processor P(x,y,0) : one processor per cluster. 21 21 22 22 === step 0 === … … 25 25 * The stack size for P(x,y,0) is 1.25 Kbytes. 26 26 * The stack size for other processors is 0.25 Kbytes. 27 * The SEG_BOOT_STACK_SIZE cannot be smaller than : 0x100 * (NB_PROCS_MAX-1) + 0x500) * X_SIZE * Y_SIZE27 Therefore, the SEG_BOOT_STACK_SIZE cannot be smaller than : 0x100 * (NB_PROCS_MAX-1) + 0x500) * X_SIZE * Y_SIZE 28 28 29 29 === step 1 === … … 31 31 32 32 === step 2 === 33 In each cluster(x,y), processor P(x,y,0) makes the physical memory allocator initialisation (function '''boot_pmem_init()''' ). The GIET VM uses two types of pages: 33 In each cluster(x,y), processor P(x,y,0) makes the physical memory allocator initialisation (function '''boot_pmem_init()''' ). The GIET VM uses two types of pages: BPP (Big Physical Page, 2 Mbytes), and SPP (Small Physical Page, 4 Kbytes). 34 34 There is one SPP and one BPP allocator per cluster containing a physical memory bank. 35 35 All the physical memory allocation must be done by the boot-loader in the boot phase, and these memory allocators … … 37 37 38 38 === step 3 === 39 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. A ny 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.39 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. 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. 40 40 41 41 === step 4 === … … 46 46 * Any task defined in any application can be allocated to any processor. 47 47 * The allocation of task to processors is fully static (no task migration). 48 * One single processor cannot schedule more than 14 tasks .48 * One single processor cannot schedule more than 14 tasks (including the idle_task). 49 49 * One scheduler occupies 8 Kbytes, and contains the contexts of all tasks allocated to the processor (256 bytes per task). 50 50 … … 58 58 == Phase 3 : Kernel Initialisation == 59 59 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 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, others steps are done by all processors in parallel. 62 61 63 62 === step 0 === 64 Processor P(0,0,0) makes kernel_heap[x][y] array initialization, MMC distributed lock and TTY0 sqt lock initialization, kernel barrier, ext_irq, NIC and IOC initialization.63 Processor P(0,0,0) makes various initializations: kernel_heap[x][y] array, MMC distributed lock and TTY0 sqt lock, kernel barrier, ext_irq, NIC and IOC peripherals. 65 64 66 65 === step 1 === … … 75 74 76 75 === step 4 === 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.76 Each processor P(x,y,p) computes the index of first task to be executed (can be the IDLE task), set registers SP, SR, PTPR, EPC, with the values corresponding to this task, and jumps to the task entry point.