Add bus2phys conversion

This commit is contained in:
Berkus Decker 2019-02-24 12:28:33 +02:00
parent 1ea5e0a08b
commit 95b9ab5e40
1 changed files with 6 additions and 0 deletions

View File

@ -20,4 +20,10 @@ impl BcmHost {
pub const fn get_sdram_address() -> usize {
0xC000_0000 // uncached
}
/// As per https://www.raspberrypi.org/forums/viewtopic.php?p=1170522#p1170522
///
pub fn bus2phys(bus: u32) -> u32 {
bus & !0xC000_0000
}
}