Skip to content

Commit a5a3c2f

Browse files
committed
irq
1 parent 49cba7a commit a5a3c2f

File tree

8 files changed

+165
-74
lines changed

8 files changed

+165
-74
lines changed

Cargo.lock

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

platforms/axplat-aarch64-dyn/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ name = "axplat-aarch64-dyn"
88
repository.workspace = true
99
version = "0.1.0"
1010

11+
[features]
12+
fp-simd = ["axcpu/fp-simd"]
13+
smp = ["axplat/smp"]
14+
1115
[dependencies]
1216
aarch64-cpu = "10"
1317
any-uart = "0.2.11"
1418
axconfig-macros = "0.2"
1519
axcpu = {workspace = true}
16-
axplat = {workspace = true}
20+
axplat = {workspace = true, features = ["irq"]}
1721
fdt-parser = "0.4"
1822
heapless = "0.8"
1923
log = "0.4"
@@ -22,3 +26,4 @@ pie-boot = {version = "0.2.9"}
2226
rdrive = "0.15"
2327
smccc = "0.2"
2428
spin = "0.10"
29+
lazyinit = "0.2"

platforms/axplat-aarch64-dyn/src/driver.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ pub fn setup() {
1313

1414
init(Platform::Fdt { addr: fdt }).unwrap();
1515

16-
register_append(&driver_registers());
17-
1816
probe_pre_kernel().unwrap();
1917
}
2018

platforms/axplat-aarch64-dyn/src/init.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ impl InitIf for InitIfImpl {
3939
/// Initializes the platform at the early stage for secondary cores.
4040
///
4141
/// See [`init_early`] for details.
42+
#[cfg(feature = "smp")]
4243
fn init_early_secondary(cpu_id: usize) {
4344
axcpu::init::init_trap();
4445
}
@@ -69,12 +70,15 @@ impl InitIf for InitIfImpl {
6970
/// * Other platform devices are initialized.
7071
fn init_later(cpu_id: usize, arg: usize) {
7172
driver::setup();
72-
73-
driver::probe_all(true).unwrap();
73+
crate::irq::init();
74+
crate::irq::init_current_cpu();
7475
}
7576

7677
/// Initializes the platform at the later stage for secondary cores.
7778
///
7879
/// See [`init_later`] for details.
79-
fn init_later_secondary(cpu_id: usize) {}
80+
#[cfg(feature = "smp")]
81+
fn init_later_secondary(cpu_id: usize) {
82+
crate::irq::init_current_cpu();
83+
}
8084
}

0 commit comments

Comments
 (0)