File tree Expand file tree Collapse file tree 3 files changed +17
-23
lines changed
components/hal/test_apps/tee
components/pms_and_cpu_intr/src Expand file tree Collapse file tree 3 files changed +17
-23
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ _test_panic_handler:
252252
253253 /* Executing the panic handler */
254254 li t0, 0xDEADC0DE
255- csrr t0, mscratch
255+ csrw mscratch, t0
256256 mv a0 , sp
257257 csrr a1 , mcause
258258 li t0, VECTORS_MCAUSE_REASON_MASK
Original file line number Diff line number Diff line change @@ -76,35 +76,29 @@ static const uint32_t test_peri_apm_lp_peri_reg[] = {
7676 BIT64(APM_TEE_LP_PERIPH_LP_PERI) | \
7777 BIT64(APM_TEE_LP_PERIPH_LP_APM))
7878
79- IRAM_ATTR static uint32_t reg_read (uint32_t addr )
79+ FORCE_INLINE_ATTR uint32_t reg_read (uint32_t addr )
8080{
81- uint32_t val ;
82- asm volatile (
83- "li t0, 0x100\n"
84- "lw %0, 0(%1)\n"
85- "1:\n"
86- "nop\n"
87- "addi t0, t0, -1\n"
88- "bnez t0, 1b\n"
89- : "=r" (val )
81+ uint32_t value ;
82+ __asm__ volatile (
83+ "lw %0, 0(%1)\n"
84+ "fence\n"
85+ "nop\nnop\nnop\nnop\n"
86+ : "=r" (value )
9087 : "r" (addr )
91- : "t0" , " memory"
88+ : "memory"
9289 );
93- return val ;
90+ return value ;
9491}
9592
96- IRAM_ATTR static void reg_write (uint32_t addr , uint32_t value )
93+ FORCE_INLINE_ATTR void reg_write (uint32_t addr , uint32_t value )
9794{
98- asm volatile (
99- "li t0, 0x100\n"
100- "sw %1, 0(%0)\n"
101- "1:\n"
102- "nop\n"
103- "addi t0, t0, -1\n"
104- "bnez t0, 1b\n"
95+ __asm__ volatile (
96+ "sw %1, 0(%0)\n"
97+ "fence\n"
98+ "nop\nnop\nnop\nnop\n"
10599 :
106100 : "r" (addr ), "r" (value )
107- : "t0" , " memory"
101+ : "memory"
108102 );
109103}
110104
Original file line number Diff line number Diff line change @@ -58,4 +58,4 @@ def test_tee_peri_apm(dut: IdfDut) -> None:
5858 indirect = ['config' , 'target' ],
5959)
6060def test_tee_interrupts (dut : IdfDut ) -> None :
61- dut .run_all_single_board_cases ()
61+ dut .run_all_single_board_cases (group = 'CPU' )
You can’t perform that action at this time.
0 commit comments