/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2001 - 2008 Tensilica Inc. * Copyright (C) 2015 Cadence Design Systems Inc.
*/
/* * User space process size: 1 GB. * Windowed call ABI requires caller and callee to be located within the same * 1 GB region. The C compiler places trampoline code on the stack for sources * that take the address of a nested C function (a feature used by glibc), so * the 1 GB requirement applies to the stack as well.
*/
/* * General exception cause assigned to fake NMI. Fake NMI needs to be handled * differently from other interrupts, but it uses common kernel entry/exit * code.
*/
#define EXCCAUSE_MAPPED_NMI 62
/* * General exception cause assigned to debug exceptions. Debug exceptions go * to their own vector, rather than the general exception vectors (user, * kernel, double); and their specific causes are reported via DEBUGCAUSE * rather than EXCCAUSE. However it is sometimes convenient to redirect debug * exceptions to the general exception mechanism. To do this, an otherwise * unused EXCCAUSE value was assigned to debug exceptions for this purpose.
*/
#define EXCCAUSE_MAPPED_DEBUG 63
/* * We use DEPC also as a flag to distinguish between double and regular * exceptions. For performance reasons, DEPC might contain the value of * EXCCAUSE for regular exceptions, so we use this definition to mark a * valid double exception address. * (Note: We use it in bgeui, so it should be 64, 128, or 256)
*/
/* WSBITS and WBBITS are the width of the WINDOWSTART and WINDOWBASE * registers
*/ #define WSBITS (XCHAL_NUM_AREGS / 4) /* width of WINDOWSTART in bits */ #define WBBITS (XCHAL_NUM_AREGS_LOG2 - 2) /* width of WINDOWBASE in bits */
/* Build a valid return address for the specified call winsize. * winsize must be 1 (call4), 2 (call8), or 3 (call12)
*/ #define MAKE_RA_FOR_CALL(ra,ws) (((ra) & 0x3fffffff) | (ws) << 30)
/* Convert return address to a valid pc * Note: 'text' is the address within the same 1GB range as the ra
*/ #define MAKE_PC_FROM_RA(ra, text) (((ra) & 0x3fffffff) | ((unsignedlong)(text) & 0xc0000000))
#elifdefined(__XTENSA_CALL0_ABI__)
/* Build a valid return address for the specified call winsize. * winsize must be 1 (call4), 2 (call8), or 3 (call12)
*/ #define MAKE_RA_FOR_CALL(ra, ws) (ra)
/* Convert return address to a valid pc * Note: 'text' is not used as 'ra' is always the full address
*/ #define MAKE_PC_FROM_RA(ra, text) (ra)
#else #error Unsupported Xtensa ABI #endif
/* Spill slot location for the register reg in the spill area under the stack * pointer sp. reg must be in the range [0..4).
*/ #define SPILL_SLOT(sp, reg) (*(((unsignedlong *)(sp)) - 4 + (reg)))
/* Spill slot location for the register reg in the spill area under the stack * pointer sp for the call8. reg must be in the range [4..8).
*/ #define SPILL_SLOT_CALL8(sp, reg) (*(((unsignedlong *)(sp)) - 12 + (reg)))
/* Spill slot location for the register reg in the spill area under the stack * pointer sp for the call12. reg must be in the range [4..12).
*/ #define SPILL_SLOT_CALL12(sp, reg) (*(((unsignedlong *)(sp)) - 16 + (reg)))
/* * Do necessary setup to start up a newly executed thread. * Note: When windowed ABI is used for userspace we set-up ps * as if we did a call4 to the new pc. * set_thread_state in signal.c depends on it.
*/ #if IS_ENABLED(CONFIG_USER_ABI_CALL0) #define USER_PS_VALUE ((USER_RING << PS_RING_SHIFT) | \
(1 << PS_UM_BIT) | \
(1 << PS_EXCM_BIT)) #else #define USER_PS_VALUE (PS_WOE_MASK | \
(1 << PS_CALLINC_SHIFT) | \
(USER_RING << PS_RING_SHIFT) | \
(1 << PS_UM_BIT) | \
(1 << PS_EXCM_BIT)) #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.