diff options
author | Anup Patel <apatel@ventanamicro.com> | 2023-11-24 12:39:02 +0530 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2024-01-10 07:04:03 -0800 |
commit | f43fabf444ca3c4c74bf5fa5211bb2d0548715c4 (patch) | |
tree | 301f08cfea0c633900e103c641c7908b6ea67f3f /arch/riscv/include | |
parent | f503b167b66007fc6b4434cd07a044ce4a56b6a0 (diff) | |
download | linux-f43fabf444ca3c4c74bf5fa5211bb2d0548715c4.tar.gz linux-f43fabf444ca3c4c74bf5fa5211bb2d0548715c4.tar.bz2 linux-f43fabf444ca3c4c74bf5fa5211bb2d0548715c4.zip |
RISC-V: Add SBI debug console helper routines
Let us provide SBI debug console helper routines which can be
shared by serial/earlycon-riscv-sbi.c and hvc/hvc_riscv_sbi.c.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20231124070905.1043092-3-apatel@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r-- | arch/riscv/include/asm/sbi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 66f3933c14f6..9eef25308d53 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -334,6 +334,11 @@ static inline unsigned long sbi_mk_version(unsigned long major, } int sbi_err_map_linux_errno(int err); + +extern bool sbi_debug_console_available; +int sbi_debug_console_write(const char *bytes, unsigned int num_bytes); +int sbi_debug_console_read(char *bytes, unsigned int num_bytes); + #else /* CONFIG_RISCV_SBI */ static inline int sbi_remote_fence_i(const struct cpumask *cpu_mask) { return -1; } static inline void sbi_init(void) {} |