Fix: mbox output

This commit is contained in:
2025-03-11 17:52:11 +08:00
parent 73c9fc1423
commit bfcb951628
5 changed files with 70 additions and 21 deletions

View File

@@ -6,6 +6,11 @@
#define INPUT_BUFLEN 1000
#define PM_PASSWORD 0x5a000000
#define PM_RSTC 0x3F10001c
#define PM_WDOG 0x3F100024
void help (void)
{
uart_puts(
@@ -23,16 +28,24 @@ void hello (void)
void hwinfo (void)
{
unsigned int val = get_board_revision();
uart_puts("hwinfo: ");
uart_hex(val);
uart_puts(
"hwinfo: " ENDL
"board revision: "
);
uart_hex(get_board_revision());
uart_puts(
ENDL
"memory base addr: "
);
uart_hex(get_memory_base_addr());
uart_puts(
ENDL
"memory size: "
);
uart_hex(get_memory_size());
uart_puts(ENDL);
}
#define PM_PASSWORD 0x5a000000
#define PM_RSTC 0x3F10001c
#define PM_WDOG 0x3F100024
void set(long addr, unsigned int value) {
volatile unsigned int* point = (unsigned int*)addr;
*point = value;