menu "BIOS Selection"
-config ROMBIOS_PATH
- string "Path to pre-built ROMBIOS binary"
+choice
+ prompt "Boot Code Selection"
+ default SEABIOS
+ help
+ Select which BIOSes to map into the default PC Class Hardware Configuration
+
+config SEABIOS
+ bool "Use the SEABIOS and SEABIOS-VGA Boot Code"
+ help
+ Use the SEABIOS and SEABIOS-VGA Boot code
+
+
+config BOCHSBIOS
+ bool "Use the BOCHS BIOS and BOCHS BIOS-compatible VGA Boot Code"
+ help
+ Use the BOCHS BIOS and BOCHS-BIOS-compatible VGA Boot Code
+
+
+config OTHERBIOS
+ bool "Use a user-specified BIOS"
+ help
+ Use a user-specified BIOS
+
+
+endchoice
+
+
+config SEABIOS_PATH
+ string "Path to pre-built SEABIOS binary"
+ depends on SEABIOS
+ default "./bios/seabios/out/bios.bin"
+ help
+ Path to the SEABIOS binary to use
+
+config SEABIOSVGA_PATH
+ string "Path to pre-built SEABIOS-VGA binary"
+ depends on SEABIOS
+ default "./bios/seabios-vga/VGABIOS-lgpl-latest.bin"
+ help
+ This is the SEABIOS-compatible vgabios that will be used for the guest
+
+config BOCHSBIOS_PATH
+ string "Path to pre-built BOCHS BIOS binary"
+ depends on BOCHSBIOS
default "./bios/rombios/BIOS-bochs-latest"
help
This is the rombios that will be used for the guests
-config VGABIOS_PATH
- string "Path to pre-built VGABIOS binary"
+config BOCHSBIOSVGA_PATH
+ string "Path to pre-built BOCHS-compatible VGABIOS binary"
+ depends on BOCHSBIOS
default "./bios/vgabios/VGABIOS-lgpl-latest.bin"
help
This is the vgabios that will be used for the guests
+config OTHERBIOS_PATH
+ string "Path to user-specified Boot Code"
+ depends on OTHERBIOS
+ help
+ This is a completely user-determined blob that will be mapped into the guest
+ No VGA BIOS will be mapped!
+
+config BIOS_START
+ hex "Starting address (linear address) of BIOS"
+ range 0xe0000 0xe0000 if SEABIOS
+ range 0xf0000 0xf0000 if BOCHSBIOS
+ help
+ This is the starting address (linear address) of the BIOS code
+
+
+
config VMXASSIST_PATH
string "Path to pre-built VMXASSIST binary"
depends on VMX
v3_vmxassist_end:
#endif
-
+#if V3_CONFIG_SEABIOS || V3_CONFIG_BOCHSBIOS
.globl v3_vgabios_start
v3_vgabios_start:
-.incbin V3_CONFIG_VGABIOS_PATH
+#if V3_CONFIG_SEABIOS
+.incbin V3_CONFIG_SEABIOSVGA_PATH
+#endif
+#if V3_CONFIG_BOCHSBIOS
+.incbin V3_CONFIG_BOCHSBIOSVGA_PATH
+#endif
.global v3_vgabios_end
v3_vgabios_end:
+#endif
.globl v3_rombios_start
v3_rombios_start:
-.incbin V3_CONFIG_ROMBIOS_PATH
+#if V3_CONFIG_SEABIOS
+.incbin V3_CONFIG_SEABIOS_PATH
+#endif
+#if V3_CONFIG_ROMBIOS
+.incbin V3_CONFIG_BOCHBIOS_PATH
+#endif
+#if V3_CONFIG_OTHERBIOS
+.incbin V3_CONFIG_OTHERBIOS_PATH
+#endif
.globl v3_rombios_end
v3_rombios_end:
-
#ifdef V3_CONFIG_USE_PXE_BIOS
.globl pxebios_start
pxebios_start:
static int post_config_pc(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
+#
+
+
+#if defined(V3_CONFIG_SEABIOS) || defined(V3_CONFIG_ROMBIOS)
+
#define VGABIOS_START 0x000c0000
-#define ROMBIOS_START 0x000e0000
-
/* layout vgabios */
{
extern uint8_t v3_vgabios_start[];
memcpy(vgabios_dst, v3_vgabios_start, v3_vgabios_end - v3_vgabios_start);
}
+#endif
+
+
/* layout rombios */
{
extern uint8_t v3_rombios_start[];
extern uint8_t v3_rombios_end[];
void * rombios_dst = 0;
- if (v3_gpa_to_hva(&(vm->cores[0]), ROMBIOS_START, (addr_t *)&rombios_dst) == -1) {
+ if (v3_gpa_to_hva(&(vm->cores[0]), V3_CONFIG_BIOS_START, (addr_t *)&rombios_dst) == -1) {
PrintError(vm, VCORE_NONE, "Could not find ROMBIOS destination address\n");
return -1;
}
memcpy(rombios_dst, v3_rombios_start, v3_rombios_end - v3_rombios_start);
- // SEABIOS gets mapped into end of 4GB region
+#ifdef V3_CONFIG_SEABIOS
+ // SEABIOS is also mapped into end of 4GB region
if (v3_add_shadow_mem(vm, V3_MEM_CORE_ANY,
0xfffe0000, 0xffffffff,
(addr_t)V3_PAddr(rombios_dst)) == -1) {
PrintError(vm, VCORE_NONE, "Error mapping SEABIOS to end of memory\n");
return -1;
}
+#endif
}