Changes between Version 27 and Version 28 of boot_loader


Ignore:
Timestamp:
Jul 28, 2015, 12:40:26 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • boot_loader

    v27 v28  
    1111
    1212After 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.
    1414 * 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.
    1515This ''reset'' code is generic, and can be used to boot any operating system. 
     
    1818
    1919The 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 is 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.
     20The 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.
    2121
    2222=== step 0 ===
     
    2525 * The stack size for P(x,y,0) is 1.25 Kbytes.
    2626 * 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_SIZE
     27 Therefore, the SEG_BOOT_STACK_SIZE cannot be smaller than : 0x100 * (NB_PROCS_MAX-1) + 0x500) * X_SIZE * Y_SIZE
    2828
    2929=== step 1 ===
     
    3131
    3232=== 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:  BPP (Big Physical Page, 2 Mbytes), and  SPP  (Small Physical Page, 4 Kbytes).
     33In 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).
    3434There is one SPP and one BPP allocator per cluster containing a physical memory bank.
    3535All the physical memory allocation must be done by the boot-loader in the boot phase, and these memory allocators
     
    3737
    3838=== 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. 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.
     39In 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.
    4040
    4141=== step 4 ===
     
    4646 * Any task defined in any application can be allocated to any processor.
    4747 * 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).
    4949 * One scheduler occupies 8 Kbytes, and contains the contexts of all tasks allocated to the processor (256 bytes per task).
    5050 
     
    5858== Phase 3 : Kernel Initialisation ==
    5959
    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.
     60This 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.
    6261
    6362=== 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.
     63Processor 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.
    6564
    6665=== step 1 ===
     
    7574
    7675=== 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.
     76Each 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.