Synchronous Exception Handler
目前在 sync_exc_router
會透過 ESR_EL1
帶的 EC 與 ISS 決定執行哪個 handler,目前先簡易的實作一個可以動的 System call,之後會再將 System call number 改為透過正常的參數傳遞。
exception.c
|
|
shell.c
按照 spec 要求實作 exc
指令,用於測試 Synchronous Exception
|
|
util.c
因為 shell 現在執行在 EL0,不能直接碰到 System Registers,所以 timestamp
指令也需要透過 system call 下去拿到頻率與 counter 再進行相除,正常來說應該要把一個指標當作參數傳進 system call 拿到對應的值,但目前還沒有這麼高級。
|
|
More details: ESR_EL1
Holds syndrome information for an exception taken to EL1.
[63:32] | [31:26] | [25] | [24:0] |
---|---|---|---|
Reserved | EC | IL | ISS |
- EC: Exception Class. Indicates the reason for the exception that this register holds information about.
- IL: Instruction Length for synchronous exceptions.
- ISS: Instruction Specific Syndrome.
When EC = 0b000000 (exception with an unknown reason), ISS is not valid