include: Add defines for SBI debug console extension
authorAnup Patel <apatel@ventanamicro.com>
Fri, 22 Jul 2022 10:55:51 +0000 (16:25 +0530)
committerAnup Patel <anup@brainfault.org>
Thu, 9 Feb 2023 16:51:24 +0000 (22:21 +0530)
We add SBI debug console extension related defines to the
SBI ecall interface header.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Xiang W <wxjstz@126.com>
include/sbi/sbi_ecall_interface.h

index a3f2bf4..9d6f474 100644 (file)
@@ -29,6 +29,7 @@
 #define SBI_EXT_HSM                            0x48534D
 #define SBI_EXT_SRST                           0x53525354
 #define SBI_EXT_PMU                            0x504D55
+#define SBI_EXT_DBCN                           0x4442434E
 
 /* SBI function IDs for BASE extension*/
 #define SBI_EXT_BASE_GET_SPEC_VERSION          0x0
@@ -230,6 +231,11 @@ enum sbi_pmu_ctr_type {
 /* Flags defined for counter stop function */
 #define SBI_PMU_STOP_FLAG_RESET (1 << 0)
 
+/* SBI function IDs for DBCN extension */
+#define SBI_EXT_DBCN_CONSOLE_WRITE             0x0
+#define SBI_EXT_DBCN_CONSOLE_READ              0x1
+#define SBI_EXT_DBCN_CONSOLE_WRITE_BYTE                0x2
+
 /* SBI base specification related macros */
 #define SBI_SPEC_VERSION_MAJOR_OFFSET          24
 #define SBI_SPEC_VERSION_MAJOR_MASK            0x7f