Changes between Version 13 and Version 14 of boot_loader


Ignore:
Timestamp:
Dec 7, 2014, 9:46:20 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • boot_loader

    v13 v14  
    44
    55The boot procedure is done in three steps:
    6  * 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.
     6 * The generic ''reset'' code (hard-coded in the external ROM) is executed by processor (0,0,0), and load the GIRT_VM ''boot-loader'' code from the hard disk to the physical memory.
    77 * The GIET_VM ''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.
    88 * Finally, the GIET_VM ''kernel_init()'' function is executed by all processors, and completes the kernel initialisation.The system boot is done in three phases.
    99
    10 == __Step 1 : Reset Initialization__ ==
     10== __Phase 1 : Reset Initialization__ ==
    1111
    1212In 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. 
     
    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.
    1515
    16 == __Step 2 : Boot Initialization__ ==
     16== __Phase 2 : Boot Initialization__ ==
    1717
    1818The GIET_VM boot-loader is executed by processor (0,0,0), while other processors are in wait state.
     
    5252to the ''kernel_init()''  function.
    5353
    54 == __Step 3 : Kernel Initialization__ ==
     54== __Phase 3 : Kernel Initialization__ ==
    5555
    56 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:
     56This code is executed by all processors, but sequencially. All processors enter the same [source:soft/giet_vm/giet_kernel/kernel_init.c kernel_init.c] code that makes the following actions:
    5757
    58  1. each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[] array initialisation.
    59  2. each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts.
    60  3. each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors.
    61  4. each processor starts its TICK timer if it has at least at least one task allocated.
    62  5. each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC).
    63  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.
     58 * step 0 : processor(0][0][0] makes kernel_heap[x][y] array and kernel fat initialisation.
     59 * step 1 : each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[x][y][p] array initialisation.
     60 * step 2 : each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts.
     61 * step 3 : each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors.
     62 * step 4 : each processor starts its TICK timer if it has at least one task allocated.
     63 * step 5 : each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC).
     64 * 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.
    6465
    6566