CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/cache/sources/wl/include/hndrte_armtrap.h
Views: 3960
1
/*
2
* HNDRTE arm trap handling.
3
*
4
* $Copyright Open Broadcom Corporation$
5
*
6
* $Id: hndrte_armtrap.h 261365 2011-05-24 20:42:23Z $
7
*/
8
9
#ifndef _hndrte_armtrap_h
10
#define _hndrte_armtrap_h
11
12
13
/* ARM trap handling */
14
15
/* Trap types defined by ARM (see arminc.h) */
16
17
/* Trap locations in lo memory */
18
#define TRAP_STRIDE 4
19
#define FIRST_TRAP TR_RST
20
#define LAST_TRAP (TR_FIQ * TRAP_STRIDE)
21
22
#if defined(__ARM_ARCH_4T__)
23
#define MAX_TRAP_TYPE (TR_FIQ + 1)
24
#elif defined(__ARM_ARCH_7M__)
25
#define MAX_TRAP_TYPE (TR_ISR + ARMCM3_NUMINTS)
26
#endif /* __ARM_ARCH_7M__ */
27
28
/* The trap structure is defined here as offsets for assembly */
29
#define TR_TYPE 0x00
30
#define TR_EPC 0x04
31
#define TR_CPSR 0x08
32
#define TR_SPSR 0x0c
33
#define TR_REGS 0x10
34
#define TR_REG(n) (TR_REGS + (n) * 4)
35
#define TR_SP TR_REG(13)
36
#define TR_LR TR_REG(14)
37
#define TR_PC TR_REG(15)
38
39
#define TRAP_T_SIZE 80
40
41
#ifndef _LANGUAGE_ASSEMBLY
42
43
#include <typedefs.h>
44
45
typedef struct _trap_struct {
46
uint32 type;
47
uint32 epc;
48
uint32 cpsr;
49
uint32 spsr;
50
uint32 r0; /* a1 */
51
uint32 r1; /* a2 */
52
uint32 r2; /* a3 */
53
uint32 r3; /* a4 */
54
uint32 r4; /* v1 */
55
uint32 r5; /* v2 */
56
uint32 r6; /* v3 */
57
uint32 r7; /* v4 */
58
uint32 r8; /* v5 */
59
uint32 r9; /* sb/v6 */
60
uint32 r10; /* sl/v7 */
61
uint32 r11; /* fp/v8 */
62
uint32 r12; /* ip */
63
uint32 r13; /* sp */
64
uint32 r14; /* lr */
65
uint32 pc; /* r15 */
66
} trap_t;
67
68
#endif /* !_LANGUAGE_ASSEMBLY */
69
70
#endif /* _hndrte_armtrap_h */
71
72