1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-16 07:36:05 +02:00

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>
This commit is contained in:
dependabot[bot] 2025-05-01 12:08:48 +01:00 committed by GitHub
parent 53afa8416b
commit d6f53392d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 38 additions and 6 deletions

View File

@ -4,12 +4,14 @@ version = 4
[[package]]
name = "arm-gic"
version = "0.2.2"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0283195c61a2bbd6c5e79a0d707951799f97503db21974de7c9f948c05ba3ad8"
checksum = "dd58684ee8041735b64d9e731b18c5515397ee4487f56f7cb9a409c8cbd17839"
dependencies = [
"bitflags",
"safe-mmio",
"thiserror",
"zerocopy",
]
[[package]]
@ -98,6 +100,15 @@ dependencies = [
"spin",
]
[[package]]
name = "safe-mmio"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db02a82ad13df46afeba34a4e54065fa912308b9101b060e4422898eac0e06f6"
dependencies = [
"zerocopy",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
@ -164,3 +175,23 @@ name = "unicode-ident"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
[[package]]
name = "zerocopy"
version = "0.8.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
dependencies = [
"proc-macro2",
"quote",
"syn",
]

View File

@ -7,7 +7,7 @@ edition = "2021"
publish = false
[dependencies]
arm-gic = "0.2.2"
arm-gic = "0.4.0"
bitflags = "2.9.0"
chrono = { version = "0.4.41", default-features = false }
log = "0.4.27"

View File

@ -29,6 +29,7 @@ use chrono::{TimeZone, Utc};
use core::hint::spin_loop;
// ANCHOR: imports
use crate::pl011::Uart;
use arm_gic::gicv3::registers::{Gicd, GicrSgi};
use arm_gic::gicv3::GicV3;
use core::panic::PanicInfo;
use log::{error, info, trace, LevelFilter};
@ -36,8 +37,8 @@ use smccc::psci::system_off;
use smccc::Hvc;
/// Base addresses of the GICv3.
const GICD_BASE_ADDRESS: *mut u64 = 0x800_0000 as _;
const GICR_BASE_ADDRESS: *mut u64 = 0x80A_0000 as _;
const GICD_BASE_ADDRESS: *mut Gicd = 0x800_0000 as _;
const GICR_BASE_ADDRESS: *mut GicrSgi = 0x80A_0000 as _;
/// Base address of the primary PL011 UART.
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) {
// addresses of a GICv3 distributor and redistributor respectively, and
// nothing else accesses those address ranges.
let mut gic =
unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS, 1, 0x20000) };
unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS, 1, false) };
gic.setup(0);
// ANCHOR_END: main