zhugengyu
3 years ago
16 changed files with 240 additions and 71 deletions
@ -0,0 +1,96 @@ |
|||
/*
|
|||
* @ : Copyright (c) 2021 Phytium Information Technology, Inc. |
|||
* |
|||
* SPDX-License-Identifier: Apache-2.0. |
|||
* |
|||
* @Date: 2021-07-06 08:08:20 |
|||
* @LastEditTime: 2021-07-06 14:41:37 |
|||
* @Description: This files is for |
|||
* |
|||
* @Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
*/ |
|||
|
|||
#include <stdio.h> |
|||
#include "aarch32.h" |
|||
|
|||
//#define EXCEPTION_DEBUG_ON
|
|||
|
|||
void FiqDebug() |
|||
{ |
|||
#ifdef EXCEPTION_DEBUG_ON |
|||
printf("fiq abort\r\n"); |
|||
#endif |
|||
} |
|||
|
|||
void UdfDebug() |
|||
{ |
|||
#ifdef EXCEPTION_DEBUG_ON |
|||
printf("undefine abort\r\n"); |
|||
#endif |
|||
} |
|||
|
|||
void SwiDebug() |
|||
{ |
|||
#ifdef EXCEPTION_DEBUG_ON |
|||
printf("software irq abort\r\n"); |
|||
#endif |
|||
} |
|||
|
|||
void PrfDebug() |
|||
{ |
|||
#ifdef EXCEPTION_DEBUG_ON |
|||
printf("prefetch abort\r\n"); |
|||
#endif |
|||
} |
|||
|
|||
void DatDebug() |
|||
{ |
|||
#ifdef EXCEPTION_DEBUG_ON |
|||
printf("data abort\r\n"); |
|||
#endif |
|||
} |
|||
|
|||
void TraceDebug() |
|||
{ |
|||
printf("stub \r\n"); |
|||
} |
|||
|
|||
void TraceDebug1() |
|||
{ |
|||
printf("stub 1\r\n"); |
|||
} |
|||
|
|||
void TraceDebug2() |
|||
{ |
|||
printf("stub 1\r\n"); |
|||
} |
|||
|
|||
void TraceMRC() |
|||
{ |
|||
/* bit : 0 -- M – Enable the MMU
|
|||
1 -- A – Alignment check enable |
|||
2 -- C – Cache enable bit |
|||
11 -- Z – Branch prediction enable |
|||
12 -- I – Instruction cache enable bit |
|||
13 -- V – This bit selects the base address of the exception vector table |
|||
21 -- FI – FIQ configuration enable |
|||
22 -- U – Indicates use of the alignment model. |
|||
25 -- EE - Exception endianness |
|||
30 -- TE – Thumb exception enable */ |
|||
printf("MRC: 0x%x\r\n", aarch32_sctrl_get()); |
|||
} |
|||
|
|||
void TraceTLB() |
|||
{ |
|||
/*
|
|||
TTBR0 |
|||
*/ |
|||
printf("TLB: 0x%x\r\n", aarch32_cntp_tlb_get()); |
|||
} |
|||
|
|||
void TraceR0(u32 r0) |
|||
{ |
|||
printf("r0: 0x%x \r\n", r0); |
|||
} |
Loading…
Reference in new issue