Skip to content

Commit 562cfdf

Browse files
committed
wip: migrate arceos
1 parent 846e265 commit 562cfdf

File tree

9 files changed

+179
-169
lines changed

9 files changed

+179
-169
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,41 @@ timer_list = "0.1"
3232
toml = "0.9"
3333

3434
# System dependent modules provided by ArceOS.
35-
axstd = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1", features = [
35+
# FIXME: pin to a specific tag!
36+
axstd = {git = "https://github.com/arceos-org/arceos.git", branch = "dev", features = [
3637
"alloc-level-1",
3738
"paging",
3839
"irq",
3940
"multitask",
4041
"smp", # "page-alloc-64g",
4142
]}
4243

43-
axalloc = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
44-
axconfig = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
45-
axdisplay = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
46-
axdriver = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
47-
axfs = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
48-
axhal = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
49-
axipi = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
50-
axlog = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
51-
axmm = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
52-
axnet = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
53-
axtask = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}
44+
axalloc = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
45+
axconfig = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
46+
axdisplay = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
47+
axdriver = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
48+
axfs = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
49+
axhal = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
50+
axipi = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
51+
axlog = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
52+
axmm = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
53+
axnet = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
54+
axtask = {git = "https://github.com/arceos-org/arceos.git", branch = "dev"}
5455

55-
axplat = {git = "https://github.com/arceos-hypervisor/axplat_crates.git", tag = "vmm-v0.3.0"}
56+
axcpu = {git = "https://github.com/arceos-org/axcpu.git", tag = "dev-v03"}
57+
axplat = {git = "https://github.com/arceos-org/axplat_crates.git", tag = "dev-v03"}
5658

5759
# System dependent modules provided by ArceOS-Hypervisor.
5860
axaddrspace = "0.1.1"
59-
axhvc = {git = "https://github.com/arceos-hypervisor/axhvc.git"}
61+
# FIXME: AsakuraMizu fork -> arceos-hypervisor!
62+
axhvc = {git = "https://github.com/AsakuraMizu/axhvc.git"}
63+
axklib = {git = "https://github.com/AsakuraMizu/axklib.git",branch = "dev"}
6064
axruntime = {path = "modules/axruntime"}
6165
axvcpu = "0.1"
62-
axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "next"}
66+
axvm = {git = "https://github.com/Asakuramizu/axvm.git", branch = "next-dev"}
6367

6468
# System independent crates provided by ArceOS, these crates could be imported by remote url.
65-
axerrno = "0.1.0"
69+
axerrno = "0.2"
6670
byte-unit = {version = "5", default-features = false, features = ["byte"]}
6771
crate_interface = "0.1"
6872
fdt-parser = "0.4"
@@ -88,6 +92,6 @@ axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branc
8892
axvcpu = {git = "https://github.com/arceos-hypervisor/axvcpu.git", branch = "next"}
8993
axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"}
9094

91-
[patch."https://github.com/arceos-hypervisor/arceos"]
95+
[patch."https://github.com/arceos-org/arceos"]
9296
axconfig = {path = "modules/axconfig"}
9397
axruntime = {path = "modules/axruntime"}

kernel/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ aarch64-cpu-ext = "0.1"
6262
arm-gic-driver = {version = "0.15.5", features = ["rdif"]}
6363

6464
[build-dependencies]
65-
axconfig = {git = "https://github.com/arceos-hypervisor/arceos.git", branch = "vmm-dev"}
65+
axconfig.workspace = true
6666
prettyplease = "0.2"
6767
quote = "1.0"
6868
syn = "2.0"

kernel/src/hal/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl AxVMHal for AxVMHalImpl {
6464
.ok_or_else(|| ax_err_type!(NotFound))
6565
}
6666

67-
fn inject_irq_to_vcpu(vm_id: usize, vcpu_id: usize, irq: usize) -> axerrno::AxResult {
67+
fn inject_irq_to_vcpu(vm_id: usize, vcpu_id: usize, irq: usize) -> AxResult {
6868
vmm::with_vm_and_vcpu_on_pcpu(vm_id, vcpu_id, move |_, vcpu| {
6969
vcpu.inject_interrupt(irq).unwrap();
7070
})

modules/axruntime/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ chrono = {version = "0.4.38", default-features = false}
5353
axplat-x86-qemu-q35 = {workspace = true}
5454

5555
[target.'cfg(target_arch = "aarch64")'.dependencies]
56-
axplat-aarch64-dyn = {git = "https://github.com/arceos-hypervisor/axplat-aarch64-dyn", tag = "v0.3.3", features = ["irq", "smp", "hv"]}
56+
# FIXME: AsakuraMizu fork -> arceos-aarch64-dyn!
57+
axplat-aarch64-dyn = {git = "https://github.com/AsakuraMizu/axplat-aarch64-dyn.git", branch = "v03", features = ["irq", "smp", "hv"]}
5758
somehal = "0.4"

modules/axruntime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fn is_init_ok() -> bool {
112112
#[cfg_attr(not(test), axplat::main)]
113113
pub fn rust_main(cpu_id: usize, arg: usize) -> ! {
114114
unsafe { axhal::mem::clear_bss() };
115-
axhal::init_percpu(cpu_id);
115+
axhal::percpu::init_primary(cpu_id);
116116
axhal::init_early(cpu_id, arg);
117117

118118
ax_println!("{}", LOGO);

modules/axruntime/src/mp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub fn start_secondary_cpus(primary_cpu_id: usize) {
3939
/// It is called from the bootstrapping code in the specific platform crate.
4040
#[axplat::secondary_main]
4141
pub fn rust_main_secondary(cpu_id: usize) -> ! {
42-
axhal::init_percpu_secondary(cpu_id);
42+
axhal::percpu::init_secondary(cpu_id);
4343
axhal::init_early_secondary(cpu_id);
4444

4545
ENTERED_CPUS.fetch_add(1, Ordering::Release);

modules/driver/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rockchip-pm = ["dep:rockchip-pm"]
1414
phytium-blk = ["dep:phytium-mci"]
1515

1616
[dependencies]
17-
axklib = {git = "https://github.com/arceos-hypervisor/axklib"}
17+
axklib.workspace = true
1818
log.workspace = true
1919
rdif-block = "0.6.2"
2020
rdif-clk = "0.4"

platform/x86-qemu-q35/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ smp = ["axplat/smp", "kspin/smp"]
1717

1818
[dependencies]
1919
axconfig-macros = "0.2"
20-
axcpu = "0.2"
20+
axcpu = {workspace = true}
2121
axplat = {workspace = true}
2222
bitflags = "2.6"
2323
heapless = "0.9"

0 commit comments

Comments
 (0)