processor.h (9e1e41c44782741c727688a19e5624d039b0de7e) | processor.h (09f8a6db20e6ed8eab1b2b23d09d2458f6e15062) |
---|---|
1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (C) 2001 - 2008 Tensilica Inc. 7 * Copyright (C) 2015 Cadence Design Systems Inc. 8 */ --- 162 unchanged lines hidden (view full) --- 171 bad_vaddr: 0, \ 172 bad_uaddr: 0, \ 173 error_code: 0, \ 174} 175 176 177/* 178 * Do necessary setup to start up a newly executed thread. | 1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (C) 2001 - 2008 Tensilica Inc. 7 * Copyright (C) 2015 Cadence Design Systems Inc. 8 */ --- 162 unchanged lines hidden (view full) --- 171 bad_vaddr: 0, \ 172 bad_uaddr: 0, \ 173 error_code: 0, \ 174} 175 176 177/* 178 * Do necessary setup to start up a newly executed thread. |
179 * Note: We set-up ps as if we did a call4 to the new pc. | 179 * Note: When windowed ABI is used for userspace we set-up ps 180 * as if we did a call4 to the new pc. |
180 * set_thread_state in signal.c depends on it. 181 */ | 181 * set_thread_state in signal.c depends on it. 182 */ |
183#if IS_ENABLED(CONFIG_USER_ABI_CALL0) 184#define USER_PS_VALUE ((USER_RING << PS_RING_SHIFT) | \ 185 (1 << PS_UM_BIT) | \ 186 (1 << PS_EXCM_BIT)) 187#else |
|
182#define USER_PS_VALUE (PS_WOE_MASK | \ 183 (1 << PS_CALLINC_SHIFT) | \ 184 (USER_RING << PS_RING_SHIFT) | \ 185 (1 << PS_UM_BIT) | \ 186 (1 << PS_EXCM_BIT)) | 188#define USER_PS_VALUE (PS_WOE_MASK | \ 189 (1 << PS_CALLINC_SHIFT) | \ 190 (USER_RING << PS_RING_SHIFT) | \ 191 (1 << PS_UM_BIT) | \ 192 (1 << PS_EXCM_BIT)) |
193#endif |
|
187 188/* Clearing a0 terminates the backtrace. */ 189#define start_thread(regs, new_pc, new_sp) \ 190 do { \ 191 memset((regs), 0, sizeof(*(regs))); \ 192 (regs)->pc = (new_pc); \ 193 (regs)->ps = USER_PS_VALUE; \ 194 (regs)->areg[1] = (new_sp); \ --- 59 unchanged lines hidden --- | 194 195/* Clearing a0 terminates the backtrace. */ 196#define start_thread(regs, new_pc, new_sp) \ 197 do { \ 198 memset((regs), 0, sizeof(*(regs))); \ 199 (regs)->pc = (new_pc); \ 200 (regs)->ps = USER_PS_VALUE; \ 201 (regs)->areg[1] = (new_sp); \ --- 59 unchanged lines hidden --- |