hv: riscv: Adds initial vsbi DBCN extension

Currently dbcn outputs directly to console. Outputs to ACRN
shell vm_console when other dependencies are ready.

Tracked-On: #8841
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
This commit is contained in:
Yifan Liu
2025-11-02 03:48:51 +00:00
committed by acrnsi-robot
parent 3dc927bf45
commit fd1dcf3f25
4 changed files with 86 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ enum sbi_eid {
SBI_EID_HSM = 0x48534D,
SBI_EID_SRST = 0x53525354,
SBI_EID_PMU = 0x504D55,
SBI_EID_DBCN = 0x4442434E,
SBI_EID_MPXY = 0x4D505859,
/* Experimental extensions must lie within this range */
@@ -92,6 +93,11 @@ enum sbi_eid {
#define SBI_SRST_RESET_REASON_NONE 0x0
#define SBI_SRST_RESET_REASON_SYSFAIL 0x1
/* 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 return error codes */
#define SBI_SUCCESS 0
#define SBI_ERR_FAILED -1