arch: define struct arch_esf
and deprecate z_arch_esf_t
Make `struct arch_esf` compulsory for all architectures by declaring it in the `arch_interface.h` header. After this commit, the named struct `z_arch_esf_t` is only used internally to generate offsets, and is slated to be removed from the `arch_interface.h` header in the future. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
parent
3998e18ec4
commit
e54b27b967
105 changed files with 203 additions and 222 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
static volatile int expected_reason = -1;
|
||||
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *pEsf)
|
||||
{
|
||||
static bool triggered_synchronous_svc;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ static struct k_thread esf_collection_thread;
|
|||
/**
|
||||
* Validates that pEsf matches state from set_regs_with_known_pattern()
|
||||
*/
|
||||
static int check_esf_matches_expectations(const z_arch_esf_t *pEsf)
|
||||
static int check_esf_matches_expectations(const struct arch_esf *pEsf)
|
||||
{
|
||||
const uint16_t expected_fault_instruction = 0xde5a; /* udf #90 */
|
||||
const bool caller_regs_match_expected =
|
||||
|
@ -88,7 +88,7 @@ static int check_esf_matches_expectations(const z_arch_esf_t *pEsf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *pEsf)
|
||||
{
|
||||
TC_PRINT("Caught system error -- reason %d\n", reason);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ void arm_isr_handler(const void *args)
|
|||
test_flag++;
|
||||
}
|
||||
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *pEsf)
|
||||
{
|
||||
printk("Caught system error -- reason %d\n", reason);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ uint8_t *nmi_stacks[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
bool z_x86_do_kernel_nmi(const z_arch_esf_t *esf)
|
||||
bool z_x86_do_kernel_nmi(const struct arch_esf *esf)
|
||||
{
|
||||
uint64_t stack;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ static volatile int int_handler_executed;
|
|||
/* Assume the spurious interrupt handler will execute and abort the task */
|
||||
static volatile int spur_handler_aborted_thread = 1;
|
||||
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *esf)
|
||||
void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *esf)
|
||||
{
|
||||
if (reason != K_ERR_SPURIOUS_IRQ) {
|
||||
printk("wrong error reason\n");
|
||||
|
@ -89,7 +89,7 @@ void isr_handler(void)
|
|||
*
|
||||
*/
|
||||
|
||||
void exc_divide_error_handler(z_arch_esf_t *p_esf)
|
||||
void exc_divide_error_handler(struct arch_esf *p_esf)
|
||||
{
|
||||
p_esf->eip += 2;
|
||||
/* provide evidence that the handler executed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue