Skip to content

Commit a00c1c0

Browse files
committed
Rename recursive_level_4_table feature to recursive_page_table
1 parent ccb6d6b commit a00c1c0

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ features = ["unicode"]
2424
[features]
2525
default = []
2626
vga_320x200 = []
27-
recursive_level_4_table = []
27+
recursive_page_table = []
2828
map_physical_memory = []
2929

3030
[profile.dev]
@@ -36,4 +36,4 @@ lto = false
3636
debug = true
3737

3838
[package.metadata.docs.rs]
39-
features = [ "recursive_level_4_table", "map_physical_memory" ]
39+
features = [ "recursive_page_table", "map_physical_memory" ]

Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Breaking
22

3-
- The level 4 page table is only recursively mapped if the `recursive_level_4_table` feature is enabled.
3+
- The level 4 page table is only recursively mapped if the `recursive_page_table` feature is enabled.
44
- Replace `BootInfo::p4_table_addr` with `RECURSIVE_LEVEL_4_TABLE_ADDR` constant (only present if the cargo feature is enabled)
55
- Remove `From<PhysFrameRange>` implemenations for x86_64 `FrameRange`
66
- This only works when the versions align, so it is not a good general solution.

src/bootinfo/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ mod memory_map;
99
pub struct BootInfo {
1010
pub memory_map: MemoryMap,
1111
/// The virtual address of the recursively mapped level 4 page table.
12-
#[cfg(feature = "recursive_level_4_table")]
13-
pub recursive_level_4_table_addr: u64,
12+
#[cfg(feature = "recursive_page_table")]
13+
pub recursive_page_table_addr: u64,
1414
/// The offset into the virtual address space where the physical memory is mapped.
1515
///
1616
/// Physical addresses can be converted to virtual addresses by adding this offset to them.
@@ -26,11 +26,11 @@ pub struct BootInfo {
2626

2727
impl BootInfo {
2828
#[allow(unused_variables)]
29-
pub fn new(memory_map: MemoryMap, recursive_level_4_table_addr: u64, physical_memory_offset: u64) -> Self {
29+
pub fn new(memory_map: MemoryMap, recursive_page_table_addr: u64, physical_memory_offset: u64) -> Self {
3030
BootInfo {
3131
memory_map,
32-
#[cfg(feature = "recursive_level_4_table")]
33-
recursive_level_4_table_addr,
32+
#[cfg(feature = "recursive_page_table")]
33+
recursive_page_table_addr,
3434
#[cfg(feature = "map_physical_memory")]
3535
physical_memory_offset,
3636
_non_exhaustive: 0,

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ fn load_elf(
266266
// Make sure that the kernel respects the write-protection bits, even when in ring 0.
267267
enable_write_protect_bit();
268268

269-
if cfg!(not(feature = "recursive_level_4_table")) {
269+
if cfg!(not(feature = "recursive_page_table")) {
270270
// unmap recursive entry
271271
rec_page_table
272272
.unmap(recursive_page_table_addr)

0 commit comments

Comments
 (0)