Changeset 457 for trunk/hal/generic
- Timestamp:
- Aug 2, 2018, 11:47:13 AM (6 years ago)
- Location:
- trunk/hal/generic
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_atomic.h
r408 r457 26 26 27 27 #include <kernel_config.h> 28 #include <hal_ types.h>28 #include <hal_kernel_types.h> 29 29 30 30 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_context.h
r408 r457 43 43 * identified by the <thread> argument. The context is not initialised. 44 44 **************************************************************************************** 45 * @ thread : pointer on the thread descriptor. 45 46 * @ return 0 if success / return -1 if failure. 46 47 ***************************************************************************************/ … … 48 49 49 50 /**************************************************************************************** 50 * This function allocates memory for a CPU context, initialize it from scratch, 51 * and links it to the thread identified by the <thread> argument. 51 * This function initializes a CPU context from scratch. 52 52 **************************************************************************************** 53 53 * @ thread : pointer on the thread descriptor. 54 * @ return 0 if success / return -1 if failure.55 54 ***************************************************************************************/ 56 error_t hal_cpu_context_create( struct thread_s * thread );55 void hal_cpu_context_init( struct thread_s * thread ); 57 56 58 57 /**************************************************************************************** … … 71 70 72 71 /**************************************************************************************** 72 * This function is used to implement the exec() system call. 73 * 1) It initialize the relevant slots of the the calling thread CPU context. 74 * 2) It call the hal_do_cpu_restore() function to return to user mode and start 75 * execution of the new process. 76 **************************************************************************************** 77 * @ thread : pointer on the thread descriptor. 78 ***************************************************************************************/ 79 void hal_cpu_context_exec( struct thread_s * thread ); 80 81 /**************************************************************************************** 73 82 * This function display some slots of the CPU context. 74 * - For the MIPS32 :75 * . GPR : gp_28 , sp_29 , ra_3176 * . CP0 : c0_sr , c0_th , c0_epc77 * . CP2 : c2_ptpr , c2-mode78 * - For X86 TODO :79 83 **************************************************************************************** 80 84 * @ thread_xp : extended pointer on the thread descriptor. … … 103 107 ***************************************************************************************/ 104 108 error_t hal_fpu_context_alloc( struct thread_s * thread ); 109 110 /**************************************************************************************** 111 * This function initializes a FPU context from scratch. 112 **************************************************************************************** 113 * @ thread : pointer on the thread descriptor. 114 ***************************************************************************************/ 115 void hal_fpu_context_init( struct thread_s * thread ); 105 116 106 117 /**************************************************************************************** -
trunk/hal/generic/hal_exception.h
r455 r457 25 25 #define _HAL_EXCEPTION_H_ 26 26 27 #include <hal_ types.h>27 #include <hal_kernel_types.h> 28 28 29 29 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_gpt.h
r432 r457 25 25 #define _GPT_H_ 26 26 27 #include <hal_ types.h>27 #include <hal_kernel_types.h> 28 28 29 29 ///////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_interrupt.h
r408 r457 25 25 #define _HAL_INTERRUPT_H_ 26 26 27 #include <hal_ types.h>27 #include <hal_kernel_types.h> 28 28 29 29 /////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_irqmask.h
r279 r457 26 26 #define _HAL_IRQMASK_H_ 27 27 28 #include <hal_ types.h>28 #include <hal_shared_types.h> 29 29 30 30 -
trunk/hal/generic/hal_ppm.h
r409 r457 26 26 #define _HAL_PPM_H_ 27 27 28 #include <hal_ types.h>28 #include <hal_kernel_types.h> 29 29 #include <boot_info.h> 30 30 -
trunk/hal/generic/hal_remote.h
r407 r457 26 26 #define _HAL_REMOTE_H_ 27 27 28 #include <hal_ types.h>28 #include <hal_kernel_types.h> 29 29 30 30 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_special.h
r408 r457 25 25 #define _HAL_CPU_H_ 26 26 27 #include <hal_types.h> 27 #include <hal_shared_types.h> 28 #include <hal_kernel_types.h> 28 29 29 30 /**** Forward declarations ***/ -
trunk/hal/generic/hal_switch.h
r408 r457 28 28 29 29 /************************************************************************************* 30 * Th e hal_do_cpu_switch() function is an assembly level function, called by the31 * sched_yield() function,to make a CPU context switch.32 * The current thread CPU context is identified by the <ctx_ current> pointer.33 * The new thread CPU context is identified by the <ctx_ne xt> pointer.30 * This assembly level function is called by the sched_yield() function, 31 * to make a CPU context switch. 32 * The current thread CPU context is identified by the <ctx_old> pointer. 33 * The new thread CPU context is identified by the <ctx_new> pointer. 34 34 * The architecture specific hal_cpu_context_t structure used to store a CPU context 35 35 * is defined in the architecture specific hal_context.c file. … … 45 45 46 46 /************************************************************************************* 47 * The hal_do_cpu_save() function is an assembly level function, called by the 48 * hal_cpu_context_save() functio to save the calling CPU register values to a 49 * CPU context identified by the <ctx> pointer. 47 * This assembly level function is called by the hal_cpu_context_fork() function. 48 * It save the calling CPU register values to a CPU context identified by <ctx>. 50 49 * This function does NOT modify any register before saving values into context. 51 50 * The architecture specific hal_cpu_context_t structure used to store a CPU context … … 57 56 void hal_do_cpu_save( void * ctx ); 58 57 58 /************************************************************************************* 59 * This assembly level function, is called by the hal_cpu_context_exec() function. 60 * It restore the calling CPU register values from a CPU context identified by <ctx>. 61 * The architecture specific hal_cpu_context_t structure used to store a CPU context 62 * is defined in the architecture specific hal_context.c file. 63 * When the restore is completed, it simply jumps to the address contained in ra_31. 64 * In ALMOS-MKH, ra_31 must contain a pointer on the eret() function, and c0_epc 65 * must contain the new main thread entry point. 66 ************************************************************************************* 67 * @ ctx : local pointer on CPU context. 68 ************************************************************************************/ 69 void hal_do_cpu_restore( void * ctx ); 70 59 71 #endif /* _HAL_SWITCH_H_ */ -
trunk/hal/generic/hal_syscall.h
r408 r457 25 25 #define _HAL_KERNEL_SYSCALL_H_ 26 26 27 #include <hal_ types.h>27 #include <hal_kernel_types.h> 28 28 29 29 /////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_user.h
r445 r457 25 25 #define _HAL_USER_H_ 26 26 27 #include <hal_ types.h>27 #include <hal_shared_types.h> 28 28 29 29 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_uspace.h
r407 r457 25 25 #define _HAL_USPACE_H_ 26 26 27 #include <hal_ types.h>27 #include <hal_kernel_types.h> 28 28 29 29 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/hal/generic/hal_vmm.h
r411 r457 25 25 #define _HAL_PPM_H_ 26 26 27 #include <hal_ types.h>27 #include <hal_kernel_types.h> 28 28 #include <boot_info.h> 29 29
Note: See TracChangeset
for help on using the changeset viewer.