2018-10-15 01:35:07 +08:00
|
|
|
/*
|
2021-03-27 17:51:56 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2018-10-15 01:35:07 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
*/
|
2017-11-01 13:30:17 +08:00
|
|
|
#ifndef __ARMV7_H__
|
|
|
|
#define __ARMV7_H__
|
|
|
|
|
|
|
|
/* the exception stack without VFP registers */
|
|
|
|
struct rt_hw_exp_stack
|
|
|
|
{
|
2021-03-27 17:51:56 +08:00
|
|
|
unsigned long r0;
|
|
|
|
unsigned long r1;
|
|
|
|
unsigned long r2;
|
|
|
|
unsigned long r3;
|
|
|
|
unsigned long r4;
|
|
|
|
unsigned long r5;
|
|
|
|
unsigned long r6;
|
|
|
|
unsigned long r7;
|
|
|
|
unsigned long r8;
|
|
|
|
unsigned long r9;
|
|
|
|
unsigned long r10;
|
|
|
|
unsigned long fp;
|
|
|
|
unsigned long ip;
|
|
|
|
unsigned long sp;
|
|
|
|
unsigned long lr;
|
|
|
|
unsigned long pc;
|
|
|
|
unsigned long cpsr;
|
2017-11-01 13:30:17 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct rt_hw_stack
|
|
|
|
{
|
2021-03-27 17:51:56 +08:00
|
|
|
unsigned long cpsr;
|
|
|
|
unsigned long r0;
|
|
|
|
unsigned long r1;
|
|
|
|
unsigned long r2;
|
|
|
|
unsigned long r3;
|
|
|
|
unsigned long r4;
|
|
|
|
unsigned long r5;
|
|
|
|
unsigned long r6;
|
|
|
|
unsigned long r7;
|
|
|
|
unsigned long r8;
|
|
|
|
unsigned long r9;
|
|
|
|
unsigned long r10;
|
|
|
|
unsigned long fp;
|
|
|
|
unsigned long ip;
|
|
|
|
unsigned long lr;
|
|
|
|
unsigned long pc;
|
2017-11-01 13:30:17 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#define USERMODE 0x10
|
|
|
|
#define FIQMODE 0x11
|
|
|
|
#define IRQMODE 0x12
|
|
|
|
#define SVCMODE 0x13
|
|
|
|
#define MONITORMODE 0x16
|
|
|
|
#define ABORTMODE 0x17
|
|
|
|
#define HYPMODE 0x1b
|
|
|
|
#define UNDEFMODE 0x1b
|
|
|
|
#define MODEMASK 0x1f
|
|
|
|
#define NOINT 0xc0
|
|
|
|
|
|
|
|
#define T_Bit (1<<5)
|
|
|
|
#define F_Bit (1<<6)
|
|
|
|
#define I_Bit (1<<7)
|
|
|
|
#define A_Bit (1<<8)
|
|
|
|
#define E_Bit (1<<9)
|
|
|
|
#define J_Bit (1<<24)
|
|
|
|
|
|
|
|
#endif
|