Changes between Version 9 and Version 10 of boot_loader


Ignore:
Timestamp:
Nov 5, 2014, 6:06:14 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • boot_loader

    v9 v10  
    11= GIET_VM / Boot Procedure =
    22
    3 The system boot is done in three phases.
     3The boot procedure is done in three steps:
     4 * 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.
     5 * The ''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.
     6 * Finally, the ''kernel_init()'' function is executed by all processors, and completes the kernel initialisation.The system boot is done in three phases.
    47
    5 == __Phase 1 : Reset Initialization__ ==
     8== __Step 1 : Reset Initialization__ ==
    69
    7 This phase is executed in case of hard reset: all processors execute the ''reset'' code (also called ''preloader'' code) stored in the external ROM,
    8 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. 
     10In 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. 
    911 * Processor (0,0,0) load the GIET_VM boot-loader code from the external disk (or any other mass storage peripheral), to the physical memory of cluster(0,0).
    1012 * 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.
    1113
    12 == __Phase 2 : Boot Initialization__ ==
     14== __Step 2 : Boot Initialization__ ==
    1315
    14 In this this phase the GIET_VM boot-loader is executed by processor (0,0,0), while other processors are in wait state.
     16The GIET_VM boot-loader is executed by processor (0,0,0), while other processors are in wait state.
    1517The GIET-VM boot-loader is defined in the [source:soft/giet_vm/giet_boot/boot.c boot.c] file.
    1618The main steps are the following:
     
    4850to the ''kernel_init()''  function.
    4951
    50 == __Phase 3 : Kernel Initialization__ ==
     52== __Step 3 : Kernel Initialization__ ==
    5153
    52 This phase is executed by all processors in parallel. All processors enter the same [source:soft/giet_vm/giet_kernel/kernel_init.c kernel_init()] function.
    53 The main steps are the following:
     54This 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:
    5455
    55  * Step 1 : each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[] array initialisation
    56  * step 2 : each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts.
    57  * step 3 : each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors.
    58  * step 4 : each processor starts its TICK timer if it has at least at least one task allocated
    59  * step 5 : each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC).
    60  * 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
     56 .1 : each processor get its scheduler virtual address from CP0_SCHED register and contributes to _schedulers[] array initialisation.
     57 .2 : each processor loops on all allocated tasks to build the _ptabs_vaddr[] & _ptabs_ptprs[] arrays from the tasks contexts.
     58 .3 : each processor computes and set the XCU masks, as specified in the HWI, PTI, and WTI interrupt vectors.
     59 .4 : each processor starts its TICK timer if it has at least at least one task allocated.
     60 .5 : each processor updates the idle_task context (CTX_SP, CTX_RA, CTX_EPC).
     61 .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.
    6162
    6263