Skip to content

Commit b964dcb

Browse files
author
szy
committed
add arceos qemu config.toml
1 parent 2858259 commit b964dcb

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Vm base info configs
2+
#
3+
[base]
4+
# Guest vm id.
5+
id = 1
6+
# Guest vm name.
7+
name = "arceos-qemu"
8+
# Virtualization type.
9+
vm_type = 1
10+
# The number of virtual CPUs.
11+
cpu_num = 1
12+
# Guest vm physical cpu ids.
13+
phys_cpu_ids = [0]
14+
15+
#
16+
# Vm kernel configs
17+
#
18+
[kernel]
19+
# The entry point of the kernel image.
20+
entry_point = 0x8020_0000
21+
# The location of image: "memory" | "fs".
22+
# load from memory.
23+
image_location = "memory"
24+
# The file path of the kernel image.
25+
kernel_path = "path/arceos-aarch64-dyn-smp1.bin"
26+
# The load address of the kernel image.
27+
kernel_load_addr = 0x8020_0000
28+
# The file path of the device tree blob (DTB).
29+
#dtb_path = "path/aarch64-qemu-gicv3.dtb"
30+
# The load address of the device tree blob (DTB).
31+
dtb_load_addr = 0x8000_0000
32+
33+
## The file path of the ramdisk image.
34+
# ramdisk_path = ""
35+
## The load address of the ramdisk image.
36+
# ramdisk_load_addr = 0
37+
## The path of the disk image.
38+
# disk_path = "disk.img"
39+
40+
# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`).
41+
# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`.
42+
memory_regions = [
43+
[0x8000_0000, 0x4000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL
44+
]
45+
46+
#
47+
# Device specifications
48+
#
49+
[devices]
50+
# Pass-through devices.
51+
passthrough_devices = [
52+
["/",],
53+
]
54+
55+
# Devices that are not desired to be passed through to the guest
56+
excluded_devices = [
57+
["/pcie@10000000"],
58+
]
59+
60+
# Emu_devices.
61+
# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig.
62+
emu_devices = [
63+
# ["gppt-gicd", 0x0800_0000, 0x1_0000, 0, 0x21, []],
64+
# ["gppt-gicr", 0x080a_0000, 0x2_0000, 0, 0x20, [1, 0x2_0000, 0]], # 1 vcpu, stride 0x20000, starts with pcpu 0
65+
# ["gppt-gits", 0x0808_0000, 0x2_0000, 0, 0x22, [0x0808_0000]], # host_gits_base
66+
]
67+
68+
interrupt_mode = "passthrough"
69+

src/vmm/fdt/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ pub fn update_fdt(dest_addr: GuestPhysAddr, fdt_src: NonNull<u8>, dtb_size: usiz
314314

315315
let new_fdt_bytes = new_fdt.finish().unwrap();
316316

317-
// print_guest_fdt(new_fdt_bytes.as_slice());
317+
// crate::vmm::fdt::print::print_guest_fdt(new_fdt_bytes.as_slice());
318318

319319
// Load the updated FDT into VM
320320
load_vm_image_from_memory(&new_fdt_bytes, dest_addr, vm.clone())

0 commit comments

Comments
 (0)