Skip to content

Commit c39afe5

Browse files
bullhhszy
andauthored
host fdt parser and guest fdt crate (#260)
--------- Co-authored-by: szy <[email protected]>
1 parent 294df73 commit c39afe5

25 files changed

+5648
-752
lines changed

Cargo.lock

Lines changed: 82 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,5 @@ toml = {version = "0.9"}
8989

9090
[patch.crates-io]
9191
axvcpu = {git = "https://github.com/arceos-hypervisor/axvcpu.git", branch = "next"}
92+
axvmconfig = { git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next" }
93+

configs/vms/arceos-aarch64-e2000-smp1.toml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ vm_type = 1
1111
cpu_num = 1
1212
# The physical CPU ids.
1313
phys_cpu_ids = [0x00]
14-
# Guest vm physical cpu sets.
15-
phys_cpu_sets = [4]
1614

1715
#
1816
# Vm kernel configs
@@ -29,7 +27,7 @@ kernel_load_addr = 0x20_2008_0000
2927
kernel_path = "/path/to/arceos_aarch64-dyn_smp1.bin"
3028
## The file path of the device tree blob (DTB).
3129
dtb_load_addr = 0x20_2000_0000
32-
dtb_path = "/path/to/axvisor/configs/vms/arceos-aarch64-e2000_smp1.dtb"
30+
#dtb_path = "/path/to/axvisor/configs/vms/arceos-aarch64-e2000_smp1.dtb"
3331
# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`).
3432
# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`.
3533
memory_regions = [
@@ -47,25 +45,11 @@ emu_devices = []
4745
# Pass-through devices.
4846
# Name Base-Ipa Base-Pa Length Alloc-Irq.
4947
passthrough_devices = [
50-
[
51-
"UART1",
52-
0x2800_d000,
53-
0x2800_d000,
54-
0x1000,
55-
0x1,
56-
],
57-
[
58-
"gic-v3",
59-
0x3080_0000,
60-
0x3080_0000,
61-
0x10000,
62-
0x1,
63-
],
64-
[
65-
"gic-v3-its",
66-
0x3082_0000,
67-
0x3082_0000,
68-
0x100000,
69-
0x1,
70-
],
48+
["/"],
49+
#["/timer"],
7150
]
51+
52+
# Devices that are not desired to be passed through to the guest
53+
excluded_devices = [
54+
# ["/gic-v3"],
55+
]

configs/vms/arceos-aarch64-e2000-smp2.toml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ vm_type = 1
1111
cpu_num = 2
1212
# The physical CPU ids.
1313
phys_cpu_ids = [0x201, 0x100]
14-
# Guest vm physical cpu sets.
15-
phys_cpu_sets = [2, 8]
16-
1714
#
1815
# Vm kernel configs
1916
#
@@ -29,7 +26,7 @@ kernel_load_addr = 0x20_2008_0000
2926
kernel_path = "/path/to/arceos_aarch64-dyn_smp1.bin"
3027
## The file path of the device tree blob (DTB).
3128
dtb_load_addr = 0x20_2000_0000
32-
dtb_path = "/path/to/axvisor/configs/vms/arceos-aarch64-e2000_smp2.dtb"
29+
#dtb_path = "/path/to/axvisor/configs/vms/arceos-aarch64-e2000_smp2.dtb"
3330
# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`).
3431
# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`.
3532
memory_regions = [
@@ -47,25 +44,11 @@ emu_devices = []
4744
# Pass-through devices.
4845
# Name Base-Ipa Base-Pa Length Alloc-Irq.
4946
passthrough_devices = [
50-
[
51-
"UART1",
52-
0x2800_d000,
53-
0x2800_d000,
54-
0x1000,
55-
0x1,
56-
],
57-
[
58-
"gic-v3",
59-
0x3080_0000,
60-
0x3080_0000,
61-
0x10000,
62-
0x1,
63-
],
64-
[
65-
"gic-v3-its",
66-
0x3082_0000,
67-
0x3082_0000,
68-
0x100000,
69-
0x1,
70-
],
47+
["/"],
48+
#["/timer"],
7149
]
50+
51+
# Devices that are not desired to be passed through to the guest
52+
excluded_devices = [
53+
# ["/gic-v3"],
54+
]

0 commit comments

Comments
 (0)