Skip to content

Commit d6f5339

Browse files
cargo: bump arm-gic from 0.2.2 to 0.4.0 in /src/exercises/bare-metal/rtc in the minor group (#2727)
Bumps the minor group in /src/exercises/bare-metal/rtc with 1 update: [arm-gic](https://github.com/google/arm-gic). Updates `arm-gic` from 0.2.2 to 0.4.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Walbran <qwandor@google.com>
1 parent 53afa84 commit d6f5339

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

src/exercises/bare-metal/rtc/Cargo.lock

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

src/exercises/bare-metal/rtc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
publish = false
88

99
[dependencies]
10-
arm-gic = "0.2.2"
10+
arm-gic = "0.4.0"
1111
bitflags = "2.9.0"
1212
chrono = { version = "0.4.41", default-features = false }
1313
log = "0.4.27"

src/exercises/bare-metal/rtc/src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@ use chrono::{TimeZone, Utc};
2929
use core::hint::spin_loop;
3030
// ANCHOR: imports
3131
use crate::pl011::Uart;
32+
use arm_gic::gicv3::registers::{Gicd, GicrSgi};
3233
use arm_gic::gicv3::GicV3;
3334
use core::panic::PanicInfo;
3435
use log::{error, info, trace, LevelFilter};
3536
use smccc::psci::system_off;
3637
use smccc::Hvc;
3738

3839
/// Base addresses of the GICv3.
39-
const GICD_BASE_ADDRESS: *mut u64 = 0x800_0000 as _;
40-
const GICR_BASE_ADDRESS: *mut u64 = 0x80A_0000 as _;
40+
const GICD_BASE_ADDRESS: *mut Gicd = 0x800_0000 as _;
41+
const GICR_BASE_ADDRESS: *mut GicrSgi = 0x80A_0000 as _;
4142

4243
/// Base address of the primary PL011 UART.
4344
const PL011_BASE_ADDRESS: *mut u32 = 0x900_0000 as _;
@@ -63,7 +64,7 @@ extern "C" fn main(x0: u64, x1: u64, x2: u64, x3: u64) {
6364
// addresses of a GICv3 distributor and redistributor respectively, and
6465
// nothing else accesses those address ranges.
6566
let mut gic =
66-
unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS, 1, 0x20000) };
67+
unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS, 1, false) };
6768
gic.setup(0);
6869
// ANCHOR_END: main
6970

0 commit comments

Comments
 (0)