diff options
| author | B3n30 <bene_thomas@web.de> | 2017-09-15 22:41:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-15 22:41:45 +0200 |
| commit | 813837c5cf3e63a4ac08f4ec463bd2b2b87ab1c6 (patch) | |
| tree | df43bf978de3b699a22650d3ff2a3ebb5d86b2de /src/core/memory_setup.h | |
| parent | 588077184b7f10914123864f9374510ff165e255 (diff) | |
| parent | 7a3ab7c63ddcc79e9dfa46ae0347065f66052105 (diff) | |
Merge pull request #2842 from Subv/switchable_page_table
Kernel/Memory: Give each process its own page table and allow switching the current page table upon reschedule
Diffstat (limited to 'src/core/memory_setup.h')
| -rw-r--r-- | src/core/memory_setup.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/memory_setup.h b/src/core/memory_setup.h index 3fdf3a87d..c58baa50b 100644 --- a/src/core/memory_setup.h +++ b/src/core/memory_setup.h @@ -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); } |
