Skip to content

Commit fd419aa

Browse files
committed
fixes
1 parent 09bcc9a commit fd419aa

5 files changed

Lines changed: 12 additions & 17 deletions

File tree

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,12 @@ rdrive = "0.20"
118118
rd-block = "0.1"
119119
pcie = "0.5.0"
120120

121-
# platform
122-
axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"}
123-
124121
# Optional driver dependencies
125122
sdmmc = { version = "0.1", default-features = false, features = ["pio"], optional = true }
126123
rk3588-clk = { version = "0.1", optional = true }
127124
rockchip-pm = { version = "0.4", optional = true }
128125
phytium-mci = { version = "0.1", default-features = false, features = ["pio"], optional = true }
129126

130-
[target.'cfg(target_arch = "aarch64")'.dependencies]
131-
aarch64-cpu-ext = "0.1"
132-
arm-gic-driver = {version = "0.17", features = ["rdif"]}
133-
134127
[target.'cfg(target_arch = "x86_64")'.dependencies]
135128
axplat-x86-qemu-q35 = { version = "0.2.0", default-features = false, features = [
136129
"reboot-on-system-off",
@@ -139,6 +132,13 @@ axplat-x86-qemu-q35 = { version = "0.2.0", default-features = false, features =
139132
] }
140133
axconfig = { version = "=0.3.0-preview.3", features = ["plat-dyn"] }
141134

135+
[target.'cfg(target_arch = "aarch64")'.dependencies]
136+
aarch64-cpu-ext = "0.1"
137+
arm-gic-driver = {version = "0.17", features = ["rdif"]}
138+
139+
[target.'cfg(target_arch = "riscv64")'.dependencies]
140+
axplat-riscv64-qemu-virt = "0.3.1-pre.6"
141+
142142
# xtask dependencies (only used when xtask feature is enabled)
143143
[target.'cfg(any(windows, unix))'.dependencies]
144144
anyhow = { version = "1.0", optional = true }

src/hal/arch/aarch64/api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ impl ArchIf for ArchImpl {
9595
.lock()
9696
.unwrap();
9797
if let Some(gic) = gic.typed_mut::<arm_gic_driver::v2::Gic>() {
98-
return u32::from(gic.cpu_interface().ack()) as _
98+
return u32::from(gic.cpu_interface().ack()) as _;
9999
}
100100
if let Some(gic) = gic.typed_mut::<arm_gic_driver::v3::Gic>() {
101-
return gic.cpu_interface().ack1().to_u32() as _
101+
return gic.cpu_interface().ack1().to_u32() as _;
102102
}
103103
panic!("No GIC driver found");
104104
}

src/hal/impl_host.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ struct HostImpl;
55
#[axvisor_api::api_impl]
66
impl HostIf for HostImpl {
77
fn get_host_cpu_num() -> usize {
8-
// std::os::arceos::modules::axconfig::plat::CPU_NUM
9-
axruntime::cpu_count()
8+
std::os::arceos::modules::axhal::cpu_num()
109
}
1110
}

src/hal/impl_vmm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use std::os::arceos::modules::{axhal, axtask};
33
use axaddrspace::{HostPhysAddr, HostVirtAddr};
44
use axerrno::{AxResult, ax_err_type};
55
use axvisor_api::vmm::{InterruptVector, VCpuId, VCpuSet, VMId, VmmIf};
6-
use axvm::AxVMHal;
76

87
use crate::{task::AsVCpuTask, vmm};
98

src/hal/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use std::os::arceos::{
16-
self,
17-
modules::{axhal::percpu::this_cpu_id},
18-
};
15+
use std::os::arceos::{self, modules::axhal::percpu::this_cpu_id};
1916

20-
use page_table_multiarch::PagingHandler;
2117
use arceos::modules::axhal;
2218
use axaddrspace::{AxMmHal, HostPhysAddr, HostVirtAddr};
2319
use axvm::AxVMPerCpu;
20+
use page_table_multiarch::PagingHandler;
2421

2522
#[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/mod.rs")]
2623
#[cfg_attr(target_arch = "x86_64", path = "arch/x86_64/mod.rs")]

0 commit comments

Comments
 (0)