From a3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb Mon Sep 17 00:00:00 2001 From: stefan Date: Sun, 23 Apr 2023 17:00:14 -0400 Subject: memory detection --- sys/include/sbi.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys/include/sbi.h') diff --git a/sys/include/sbi.h b/sys/include/sbi.h index 94c3749..86ca295 100644 --- a/sys/include/sbi.h +++ b/sys/include/sbi.h @@ -1,6 +1,8 @@ #ifndef _SBI_H #define _SBI_H +#include + struct sbiret { long err; long val; @@ -58,6 +60,12 @@ sbi_console_putchar(int c) sbi_ecall(1, 0, c, 0, 0, 0, 0, 0); } +static inline void +sbi_debug_console_write_byte(uint8_t byte) +{ + sbi_ecall(0x4442434E, 0x2, 'c', 0, 0, 0, 0, 0); +} + static inline void sbi_shutdown(void) { -- cgit v1.2.3