DM: add command line parameter for pSRAM
dm: pSRAM: added a command line parameter "--psram" to enable pSRAM
support for post-launched RTVM
Added "--psram" in DM command line to enable pSRAM support for
post-launched RTVM
Acked-by: Wang, Yu1
@@ -145,6 +145,7 @@ usage(int code)
" %*s [--vtpm2 sock_path] [--virtio_poll interval] [--mac_seed seed_string]\n"
" %*s [--vmcfg sub_options] [--dump vm_idx] [--debugexit] \n"
" %*s [--logger-setting param_setting] [--pm_notify_channel]\n"
+ " %*s [--psram]\n"
" %*s [--pm_by_vuart vuart_node] <vm>\n"
" -A: create ACPI tables\n"
" -B: bootargs for kernel\n"
@@ -167,6 +168,7 @@ usage(int code)
" --dump: show build-in VM configurations\n"
#endif
" --vsbl: vsbl file path\n"
+ " --psram: Enable pSRAM passthrough\n"
" --ovmf: ovmf file path\n"
" --cpu_affinity: list of pCPUs assigned to this VM\n"
" --part_info: guest partition info file path\n"
@@ -185,7 +187,7 @@ usage(int code)
" --pm_by_vuart:pty,/run/acrn/vuart_vmname or tty,/dev/ttySn\n"
" --windows: support Oracle virtio-blk, virtio-net and virtio-input devices\n"
" for windows guest with secure boot\n",
- progname, (int)strnlen(progname, PATH_MAX), "",
+ progname, (int)strnlen(progname, PATH_MAX), "", (int)strnlen(progname, PATH_MAX), "",
(int)strnlen(progname, PATH_MAX), "", (int)strnlen(progname, PATH_MAX), "",
(int)strnlen(progname, PATH_MAX), "", (int)strnlen(progname, PATH_MAX), "",
(int)strnlen(progname, PATH_MAX), "", (int)strnlen(progname, PATH_MAX), "",
@@ -750,6 +752,7 @@ enum {
CMD_OPT_VTPM2,
CMD_OPT_LAPIC_PT,
CMD_OPT_RTVM,
+ CMD_OPT_PSRAM,
CMD_OPT_LOGGER_SETTING,
CMD_OPT_PM_NOTIFY_CHANNEL,
CMD_OPT_PM_BY_VUART,
@@ -791,6 +794,7 @@ static struct option long_options[] = {
{"vtpm2", required_argument, 0, CMD_OPT_VTPM2},
{"lapic_pt", no_argument, 0, CMD_OPT_LAPIC_PT},
{"rtvm", no_argument, 0, CMD_OPT_RTVM},
+ {"psram", no_argument, 0, CMD_OPT_PSRAM},
{"logger_setting", required_argument, 0, CMD_OPT_LOGGER_SETTING},
{"pm_notify_channel", required_argument, 0, CMD_OPT_PM_NOTIFY_CHANNEL},
{"pm_by_vuart", required_argument, 0, CMD_OPT_PM_BY_VUART},
@@ -934,6 +938,10 @@ main(int argc, char *argv[])
case CMD_OPT_RTVM:
is_rtvm = true;
break;
+ case CMD_OPT_PSRAM:
+ /* TODO: we need to support parameter to specify pSRAM size in the future */
+ pt_ptct = true;
+ break;
case CMD_OPT_ACPIDEV_PT:
if (parse_pt_acpidev(optarg) != 0)
errx(EX_USAGE, "invalid pt acpi dev param %s", optarg);
