# Vm base info configs
#
[base]
# Guest vm id.
id = 1
# Guest vm name.
name = "nimbos"
# Virtualization type.
vm_type = 1
# The number of virtual CPUs.
cpu_num = 1
# Guest vm physical cpu sets.
phys_cpu_sets = [1]

#
# Vm kernel configs
#
[kernel]
# The entry point of the kernel image.
entry_point = 0x8000
# The location of image: "memory" | "fs".
# Load from file system.
image_location = "fs"
# The file path of the kernel image.
kernel_path = "/guest/nimbos/nimbos-qemu"
# The load address of the kernel image.
kernel_load_addr = 0x20_0000
# Whether to enable BIOS boot flow.
enable_bios = true
# Legacy x86 boot flow uses axvm-bios and multiboot info patching.
boot_protocol = "multiboot"
# The file path of the BIOS image.
# NimbOS x86_64 needs axvm-bios at 0x8000 to bootstrap.
# bios_path = "/guest/nimbos/axvm-bios.bin"
# The load address of the BIOS image.
# bios_load_addr = 0x8000

## The file path of the ramdisk image.
# ramdisk_path = ""
## The load address of the ramdisk image.
# ramdisk_load_addr = 0
## The path of the disk image.
# disk_path = ""

# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`).
# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`, 2 means `MAP_RESERVED`.
memory_regions = [
  [0x0000_0000, 0x100_0000, 0x7, 0], # Low RAM		16M	0b111   R|W|EXECUTE
]

#
# Device specifications
#
[devices]
# The interrupt mode.
interrupt_mode = "passthrough"

# Emu_devices.
# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig.
emu_devices = []

# Pass-through devices.
# Name Base-Ipa Base-Pa Length Alloc-Irq.
passthrough_devices = [
  [
    "IO APIC",
    0xfec0_0000,
    0xfec0_0000,
    0x1000,
    0x1,
  ],
  [
    "HPET",
    0xfed0_0000,
    0xfed0_0000,
    0x1000,
    0x1,
  ],
]
