[−][src]Trait sunrise_bootstrap::paging::PageTablesSet
Required methods
fn map_to(&mut self, mapping: MappingType, address: VirtualAddress)
Creates a mapping in the page tables with the given flags
fn get_phys(&mut self, address: VirtualAddress) -> PageState<PhysicalAddress>
Gets the current mapping state of this Virtual Address.
fn find_available_virtual_space_aligned<Land: VirtualSpaceLand>(
&mut self,
page_nb: usize,
alignement: usize
) -> Option<VirtualAddress>
&mut self,
page_nb: usize,
alignement: usize
) -> Option<VirtualAddress>
Finds a virtual space hole that can contain page_nb consecutive pages
fn unmap(&mut self, page: VirtualAddress) -> PageState<Frame>
Deletes a mapping in the page tables, returning the Frame if one was mapped.
Panics
Panics if page is not page-aligned.
Provided methods
fn print_mapping(&mut self)
Prints the current mapping.
fn map_allocate_to(&mut self, address: VirtualAddress, flags: EntryFlags)
Creates a mapping in the page tables with the given flags. Allocates the pointed page
Panics
Panics if address is not page-aligned.
fn map_frame<Land: VirtualSpaceLand>(
&mut self,
frame: Frame,
flags: EntryFlags
) -> VirtualAddress
&mut self,
frame: Frame,
flags: EntryFlags
) -> VirtualAddress
Maps a given frame in the page tables. Takes care of choosing the virtual address
Panics
Panics if address is not page-aligned.
fn get_page<Land: VirtualSpaceLand>(&mut self) -> VirtualAddress
Creates a mapping in the page tables with the given flags. Allocates the pointed page and chooses the virtual address.
Panics
Panics if we are out of memory.
fn map_page_guard(&mut self, address: VirtualAddress)
Reserves a given page as guard page. This affects only virtual memory and doesn't take any actual physical frame.
Panics
Panics if address is not page-aligned.
fn map_range_page_guard(&mut self, address: VirtualAddress, page_nb: usize)
Reserve a given region as guard pages. If the region spans more than ENTRY_COUNT pages, then the whole page table will be page-guarded.
Panics
Panics if address is not page-aligned.
fn map_range(
&mut self,
phys_addr: PhysicalAddress,
address: VirtualAddress,
page_nb: usize,
flags: EntryFlags
)
&mut self,
phys_addr: PhysicalAddress,
address: VirtualAddress,
page_nb: usize,
flags: EntryFlags
)
Maps the given physical address range to the given virtual address
Note that those physical addresses must not be allocated through the Frame Allocator.
Panics
Panics if address is not page-aligned.
fn map_range_allocate(
&mut self,
address: VirtualAddress,
page_nb: usize,
flags: EntryFlags
)
&mut self,
address: VirtualAddress,
page_nb: usize,
flags: EntryFlags
)
Maps a given number of consecutive pages at a given address Allocates the frames
Panics
Panics if address is not page-aligned.
fn identity_map(&mut self, frame: Frame, flags: EntryFlags)
Maps a memory frame to the same virtual address
fn identity_map_region(
&mut self,
start_address: PhysicalAddress,
region_size: usize,
flags: EntryFlags
)
&mut self,
start_address: PhysicalAddress,
region_size: usize,
flags: EntryFlags
)
Identity maps a range of frames
Note that those physical addresses must not be allocated through the Frame Allocator.
fn find_available_virtual_space<Land: VirtualSpaceLand>(
&mut self,
page_nb: usize
) -> Option<VirtualAddress>
&mut self,
page_nb: usize
) -> Option<VirtualAddress>
Finds a virtual space hole that can contain page_nb consecutive pages
fn set_page_readonly(&mut self, page_address: VirtualAddress)
Sets a previously mapped page as readonly
Panics
Panics if the page was not mapped or is a guard page
fn set_region_readonly(&mut self, start_address: VirtualAddress, page_nb: usize)
Sets a previously mapped range of pages readonly
Panics
Panics if any of the pages in the range was not mapped or is a guard page
Implementors
impl<T: I386PageTablesSet> PageTablesSet for T
[src]
fn map_to(&mut self, mapping: MappingType, address: VirtualAddress)
[src]
Creates a mapping in the page tables with the given flags
fn get_phys(&mut self, address: VirtualAddress) -> PageState<PhysicalAddress>
[src]
fn find_available_virtual_space_aligned<Land: VirtualSpaceLand>(
&mut self,
page_nb: usize,
alignement: usize
) -> Option<VirtualAddress>
[src]
&mut self,
page_nb: usize,
alignement: usize
) -> Option<VirtualAddress>
Finds a virtual space hole that can contain page_nb consecutive pages
fn unmap(&mut self, page: VirtualAddress) -> PageState<Frame>
[src]
Deletes a mapping in the page tables, returning the Frame if one was mapped.
Panics
Panics if page is not page-aligned.