Skip to content

Commit ba1fd72

Browse files
Josen-Bhky1999aarkegz
authored
add new module axipi (arceos-org#283)
--------- Co-authored-by: hky1999 <976929993@qq.com> Co-authored-by: aarkegz <aarkegz@gmail.com>
1 parent 5cf9c8d commit ba1fd72

File tree

20 files changed

+418
-195
lines changed

20 files changed

+418
-195
lines changed

Cargo.lock

Lines changed: 160 additions & 180 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
@@ -16,6 +16,7 @@ members = [
1616
"modules/axruntime",
1717
"modules/axsync",
1818
"modules/axtask",
19+
"modules/axipi",
1920

2021
"api/axfeat",
2122
"api/arceos_api",
@@ -65,6 +66,7 @@ axruntime = { path = "modules/axruntime" }
6566
axsync = { path = "modules/axsync" }
6667
axtask = { path = "modules/axtask" }
6768
axdma = { path = "modules/axdma" }
69+
axipi = { path = "modules/axipi" }
6870

6971
[profile.release]
7072
lto = true

api/arceos_api/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ documentation = "https://arceos-org.github.io/arceos/arceos_api/index.html"
1313
default = []
1414

1515
irq = ["axfeat/irq"]
16+
ipi = ["dep:axipi", "axfeat/ipi"]
1617
alloc = ["dep:axalloc", "axfeat/alloc"]
1718
paging = ["dep:axmm", "axfeat/paging"]
1819
dma = ["dep:axdma", "axfeat/dma"]
@@ -43,3 +44,4 @@ axdriver = { workspace = true, optional = true }
4344
axfs = { workspace = true, optional = true }
4445
axnet = { workspace = true, optional = true }
4546
axdisplay = { workspace = true, optional = true }
47+
axipi = { workspace = true, optional = true }

api/arceos_api/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ pub mod modules {
402402
pub use axdriver;
403403
#[cfg(feature = "fs")]
404404
pub use axfs;
405+
#[cfg(feature = "ipi")]
406+
pub use axipi;
405407
#[cfg(feature = "paging")]
406408
pub use axmm;
407409
#[cfg(feature = "net")]

api/axfeat/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ fp-simd = ["axhal/fp-simd"]
2020

2121
# Interrupts
2222
irq = ["axhal/irq", "axruntime/irq", "axtask?/irq"]
23+
ipi = ["irq", "dep:axipi", "axhal/ipi", "axruntime/ipi"]
2324

2425
# Custom or default platforms
2526
myplat = ["axhal/myplat"]
@@ -82,4 +83,5 @@ axnet = { workspace = true, optional = true }
8283
axdisplay = { workspace = true, optional = true }
8384
axsync = { workspace = true, optional = true }
8485
axtask = { workspace = true, optional = true }
86+
axipi = { workspace = true, optional = true }
8587
kspin = { version = "0.1", optional = true }

api/axfeat/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! - `fp-simd`: Enable floating point and SIMD support.
88
//! - Interrupts:
99
//! - `irq`: Enable interrupt handling support.
10+
//! - `ipi`: Enable Inter-Processor Interrupts (IPIs).
1011
//! - Memory
1112
//! - `alloc`: Enable dynamic memory allocation.
1213
//! - `alloc-tlsf`: Use the TLSF allocator.

configs/custom/x86_64-pc-oslab.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ pci-ranges = [] # [(uint, uint)]
5757
timer-frequency = 4_000_000_000 # uint
5858
# Timer interrupt num.
5959
timer-irq = 0xf0 # uint
60+
# IPI interrupt num
61+
ipi-irq = 0xf3 # uint

configs/dummy.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ pci-bus-end = 0 # uint
5454
pci-ranges = [] # [(uint, uint)]
5555
# Timer interrupt num.
5656
timer-irq = 0 # uint
57+
# IPI interrupt num
58+
ipi-irq = 0 # uint

examples/helloworld-myplat/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ cfg-if = "1.0"
1818
axstd = { workspace = true, features = ["myplat"], optional = true }
1919

2020
[target.'cfg(target_arch = "x86_64")'.dependencies]
21-
axplat-x86-pc = { version = "0.1", features = ["smp", "irq"], optional = true }
21+
axplat-x86-pc = { version = "0.2", features = ["smp", "irq"], optional = true }
2222

2323
[target.'cfg(target_arch = "aarch64")'.dependencies]
24-
axplat-aarch64-qemu-virt = { version = "0.1", features = ["smp", "irq"], optional = true }
25-
axplat-aarch64-raspi = { version = "0.1", features = ["smp", "irq"], optional = true }
26-
axplat-aarch64-bsta1000b = { version = "0.1", features = ["smp", "irq"], optional = true }
27-
axplat-aarch64-phytium-pi = { version = "0.1", features = ["smp", "irq"], optional = true }
24+
axplat-aarch64-qemu-virt = { version = "0.2", features = ["smp", "irq"], optional = true }
25+
axplat-aarch64-raspi = { version = "0.2", features = ["smp", "irq"], optional = true }
26+
axplat-aarch64-bsta1000b = { version = "0.2", features = ["smp", "irq"], optional = true }
27+
axplat-aarch64-phytium-pi = { version = "0.2", features = ["smp", "irq"], optional = true }
2828

2929
[target.'cfg(target_arch = "riscv64")'.dependencies]
30-
axplat-riscv64-qemu-virt = { version = "0.1", features = ["smp", "irq"], optional = true }
30+
axplat-riscv64-qemu-virt = { version = "0.2", features = ["smp", "irq"], optional = true }
3131

3232
[target.'cfg(target_arch = "loongarch64")'.dependencies]
33-
axplat-loongarch64-qemu-virt = { version = "0.1", features = ["smp", "irq"], optional = true }
33+
axplat-loongarch64-qemu-virt = { version = "0.2", features = ["smp", "irq"], optional = true }

modules/axhal/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ myplat = []
2323
defplat = ["dep:axplat-x86-pc", "dep:axplat-aarch64-qemu-virt", "dep:axplat-riscv64-qemu-virt", "dep:axplat-loongarch64-qemu-virt"]
2424

2525
default = []
26+
ipi = ["irq"]
2627

2728
[dependencies]
2829
log = "=0.4.21"
@@ -35,24 +36,23 @@ memory_addr = "0.4"
3536
linkme = { version = "0.3.33", optional = true }
3637
page_table_multiarch = { version = "0.5", features = ["copy-from"], optional = true }
3738
axcpu = "0.2"
38-
axplat = "0.1"
39-
39+
axplat = "0.2"
4040
axlog = { workspace = true }
4141
axconfig = { workspace = true }
4242
axalloc = { workspace = true, optional = true }
4343

4444
[target.'cfg(target_arch = "x86_64")'.dependencies]
45-
axplat-x86-pc = { version = "0.1", optional = true }
45+
axplat-x86-pc = { version = "0.2", optional = true }
4646

4747
[target.'cfg(target_arch = "aarch64")'.dependencies]
4848
aarch64-cpu = "10.0"
49-
axplat-aarch64-qemu-virt = { version = "0.1", optional = true }
49+
axplat-aarch64-qemu-virt = { version = "0.2", optional = true }
5050

5151
[target.'cfg(target_arch = "riscv64")'.dependencies]
52-
axplat-riscv64-qemu-virt = { version = "0.1", optional = true }
52+
axplat-riscv64-qemu-virt = { version = "0.2", optional = true }
5353

5454
[target.'cfg(target_arch = "loongarch64")'.dependencies]
55-
axplat-loongarch64-qemu-virt = { version = "0.1", optional = true }
55+
axplat-loongarch64-qemu-virt = { version = "0.2", optional = true }
5656

5757
[build-dependencies]
5858
axconfig = { workspace = true }

0 commit comments

Comments
 (0)