2 * HNDRTE arm trap handling.
4 * Copyright (C) 2010, Broadcom Corporation
7 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
8 * the contents of this file may not be disclosed to third parties, copied
9 * or duplicated in any form, in whole or in part, without the prior
10 * written permission of Broadcom Corporation.
12 * $Id: hndrte_armtrap.h,v 13.4 2009-07-13 23:25:52 Exp $
15 #ifndef _hndrte_armtrap_h
16 #define _hndrte_armtrap_h
19 /* ARM trap handling */
21 /* Trap types defined by ARM (see arminc.h) */
23 /* Trap locations in lo memory */
25 #define FIRST_TRAP TR_RST
26 #define LAST_TRAP (TR_FIQ * TRAP_STRIDE)
28 #if defined(__ARM_ARCH_4T__)
29 #define MAX_TRAP_TYPE (TR_FIQ + 1)
30 #elif defined(__ARM_ARCH_7M__)
31 #define MAX_TRAP_TYPE (TR_ISR + ARMCM3_NUMINTS)
32 #endif /* __ARM_ARCH_7M__ */
34 /* The trap structure is defined here as offsets for assembly */
40 #define TR_REG(n) (TR_REGS + (n) * 4)
41 #define TR_SP TR_REG(13)
42 #define TR_LR TR_REG(14)
43 #define TR_PC TR_REG(15)
45 #define TRAP_T_SIZE 80
47 #ifndef _LANGUAGE_ASSEMBLY
51 typedef struct _trap_struct
{
74 #endif /* !_LANGUAGE_ASSEMBLY */
76 #endif /* _hndrte_armtrap_h */