# Vm base info configs
#
[base]
# Guest vm id.
id = 1
# Guest vm name.
name = "linux"
# Virtualization type.
vm_type = 1
# The number of virtual CPUs.
cpu_num = 8
# Guest vm physical cpu sets.
phys_cpu_sets = [1, 2, 4, 8, 16, 32, 64, 128]
phys_cpu_ids = [0x00, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700]


#
# Vm kernel configs
#
[kernel]
# The entry point of the kernel image.
entry_point = 0x1008_0000
# The load address of the kernel image.
kernel_load_addr = 0x1008_0000
# The load address of the device tree blob (DTB).
dtb_load_addr = 0x1000_0000
# The location of image: "memory" | "fs".
# load from memory
image_location = "memory"
# The file path of the kernel image.
kernel_path = "/path/to/kernel"
# The file path of the device tree blob (DTB).
dtb_path = "/path/to/dtb"

## 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 = "disk.img"

# 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 = [
    [0x940_0000, 0xd550_0000, 0x7, 1], # ram 3G MAP_IDENTICAL
    [0x920_0000, 0x2000, 0xf, 2]
    
]

#
# 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 = [
    [
        "ramoops",
        0x11_0000,
        0x11_0000,
        0xf_0000,
        0x17,
    ],
    [
        "sram",
        0x10_f000,
        0x10_f000,
        0x1000,
        0x17,
    ],
    [
        "gpu",
        0xfb00_0000,
        0xfb00_0000,
        0x20_0000,
        0x17,
    ],
    [
        "uart8250 UART",
        0xfd00_0000,
        0xfd00_0000,
        0x200_0000,
        0x17,
    ],
    [
        "usb",
        0xfc00_0000,
        0xfc00_0000,
        0x100_0000,
        0x17,
    ],
    [
        "uncached",
        0x0,
        0x0,
        0x10_f000,
        0x17,
    ],
]

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

excluded_devices = [
   # ["/gic-v3"],
]