Changeset 623 for trunk/hal/generic
- Timestamp:
- Mar 6, 2019, 4:37:15 PM (6 years ago)
- Location:
- trunk/hal/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_gpt.h
r587 r623 77 77 /**************************************************************************************** 78 78 * This function allocates physical memory for first level page table (PT1), 79 * and initializes the page table descriptor.79 * and initializes the GPT descriptor, creating an empty GPT. 80 80 **************************************************************************************** 81 81 * @ gpt : pointer on generic page table descriptor. … … 126 126 127 127 /**************************************************************************************** 128 * This function map a - local or remote - GPT entry identified by its VPN, from values129 * defined by the <ppn> and <attr> arguments. It allocates physical memory in remote130 * cluster for the GPT PT2, using a RPC_PMEM_GET_PAGES,if required.131 **************************************************************************************** 132 * @ gpt 128 * This function maps in a - local or remote - GPT identified by the <gpt_xp> argument 129 * an entry identified by the <vpn> argument, as defined by <ppn> and <attr> arguments. 130 * It allocates physical memory for the GPT PT2, using a RPC_PMEM_GET_PAGES if required. 131 **************************************************************************************** 132 * @ gpt_xp : [in] pointer on the page table 133 133 * @ vpn : [in] virtual page number 134 134 * @ attr : [in] generic attributes … … 154 154 /**************************************************************************************** 155 155 * This function returns in the <attr> and <ppn> arguments the current values stored 156 * in a - local or remote - GPT entry, identified by the <gpt> and <vpn> arguments.156 * in a - local or remote - GPT entry, identified by the <gpt> and <vpn> arguments. 157 157 **************************************************************************************** 158 158 * @ gpt_xp : [in] extended pointer on the page table -
trunk/hal/generic/hal_special.h
r619 r623 31 31 32 32 struct thread_s; 33 struct gpt_s; 33 34 34 35 /////////////////////////////////////////////////////////////////////////////////////////// … … 37 38 // ALMOS-MKH uses the following API to access the core protected registers. 38 39 /////////////////////////////////////////////////////////////////////////////////////////// 40 41 /***************************************************************************************** 42 * This function initialise - for architectures requiring it - the protected register(s) 43 * containing the kernel_entry adresse(s) for interrupts / exceptions / syscalls. 44 ****************************************************************************************/ 45 void hal_set_kentry( void ); 46 47 /***************************************************************************************** 48 * This function initializes - for architectures requiring it - the MMU registers 49 * as required by the target architecture to execute the kernel threads attached 50 * to kernel process zero. It is called by all cores in the kernel_init() function. 51 ***************************************************************************************** 52 * @ gpt : local pointer on the kernel page table descriptor. 53 ****************************************************************************************/ 54 void hal_mmu_init( struct gpt_s * gpt ); 39 55 40 56 /***************************************************************************************** … … 103 119 /***************************************************************************************** 104 120 * This function makes an uncachable read to a 32 bits variable in local memory. 121 ***************************************************************************************** 105 122 * @ ptr : pointer on the variable 106 123 * @ returns the value … … 137 154 /***************************************************************************************** 138 155 * This function returns information on MMU exceptions : 156 ***************************************************************************************** 139 157 * @ mmu_ins_excp_code : [out] instruction fetch exception code 140 158 * @ mmu_ins_bad_vaddr : [out] instruction fetch faulty virtual address -
trunk/hal/generic/hal_vmm.h
r457 r623 1 1 /* 2 * hal_vmm.h - GenericVirtual Memory Manager initialisation2 * hal_vmm.h - Kernel Virtual Memory Manager initialisation 3 3 * 4 * Authors Alain Greiner (2016,2017 )4 * Authors Alain Greiner (2016,2017,2018,2019) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 22 22 */ 23 23 24 #ifndef _HAL_ PPM_H_25 #define _HAL_ PPM_H_24 #ifndef _HAL_VMM_H_ 25 #define _HAL_VMM_H_ 26 26 27 27 #include <hal_kernel_types.h> … … 29 29 30 30 ///////////////////////////////////////////////////////////////////////////////////////// 31 // GenericVirtual Memory Manager initialisation (implementation in hal_vmm.c)31 // Kernel Virtual Memory Manager initialisation (implementation in hal_vmm.c) 32 32 // 33 33 // Any arch-specific implementation must implement this API. … … 36 36 /**** Forward declarations ****/ 37 37 38 struct vmm_s; 38 struct process_s; 39 struct boot_info_s; 39 40 40 41 /**************************************************************************************** 41 * This function makes all architecture specific initialisations 42 * in the VSL (Virtual segments List) and in the GPT (Generic Page Table). 42 * Depending on the hardware architecture, this function creates (i.e. allocates memory 43 * and initializes) the VSL (Virtual segments List) and the GPT (Generic Page Table), 44 * for all vsegs required by the kernel process. 43 45 **************************************************************************************** 44 * @ vmm : pointer on virtual memory manager.46 * @ info : local pointer on boot_info (for kernel segments base & size). 45 47 * @ return 0 if success / return ENOMEM if failure. 46 48 ***************************************************************************************/ 47 error_t hal_vmm_ init( struct vmm_s * vmm);49 error_t hal_vmm_kernel_init( struct boot_info_s * info ); 48 50 49 #endif /* HAL_PPM_H_ */ 51 /**************************************************************************************** 52 * Depending on the hardware architecture, this function updates the VMM of an user 53 * process identified by the <process> argument. It registers in VSL and GPT all 54 * kernel vsegs required by this architecture. 55 **************************************************************************************** 56 * @ process : local pointer on user process descriptor. 57 * @ return 0 if success / return ENOMEM if failure. 58 ***************************************************************************************/ 59 error_t hal_vmm_kernel_update( struct process_s * process ); 60 61 #endif /* HAL_VMM_H_ */
Note: See TracChangeset
for help on using the changeset viewer.