mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-14 02:00:27 +00:00
This commit adds riscv build skeleton and adds some dummy files that
prints out hello world.
To build riscv acrn.out/acrn.bin, simply:
make hypervisor \
BOARD=<any existing board> \
SCENARIO=<any existing scenario> \
ARCH=riscv
We still need to specify board and scenario as those were required by
project level makefile.
Tracked-On: #8782
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
24 lines
525 B
C
24 lines
525 B
C
#define SBI_EXT_CONSOLE_PUTCHAR 0x01
|
|
#define SBI_EXT_CONSOLE_GETCHAR 0x02
|
|
|
|
#define SBI_FID_CONSOLE_PUTCHAR 0x0
|
|
#define SBI_FID_CONSOLE_GETCHAR 0x0
|
|
|
|
extern long sbi_call(long eid, long fid, long arg0, long arg1, long arg2, long arg3);
|
|
|
|
static void sbi_putchar(int ch) {
|
|
sbi_call(SBI_EXT_CONSOLE_PUTCHAR, SBI_FID_CONSOLE_PUTCHAR, ch, 0, 0, 0);
|
|
}
|
|
|
|
static void sbi_puts(const char *str) {
|
|
while (*str) {
|
|
sbi_putchar(*str);
|
|
str++;
|
|
}
|
|
}
|
|
|
|
void print_hello_world(void) {
|
|
sbi_puts("Hello World!\n");
|
|
}
|
|
|