Kernel/Memory: Give each Process its own page table.
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
This commit is contained in:
parent
5d0a1e7efd
commit
6d2734a074
9 changed files with 93 additions and 87 deletions
|
@ -9,24 +9,24 @@
|
|||
|
||||
namespace Memory {
|
||||
|
||||
void InitMemoryMap();
|
||||
|
||||
/**
|
||||
* Maps an allocated buffer onto a region of the emulated process address space.
|
||||
*
|
||||
* @param page_table The page table of the emulated process.
|
||||
* @param base The address to start mapping at. Must be page-aligned.
|
||||
* @param size The amount of bytes to map. Must be page-aligned.
|
||||
* @param target Buffer with the memory backing the mapping. Must be of length at least `size`.
|
||||
*/
|
||||
void MapMemoryRegion(VAddr base, u32 size, u8* target);
|
||||
void MapMemoryRegion(PageTable& page_table, VAddr base, u32 size, u8* target);
|
||||
|
||||
/**
|
||||
* Maps a region of the emulated process address space as a IO region.
|
||||
* @param page_table The page table of the emulated process.
|
||||
* @param base The address to start mapping at. Must be page-aligned.
|
||||
* @param size The amount of bytes to map. Must be page-aligned.
|
||||
* @param mmio_handler The handler that backs the mapping.
|
||||
*/
|
||||
void MapIoRegion(VAddr base, u32 size, MMIORegionPointer mmio_handler);
|
||||
void MapIoRegion(PageTable& page_table, VAddr base, u32 size, MMIORegionPointer mmio_handler);
|
||||
|
||||
void UnmapRegion(VAddr base, u32 size);
|
||||
void UnmapRegion(PageTable& page_table, VAddr base, u32 size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue