Use a instead of an before a constant (#766)

This commit is contained in:
StackDoubleFlow
2020-03-17 02:48:17 -05:00
committed by GitHub
parent e0686209f4
commit 4feaffe102

View File

@@ -632,7 +632,7 @@ The traits only define the interface, they don't provide any implementation. The
[`MappedPageTable`]: https://docs.rs/x86_64/0.9.6/x86_64/structures/paging/mapper/struct.MappedPageTable.html [`MappedPageTable`]: https://docs.rs/x86_64/0.9.6/x86_64/structures/paging/mapper/struct.MappedPageTable.html
[`RecursivePageTable`]: https://docs.rs/x86_64/0.9.6/x86_64/structures/paging/mapper/struct.RecursivePageTable.html [`RecursivePageTable`]: https://docs.rs/x86_64/0.9.6/x86_64/structures/paging/mapper/struct.RecursivePageTable.html
In our case, the bootloader maps the complete physical memory at an virtual address specfied by the `physical_memory_offset` variable, so we can use the `OffsetPageTable` type. To initialize it, we create a new `init` function in our `memory` module: In our case, the bootloader maps the complete physical memory at a virtual address specfied by the `physical_memory_offset` variable, so we can use the `OffsetPageTable` type. To initialize it, we create a new `init` function in our `memory` module:
```rust ```rust
use x86_64::structures::paging::OffsetPageTable; use x86_64::structures::paging::OffsetPageTable;