arch: rename all esf struct to struct arch_esf
Rename every architecture's esf struct to `struct esf`. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
parent
31742d0294
commit
3998e18ec4
23 changed files with 42 additions and 39 deletions
|
@ -36,7 +36,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_SECURE
|
||||
struct _irq_stack_frame {
|
||||
struct arch_esf {
|
||||
#ifdef CONFIG_ARC_HAS_ZOL
|
||||
uintptr_t lp_end;
|
||||
uintptr_t lp_start;
|
||||
|
@ -72,7 +72,7 @@ struct _irq_stack_frame {
|
|||
uintptr_t status32;
|
||||
};
|
||||
#else
|
||||
struct _irq_stack_frame {
|
||||
struct arch_esf {
|
||||
uintptr_t r0;
|
||||
uintptr_t r1;
|
||||
uintptr_t r2;
|
||||
|
@ -108,7 +108,7 @@ struct _irq_stack_frame {
|
|||
};
|
||||
#endif
|
||||
|
||||
typedef struct _irq_stack_frame _isf_t;
|
||||
typedef struct arch_esf _isf_t;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct __esf _esf_t;
|
||||
typedef struct arch_esf _esf_t;
|
||||
typedef struct __basic_sf _basic_sf_t;
|
||||
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
|
||||
typedef struct __fpu_sf _fpu_sf_t;
|
||||
|
|
|
@ -102,7 +102,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
* dropping into EL0.
|
||||
*/
|
||||
|
||||
pInitCtx = Z_STACK_PTR_TO_FRAME(struct __esf, stack_ptr);
|
||||
pInitCtx = Z_STACK_PTR_TO_FRAME(struct arch_esf, stack_ptr);
|
||||
|
||||
pInitCtx->x0 = (uint64_t)entry;
|
||||
pInitCtx->x1 = (uint64_t)p1;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct __esf _esf_t;
|
||||
typedef struct arch_esf _esf_t;
|
||||
typedef struct __basic_sf _basic_sf_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -19,11 +19,11 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
char *stack_ptr, k_thread_entry_t entry,
|
||||
void *p1, void *p2, void *p3)
|
||||
{
|
||||
struct __esf *stack_init;
|
||||
struct arch_esf *stack_init;
|
||||
|
||||
/* Initial stack frame for thread */
|
||||
stack_init = (struct __esf *)Z_STACK_PTR_ALIGN(
|
||||
Z_STACK_PTR_TO_FRAME(struct __esf, stack_ptr)
|
||||
stack_init = (struct arch_esf *)Z_STACK_PTR_ALIGN(
|
||||
Z_STACK_PTR_TO_FRAME(struct arch_esf, stack_ptr)
|
||||
);
|
||||
|
||||
/* Setup the initial stack frame */
|
||||
|
|
|
@ -88,7 +88,7 @@ config RISCV_SOC_HAS_ISR_STACKING
|
|||
guarded by !_ASMLANGUAGE. The ESF should be defined to account for
|
||||
the hardware stacked registers in the proper order as they are
|
||||
saved on the stack by the hardware, and the registers saved by the
|
||||
software macros. The structure must be called '__esf'.
|
||||
software macros. The structure must be called 'struct arch_esf'.
|
||||
|
||||
config RISCV_SOC_HAS_CUSTOM_IRQ_HANDLING
|
||||
bool
|
||||
|
|
|
@ -23,15 +23,15 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
void *p1, void *p2, void *p3)
|
||||
{
|
||||
extern void z_riscv_thread_start(void);
|
||||
struct __esf *stack_init;
|
||||
struct arch_esf *stack_init;
|
||||
|
||||
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
|
||||
const struct soc_esf soc_esf_init = {SOC_ESF_INIT};
|
||||
#endif
|
||||
|
||||
/* Initial stack frame for thread */
|
||||
stack_init = (struct __esf *)Z_STACK_PTR_ALIGN(
|
||||
Z_STACK_PTR_TO_FRAME(struct __esf, stack_ptr)
|
||||
stack_init = (struct arch_esf *)Z_STACK_PTR_ALIGN(
|
||||
Z_STACK_PTR_TO_FRAME(struct arch_esf, stack_ptr)
|
||||
);
|
||||
|
||||
/* Setup the initial stack frame */
|
||||
|
|
|
@ -20,7 +20,7 @@ extern "C" {
|
|||
|
||||
#ifdef _ASMLANGUAGE
|
||||
#else
|
||||
typedef struct _irq_stack_frame z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -54,7 +54,7 @@ struct __extra_esf_info {
|
|||
};
|
||||
#endif /* CONFIG_EXTRA_EXCEPTION_INFO */
|
||||
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
#if defined(CONFIG_EXTRA_EXCEPTION_INFO)
|
||||
struct __extra_esf_info extra_info;
|
||||
#endif
|
||||
|
@ -75,7 +75,7 @@ struct __esf {
|
|||
|
||||
extern uint32_t z_arm_coredump_fault_sp;
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
extern void z_arm_exc_exit(bool fatal);
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ struct __extra_esf_info {
|
|||
};
|
||||
#endif /* CONFIG_EXTRA_EXCEPTION_INFO */
|
||||
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
struct __basic_sf {
|
||||
sys_define_gpr_with_alias(a1, r0);
|
||||
sys_define_gpr_with_alias(a2, r1);
|
||||
|
@ -119,7 +119,7 @@ struct __esf {
|
|||
|
||||
extern uint32_t z_arm_coredump_fault_sp;
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
extern void z_arm_exc_exit(void);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
uint64_t x0;
|
||||
uint64_t x1;
|
||||
uint64_t x2;
|
||||
|
@ -55,7 +55,7 @@ struct __esf {
|
|||
#endif
|
||||
} __aligned(16);
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
unsigned long ra; /* return address */
|
||||
unsigned long gp; /* global pointer */
|
||||
|
||||
|
@ -50,7 +50,7 @@ struct __esf {
|
|||
unsigned long cause;
|
||||
};
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
uint32_t ra; /* return address r31 */
|
||||
uint32_t r1; /* at */
|
||||
uint32_t r2; /* return value */
|
||||
|
@ -35,7 +35,7 @@ struct __esf {
|
|||
uint32_t instr; /* Instruction being executed when exc occurred */
|
||||
};
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
uint32_t dummy; /*maybe we will want to add something someday*/
|
||||
};
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ struct soc_esf {
|
|||
#if defined(CONFIG_RISCV_SOC_HAS_ISR_STACKING)
|
||||
SOC_ISR_STACKING_ESF_DECLARE;
|
||||
#else
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
unsigned long ra; /* return address */
|
||||
|
||||
unsigned long t0; /* Caller-saved temporary register */
|
||||
|
@ -87,7 +87,7 @@ struct __esf {
|
|||
} __aligned(16);
|
||||
#endif /* CONFIG_RISCV_SOC_HAS_ISR_STACKING */
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
|
||||
typedef struct soc_esf soc_esf_t;
|
||||
#endif
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __esf {
|
||||
struct arch_esf {
|
||||
uint32_t out[8];
|
||||
uint32_t global[8];
|
||||
uint32_t psr;
|
||||
|
@ -25,7 +25,7 @@ struct __esf {
|
|||
uint32_t y;
|
||||
};
|
||||
|
||||
typedef struct __esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ extern "C" {
|
|||
* Those registers are pushed onto the stack by _ExcEnt().
|
||||
*/
|
||||
|
||||
typedef struct nanoEsf {
|
||||
typedef struct arch_esf {
|
||||
#ifdef CONFIG_GDBSTUB
|
||||
unsigned int ss;
|
||||
unsigned int gs;
|
||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
|||
* the exception stack frame
|
||||
*/
|
||||
|
||||
struct x86_esf {
|
||||
struct arch_esf {
|
||||
#ifdef CONFIG_EXCEPTION_DEBUG
|
||||
/* callee-saved */
|
||||
unsigned long rbx;
|
||||
|
@ -53,7 +53,7 @@ struct x86_esf {
|
|||
unsigned long ss;
|
||||
};
|
||||
|
||||
typedef struct x86_esf z_arch_esf_t;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
|
||||
struct x86_ssf {
|
||||
unsigned long rip;
|
||||
|
|
|
@ -25,6 +25,9 @@ extern "C" {
|
|||
* register windows are in use. This isn't a struct type, it just
|
||||
* matches the register/stack-unit width.
|
||||
*/
|
||||
struct arch_esf {
|
||||
int dummy;
|
||||
};
|
||||
typedef int z_arch_esf_t;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -95,7 +95,7 @@ class GdbStub_ARM64(GdbStub):
|
|||
self.registers[RegNum.X17] = tu[17]
|
||||
self.registers[RegNum.X18] = tu[18]
|
||||
|
||||
# Callee saved registers are not provided in __esf structure
|
||||
# Callee saved registers are not provided in arch_esf structure
|
||||
# So they will be omitted (set to undefined) when stub generates the
|
||||
# packet in handle_register_group_read_packet.
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#if DT_PROP(VPR_CPU, nordic_bus_width) == 64
|
||||
|
||||
#define SOC_ISR_STACKING_ESF_DECLARE \
|
||||
struct __esf { \
|
||||
struct arch_esf { \
|
||||
unsigned long s0; \
|
||||
unsigned long mstatus; \
|
||||
unsigned long tp; \
|
||||
|
@ -40,7 +40,7 @@
|
|||
#else /* DT_PROP(VPR_CPU, nordic_bus_width) == 32 */
|
||||
|
||||
#define SOC_ISR_STACKING_ESF_DECLARE \
|
||||
struct __esf { \
|
||||
struct arch_esf { \
|
||||
unsigned long s0; \
|
||||
unsigned long mstatus; \
|
||||
unsigned long tp; \
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
struct esf;
|
||||
typedef struct esf z_arch_esf_t;
|
||||
struct arch_esf;
|
||||
typedef struct arch_esf z_arch_esf_t;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -74,7 +74,7 @@ static int check_esf_matches_expectations(const z_arch_esf_t *pEsf)
|
|||
* is overwritten in fault.c)
|
||||
*/
|
||||
if (memcmp((void *)callee_regs->psp, pEsf,
|
||||
offsetof(struct __esf, basic.xpsr)) != 0) {
|
||||
offsetof(struct arch_esf, basic.xpsr)) != 0) {
|
||||
printk("psp does not match __basic_sf provided\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue