diff options
author | sjorge <sjorge@blackdot.be> | 2018-08-11 17:06:22 +0200 |
---|---|---|
committer | Mike Gerdts <mike.gerdts@joyent.com> | 2018-08-13 22:44:52 +0000 |
commit | b50884db8d84f652919a0d7b6fd6dd3d28fb035e (patch) | |
tree | 48128d0fb82eda67138dcaa8381378f677ca296a | |
parent | 520fa152dc874dcf38e4285b33b63345deb3c905 (diff) | |
download | illumos-joyent-b50884db8d84f652919a0d7b6fd6dd3d28fb035e.tar.gz |
OS-7116 bhyve brand should accept bios and uefi values for bootrom
-rw-r--r-- | usr/src/lib/brand/bhyve/zone/boot.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/lib/brand/bhyve/zone/boot.c b/usr/src/lib/brand/bhyve/zone/boot.c index e29616a748..1e2c6771be 100644 --- a/usr/src/lib/brand/bhyve/zone/boot.c +++ b/usr/src/lib/brand/bhyve/zone/boot.c @@ -38,7 +38,8 @@ #define ZH_MAXARGS 100 -#define DEFAULT_BOOTROM "/usr/share/bhyve/uefi-csm-rom.bin" +#define DEFAULT_BOOTROM "/usr/share/bhyve/uefi-rom.bin" +#define DEFAULT_BOOTROM_CSM "/usr/share/bhyve/uefi-csm-rom.bin" typedef enum { PCI_SLOT_HOSTBRIDGE = 0, /* Not used here, but reserved */ @@ -419,6 +420,11 @@ add_lpc(int *argc, char **argv) } if (i == bootrom_idx) { found_bootrom = B_TRUE; + if (strcmp(val, "bios") == 0) { + val = DEFAULT_BOOTROM_CSM; + } else if (strcmp(val, "uefi") == 0) { + val = DEFAULT_BOOTROM; + } } if (snprintf(conf, sizeof (conf), "%s,%s", lpcdevs[i], val) >= sizeof (conf)) { @@ -434,7 +440,7 @@ add_lpc(int *argc, char **argv) if (!found_bootrom) { if (add_arg(argc, argv, "-l") != 0 || - add_arg(argc, argv, "bootrom," DEFAULT_BOOTROM) != 0) { + add_arg(argc, argv, "bootrom," DEFAULT_BOOTROM_CSM) != 0) { return (-1); } } |