@@ -1796,7 +1796,7 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
1796
1796
use core::cell::UnsafeCell;
1797
1797
1798
1798
//--------------------------------------------------------------------------------------------------
1799
- @@ -16,6 +47,15 @@
1799
+ @@ -16,6 +47,12 @@
1800
1800
extern "Rust" {
1801
1801
static __rx_start: UnsafeCell<()>;
1802
1802
static __rx_end_exclusive: UnsafeCell<()>;
@@ -1806,13 +1806,10 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
1806
1806
+
1807
1807
+ static __boot_core_stack_start: UnsafeCell<()>;
1808
1808
+ static __boot_core_stack_end_exclusive: UnsafeCell<()>;
1809
- +
1810
- + static __boot_core_stack_guard_page_start: UnsafeCell<()>;
1811
- + static __boot_core_stack_guard_page_end_exclusive: UnsafeCell<()>;
1812
1809
}
1813
1810
1814
1811
//--------------------------------------------------------------------------------------------------
1815
- @@ -25,35 +65 ,26 @@
1812
+ @@ -25,35 +62 ,26 @@
1816
1813
/// The board's physical memory map.
1817
1814
#[rustfmt::skip]
1818
1815
pub(super) mod map {
@@ -1862,7 +1859,7 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
1862
1859
}
1863
1860
1864
1861
/// Physical devices.
1865
- @@ -61,13 +92 ,22 @@
1862
+ @@ -61,13 +89 ,22 @@
1866
1863
pub mod mmio {
1867
1864
use super::*;
1868
1865
@@ -1891,25 +1888,22 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
1891
1888
}
1892
1889
1893
1890
//--------------------------------------------------------------------------------------------------
1894
- @@ -80,16 +120 ,52 @@
1891
+ @@ -80,16 +117 ,52 @@
1895
1892
///
1896
1893
/// - Value is provided by the linker script and must be trusted as-is.
1897
1894
#[inline(always)]
1898
1895
- fn rx_start() -> usize {
1899
1896
- unsafe { __rx_start.get() as usize }
1900
1897
+ fn virt_rx_start() -> Address<Virtual> {
1901
1898
+ Address::new(unsafe { __rx_start.get() as usize })
1902
- }
1903
-
1904
- - /// Exclusive end address of the Read+Execute (RX) range.
1899
+ + }
1900
+ +
1905
1901
+ /// Size of the Read+Execute (RX) range.
1906
- ///
1907
- /// # Safety
1908
- ///
1909
- /// - Value is provided by the linker script and must be trusted as-is.
1910
- #[inline(always)]
1911
- - fn rx_end_exclusive() -> usize {
1912
- - unsafe { __rx_end_exclusive.get() as usize }
1902
+ + ///
1903
+ + /// # Safety
1904
+ + ///
1905
+ + /// - Value is provided by the linker script and must be trusted as-is.
1906
+ + #[inline(always)]
1913
1907
+ fn rx_size() -> usize {
1914
1908
+ unsafe { (__rx_end_exclusive.get() as usize) - (__rx_start.get() as usize) }
1915
1909
+ }
@@ -1918,14 +1912,17 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
1918
1912
+ #[inline(always)]
1919
1913
+ fn virt_rw_start() -> Address<Virtual> {
1920
1914
+ Address::new(unsafe { __rw_start.get() as usize })
1921
- + }
1922
- +
1915
+ }
1916
+
1917
+ - /// Exclusive end address of the Read+Execute (RX) range.
1923
1918
+ /// Size of the Read+Write (RW) range.
1924
- + ///
1925
- + /// # Safety
1926
- + ///
1927
- + /// - Value is provided by the linker script and must be trusted as-is.
1928
- + #[inline(always)]
1919
+ ///
1920
+ /// # Safety
1921
+ ///
1922
+ /// - Value is provided by the linker script and must be trusted as-is.
1923
+ #[inline(always)]
1924
+ - fn rx_end_exclusive() -> usize {
1925
+ - unsafe { __rx_end_exclusive.get() as usize }
1929
1926
+ fn rw_size() -> usize {
1930
1927
+ unsafe { (__rw_end_exclusive.get() as usize) - (__rw_start.get() as usize) }
1931
1928
+ }
0 commit comments