Changes between Version 56 and Version 57 of boot_procedure
- Timestamp:
- Mar 2, 2019, 4:31:55 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
boot_procedure
v56 v57 79 79 The first instructions of the boot-loader are defined in the ''boot_entry.S'' file. This assembly code is executed by all cores entering the boot-loader, but not at the same time. 80 80 81 Each core running this code makes the 3 following actions:81 Each core running this assembly code makes the 3 following actions: 82 82 * It initializes the core stack pointer depending on the '''lid''' value extracted from the '''gid''', using the BOOT_STACK_BASE and BOOT_STACK_SIZE parameters defined in the ''boot_config.h'' file, 83 * It changes the value of the DATA address extension CP2 register, using the '''cxy''' value extracted from the '''gid''' 83 * It changes the value of the DATA address extension CP2 register, using the '''cxy''' value extracted from the '''gid''', to force all cores to use the local stack segments. 84 84 * It jumps to the boot_loader() C function defined in the ''boot.c'' file, passing the two (cxy , lid) arguments. 85 85 86 86 In this sequencial phase, the core[0][0] executing this C function makes the following actions: 87 * The core[0][0] initializes 2 peripherals: The '''TTY''' terminal (channel 0) to display log messages, and the '''IOC''' peripheral to access the disk .87 * The core[0][0] initializes 2 peripherals: The '''TTY''' terminal (channel 0) to display log messages, and the '''IOC''' peripheral to access the disk file system. 88 88 * The core[0][0] initializes the boot-loader FAT32, allowing the boot loader to access files stored in the FAT32 file system on disk. 89 89 * The core[0][0] load in the KERNEL_ELF zone the ''kernel.elf'' file from the disk file system.. 90 * Then it copies in the KERNEL_CORE zone the ''kcode'' and '' data'' segments, using the addresses contained in the .elf file (identity mapping).90 * Then it copies in the KERNEL_CORE zone the ''kcode'' and ''kdata'' segments, using the addresses contained in the .elf file (identity mapping). 91 91 * The core[0][0] load in the ARCH_INFO zone the ''arch_info.bin'' file from the disk file system. 92 92 * Then it builds from this ''arch_info.t'' structure the specific ''boot_info_t'' structure for cluster 0, and stores it in the ''kdata'' segment. 93 * The core[0][0] send IPIs to activate all cores [ i][0] in all other clusters.93 * The core[0][0] send IPIs to activate all cores [cxy][0] in all other clusters. 94 94 95 95 === B3. Boot-loader partially parallel phase === … … 99 99 At this point, all DATA extension registers point already on the local cluster( to use the local stack). 100 100 101 The refore, the core[cxy][0] exécutesthe following tasks:101 The core[cxy][0] exécute the following tasks: 102 102 * To access the global data stored in cluster cxy, the core[cxy][0] copies the boot-loader code from BOOT_CODE zone in cluster 0 to BOOT_CORE zone in cluster cxy. 103 * To access the instructions stored in cluster cxy, the core[cxy][0] creates a minimal page table containing one single big page mapping the local BOOT_CORE zone, and activates the instruction MMU. '''[TO BE DONE]'''103 * To access the instructions stored in cluster cxy, the core[cxy][0] creates a minimal page table containing two big pages mapping respectively the local BOOT_CORE zone, and the local KERNEL_CODE zone, and activates the instruction MMU. '''[TO BE DONE]''' 104 104 * The core[cxy][0] copies the ''arch_info.bin'' structure from ARCH_INFO zone in cluster 0 to ARCH_INFO zone in cluster cxy. 105 105 * The core[cxy][0] copies the ''kcode'' and ''kdata'' segments from KERNEL_CODE zone in cluster 0 to KERNEL_CODE zone in cluster cxy. 106 106 * The core[cxy][0] builds from the ''arch_info.t'' the specific ''boot_info_t'' structure for cluster cxy, and stores it in the local ''kdata'' segment. 107 * 108 * in each cluster cxy, the core[cxy][0] activates the other cores that are blocked in the pre-loader.107 * All core[cxy][0], including core[0][0], synchronize using a global barrier. 108 * In each cluster cxy, the core[cxy][0] activates the other cores that are blocked in the pre-loader. 109 109 110 110 === B4. Boot-loader fully parallel phase ===