Skip to content

Commit b1c438d

Browse files
committed
Remove unused external symbols
1 parent 920af57 commit b1c438d

File tree

4 files changed

+21
-33
lines changed
  • 14_virtual_mem_part2_mmio_remap
  • 15_virtual_mem_part3_precomputed_tables/src/bsp/raspberrypi
  • 16_virtual_mem_part4_higher_half_kernel/src/bsp/raspberrypi

4 files changed

+21
-33
lines changed

14_virtual_mem_part2_mmio_remap/README.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
17961796
use core::cell::UnsafeCell;
17971797

17981798
//--------------------------------------------------------------------------------------------------
1799-
@@ -16,6 +47,15 @@
1799+
@@ -16,6 +47,12 @@
18001800
extern "Rust" {
18011801
static __rx_start: UnsafeCell<()>;
18021802
static __rx_end_exclusive: UnsafeCell<()>;
@@ -1806,13 +1806,10 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
18061806
+
18071807
+ static __boot_core_stack_start: UnsafeCell<()>;
18081808
+ 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<()>;
18121809
}
18131810

18141811
//--------------------------------------------------------------------------------------------------
1815-
@@ -25,35 +65,26 @@
1812+
@@ -25,35 +62,26 @@
18161813
/// The board's physical memory map.
18171814
#[rustfmt::skip]
18181815
pub(super) mod map {
@@ -1862,7 +1859,7 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
18621859
}
18631860

18641861
/// Physical devices.
1865-
@@ -61,13 +92,22 @@
1862+
@@ -61,13 +89,22 @@
18661863
pub mod mmio {
18671864
use super::*;
18681865

@@ -1891,25 +1888,22 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
18911888
}
18921889

18931890
//--------------------------------------------------------------------------------------------------
1894-
@@ -80,16 +120,52 @@
1891+
@@ -80,16 +117,52 @@
18951892
///
18961893
/// - Value is provided by the linker script and must be trusted as-is.
18971894
#[inline(always)]
18981895
-fn rx_start() -> usize {
18991896
- unsafe { __rx_start.get() as usize }
19001897
+fn virt_rx_start() -> Address<Virtual> {
19011898
+ Address::new(unsafe { __rx_start.get() as usize })
1902-
}
1903-
1904-
-/// Exclusive end address of the Read+Execute (RX) range.
1899+
+}
1900+
+
19051901
+/// 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)]
19131907
+fn rx_size() -> usize {
19141908
+ unsafe { (__rx_end_exclusive.get() as usize) - (__rx_start.get() as usize) }
19151909
+}
@@ -1918,14 +1912,17 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_v
19181912
+#[inline(always)]
19191913
+fn virt_rw_start() -> Address<Virtual> {
19201914
+ Address::new(unsafe { __rw_start.get() as usize })
1921-
+}
1922-
+
1915+
}
1916+
1917+
-/// Exclusive end address of the Read+Execute (RX) range.
19231918
+/// 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 }
19291926
+fn rw_size() -> usize {
19301927
+ unsafe { (__rw_end_exclusive.get() as usize) - (__rw_start.get() as usize) }
19311928
+}

14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ extern "Rust" {
5353

5454
static __boot_core_stack_start: UnsafeCell<()>;
5555
static __boot_core_stack_end_exclusive: UnsafeCell<()>;
56-
57-
static __boot_core_stack_guard_page_start: UnsafeCell<()>;
58-
static __boot_core_stack_guard_page_end_exclusive: UnsafeCell<()>;
5956
}
6057

6158
//--------------------------------------------------------------------------------------------------

15_virtual_mem_part3_precomputed_tables/src/bsp/raspberrypi/memory.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ extern "Rust" {
5353

5454
static __boot_core_stack_start: UnsafeCell<()>;
5555
static __boot_core_stack_end_exclusive: UnsafeCell<()>;
56-
57-
static __boot_core_stack_guard_page_start: UnsafeCell<()>;
58-
static __boot_core_stack_guard_page_end_exclusive: UnsafeCell<()>;
5956
}
6057

6158
//--------------------------------------------------------------------------------------------------

16_virtual_mem_part4_higher_half_kernel/src/bsp/raspberrypi/memory.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ extern "Rust" {
5353

5454
static __boot_core_stack_start: UnsafeCell<()>;
5555
static __boot_core_stack_end_exclusive: UnsafeCell<()>;
56-
57-
static __boot_core_stack_guard_page_start: UnsafeCell<()>;
58-
static __boot_core_stack_guard_page_end_exclusive: UnsafeCell<()>;
5956
}
6057

6158
//--------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)