You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
Rust
38 lines
1.1 KiB
Rust
// SPDX-License-Identifier: MIT OR Apache-2.0
|
|
//
|
|
// Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
|
|
|
|
//! BSP Memory Management.
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
// Public Definitions
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// The board's physical memory map.
|
|
#[rustfmt::skip]
|
|
pub(super) mod map {
|
|
|
|
pub const GPIO_OFFSET: usize = 0x0020_0000;
|
|
pub const UART_OFFSET: usize = 0x0020_1000;
|
|
|
|
/// Physical devices.
|
|
#[cfg(feature = "bsp_rpi3")]
|
|
pub mod mmio {
|
|
use super::*;
|
|
|
|
pub const START: usize = 0x3F00_0000;
|
|
pub const GPIO_START: usize = START + GPIO_OFFSET;
|
|
pub const PL011_UART_START: usize = START + UART_OFFSET;
|
|
}
|
|
|
|
/// Physical devices.
|
|
#[cfg(feature = "bsp_rpi4")]
|
|
pub mod mmio {
|
|
use super::*;
|
|
|
|
pub const START: usize = 0xFE00_0000;
|
|
pub const GPIO_START: usize = START + GPIO_OFFSET;
|
|
pub const PL011_UART_START: usize = START + UART_OFFSET;
|
|
}
|
|
}
|