Skip to content

Commit 755947e

Browse files
authored
feat: update Orange Pi 5 Plus configurations and enhance virtualization handling (#81)
1 parent c1cea13 commit 755947e

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ phys_cpu_ids = [0x200]
2020
entry_point = 0x4008_0000
2121
# The location of image: "memory" | "fs".
2222
# Load from memory.
23-
image_location = "memory"
23+
image_location = "fs"
2424
# The load address of the kernel image.
2525
kernel_load_addr = 0x4008_0000
2626
## The file path of the kernel image.
27-
kernel_path = "../images/orangepi_arceos/orangepi-5-plus"
27+
kernel_path = "/guest/arceos/orangepi-5-plus"
2828
## The file path of the device tree blob (DTB).
2929
dtb_load_addr = 0x4000_0000
3030
#dtb_path = "/path/arceos-rk3568.dtb"

configs/vms/linux-aarch64-orangepi5p-smp1.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ phys_cpu_ids = [0x00]
2020
entry_point = 0x2_4008_0000
2121
# The location of image: "memory" | "fs".
2222
# Load from file system.
23-
image_location = "memory"
23+
image_location = "fs"
2424
# The load address of the kernel image.
2525
kernel_load_addr = 0x2_4008_0000
2626
## The file path of the kernel image.
2727
# kernel_path = "/guest/orangepi-5-plus"
28-
kernel_path = "../images/orangepi_linux/orangepi-5-plus"
28+
kernel_path = "/guest/linux/orangepi-5-plus"
2929
## The file path of the device tree blob (DTB).
3030
dtb_load_addr = 0x2_4000_0000
3131
# dtb_path = "/path/to/axvisor/configs/vms/orangepi-5-plus-guest.dtb"
3232

33-
# ramdisk_path = "/home/orangepi/initramfs.cpio"
34-
# # The load address of the ramdisk image (U-Boot ramdisk_addr_r).
35-
# ramdisk_load_addr = 0xc000_0000
33+
ramdisk_path = "/guest/linux/initramfs.cpio"
34+
# The load address of the ramdisk image (U-Boot ramdisk_addr_r).
35+
ramdisk_load_addr = 0xc000_0000
3636

3737
# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`).
3838
# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`.

src/hal/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ pub(crate) fn enable_virtualization() {
122122

123123
// Wait for all cores to enable virtualization.
124124
while CORES.load(Ordering::Acquire) != cpu_count {
125-
// Use `yield_now` instead of `core::hint::spin_loop` to avoid deadlock.
126125
thread::yield_now();
126+
for _ in 0..10 {
127+
core::hint::spin_loop();
128+
}
127129
}
128130

129131
info!("All cores have enabled hardware virtualization support.");

0 commit comments

Comments
 (0)