Skip to content

Commit 31a8d24

Browse files
committed
Assert that exported address equals mapped address
1 parent 00d7a99 commit 31a8d24

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ fn load_elf(
233233
// Make sure that the kernel respects the write-protection bits, even when in ring 0.
234234
enable_write_protect_bit();
235235

236+
#[cfg(feature = "recursive_level_4_table")]
237+
assert_eq!(
238+
recursive_page_table_addr.start_address().as_u64(),
239+
bootloader::RECURSIVE_LEVEL_4_TABLE_ADDR
240+
);
241+
236242
if cfg!(not(feature = "recursive_level_4_table")) {
237243
// unmap recursive entry
238244
rec_page_table

0 commit comments

Comments
 (0)