hex-five / multizone-sdk

MultiZone® Security TEE is the quick and safe way to add security and separation to any RISC-V processors. The RISC-V standard ISA doesn't define TrustZone-like primitives to provide hardware separation. To shield critical functionality from untrusted third-party components, MultiZone provides hardware-enforced, software-defined separation of multi
https://hex-five.com/multizone-security-tee-riscv/
Other
79 stars 24 forks source link

Update FreeRTOS App logic #21

Closed sandro2pinto closed 5 years ago

sandro2pinto commented 5 years ago

Stabilize FreeRTOS by increasing the stack and heap sizes as needed. Also don't use soft timers and change Semaphores to xTaskNotify, a lightweight mechanism for notifications.

borancar commented 5 years ago

I managed to trigger a fault. Here were my steps:

  1. Connect UART terminal
  2. Connect telnet
  3. Run robot 1 in the telnet window
  4. Run stats in the UART while the robot is dancing
  5. Run stats in the telnet while the robot is dancing:
    
    Z1 > robot 1

Z1 > stats 1069883 cycles in 16460 us 120567 cycles in 1854 us 1037971 cycles in 15969 us 633664 cycles in 9748 us 702768 cycles in 10812 us 415714 cycles in 6395 us 584967 cycles in 8999 us 375841 cycles in 5782 us 565408 cycles in 8698 us 535382 cycles in 8236 us 715824 cycles in 11013 us

cycles min/med/max = 120567/584967/1069883 time min/med/max = 1854/8999/16460 us

ctx sw instr min/med/max = 129/137/137 ctx sw cycles min/med/max = 263/451/492 Load access fault : 0x00000005 0x0000000b 0x204141d2 Load access fault : 0x00000005 0x00000007 0x204141d6 Illegal instruction : 0x00000002 0x0000fcf4 0x204141da

Press any key to restart

borancar commented 5 years ago

Seems I can reproduce by just running stats in the telnet window while the robot is dancing.

borancar commented 5 years ago

Seems the issues is fixed in https://github.com/hex-five/multizone-sdk/pull/21/commits/41f9f5589530e71cb04b7e449f893e9bcc2bc446. Good job, guys!