# 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_ids = [0]

#
# Vm kernel configs
#
[kernel]
# The entry point of the kernel image.
entry_point = 0x4008_0000
# The location of image: "memory" | "fs".
# Load from file system.
image_location = "fs"
# The file path of the kernel image.
kernel_path = "nimbos-aarch64.bin"
# kernel_path = "/home/debin/Codes/arm_tiny/build/arm_tiny.bin"
# The load address of the kernel image.
kernel_load_addr = 0x4008_0000

## The file path of the BIOS image.
# bios_path = ""
## The load address of the BIOS image.
# bios_load_addr = 0
## 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 = [
  [0x4000_0000, 0x100_0000, 0x7, 0], # Low RAM		    16M 0b00111 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 = [
  # [
  #   "vgicd-v2",
  #   0x800_0000,
  #   0x10_000,
  #   25,
  #   1,
  #   [2],
  # ], # Vgicdv2  4k irq-25 EmuDeviceTGicdV2  config: vcpu_num
]

# Pass-through devices.
# Name Base-Ipa Base-Pa Length Alloc-Irq.
passthrough_devices = [
    ["/"],
    #["/pl011@9000000"],
]

# Passthrough addresses.
# Base-GPA  Length.
passthrough_addresses = [
    #[0x28041000, 0x100_0000]
    [0x0800_0000, 0x100_0000]
]

# Devices that are not desired to be passed through to the guest
excluded_devices = [
    ["/pcie@10000000"],
]