Changeset 625 for trunk/hal/tsar_mips32/core/hal_kentry.h
- Timestamp:
- Apr 10, 2019, 10:09:39 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_kentry.h
r481 r625 1 1 /* 2 * hal_kentry.h - MIPS32 registers mnemonics2 * hal_kentry.h - uzone definition 3 3 * 4 * Copyright (c) 2008,2009,2010,2011,2012 Ghassan Almaless 5 * Copyright (c) 2011,2012 UPMC Sorbonne Universites 4 * Author Alain Greiner (2016,2017,2018,2019) 5 * 6 * Copyright (c) UPMC Sorbonne Universites 6 7 * 7 * This file is part of ALMOS- kernel.8 * This file is part of ALMOS-MKH. 8 9 * 9 * ALMOS- kernelis free software; you can redistribute it and/or modify it10 * ALMOS-MKH is free software; you can redistribute it and/or modify it 10 11 * under the terms of the GNU General Public License as published by 11 12 * the Free Software Foundation; version 2.0 of the License. 12 13 * 13 * ALMOS- kernelis distributed in the hope that it will be useful, but14 * ALMOS-MKH is distributed in the hope that it will be useful, but 14 15 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU … … 28 29 // a fixed size array of 32 bits integers, used by the kentry function to save/restore 29 30 // the MIPS32 CPU registers, at each exception / interruption / syscall. 30 // It also defines several initial values for the SR register.31 31 // 32 32 // This file is included in the hal_kentry.S, hal_syscall.c, hal_exception.c, … … 36 36 37 37 /**************************************************************************************** 38 * This structure defines the cpu_uzone dynamically allocated in the kernel stack 39 * by the hal_kentry assembly code for the TSAR_MIPS32 architecture. 38 * This structure defines the "uzone" dynamically allocated in the kernel stack 39 * by the hal_kentry assembly code to save the MIPS32 registers each time a core 40 * enters the kernel to handle an interrupt, exception, or syscall. 41 * These define are specific for the TSAR_MIPS32 architecture. 42 * 40 43 * WARNING : It is replicated in hal_kentry.S file. 41 44 ***************************************************************************************/ … … 87 90 * The hal_kentry_enter() function is the unique kernel entry point in case of 88 91 * exception, interrupt, or syscall for the TSAR_MIPS32 architecture. 89 * It can be executed by a core in user mode (in case of exception or syscall), 90 * or by a core already in kernel mode (in case of interrupt). 91 * 92 * It can be executed by a core in user mode or by a core already in kernel mode 93 * (in case of interrupt or non fatal exception). 92 94 * In both cases it allocates an "uzone" space in the kernel stack to save the 93 95 * CPU registers values, desactivates the MMU, and calls the relevant handler … … 95 97 * 96 98 * After handler execution, it restores the CPU context from the uzone and jumps 97 * to address contained in EPC calling hal_kentry_eret()99 * to address contained in EPC calling the hal_kentry_eret() function. 98 100 ************************************************************************************/ 99 101 void hal_kentry_enter( void ); … … 101 103 /************************************************************************************* 102 104 * The hal_kentry_eret() function contains only the assembly "eret" instruction, 103 * that reset the EXL bit in the c0_sr register, and jump to the address105 * that reset the EXL bit in the c0_sr register, and jumps to the address 104 106 * contained in the c0_epc register. 105 107 * ************************************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.