Simple Shell
實作一個 shell,支援以下指令:
- help
- hello
- timestamp
- reboot
main.c
|
|
shell.c
shell_input 基本上就是在 read_newline,然後處理一下 ANSI Escape。
|
|
shell_controller 根據 input 決定要執行什麼 function。
|
|
Registers
CNTFRQ_EL0
This register is provided so that software can discover the frequency of the system counter. It must be programmed with this value as part of system initialization. The value of the register is not interpreted by hardware.
https://developer.arm.com/docs/ddi0595/c/aarch64-system-registers/cntfrq_el0
CNTPCT_EL0
Holds the 64-bit physical count value.
https://developer.arm.com/docs/ddi0595/b/aarch64-system-registers/cntpct_el0