kernel: Let the kernel handle all page table changes when switching processes
It will both change the page table in memory and notify the CPU about the change by itself. This way there is no need to call memory.SetCurrentPageTable() when kernel.setCurrentProcess() and the management is kept internally in the kernel
This commit is contained in:
parent
ac9755306c
commit
dbfd830695
6 changed files with 25 additions and 11 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/memory.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
namespace ConfigMem {
|
||||
class Handler;
|
||||
|
@ -206,6 +207,10 @@ public:
|
|||
std::shared_ptr<Process> GetCurrentProcess() const;
|
||||
void SetCurrentProcess(std::shared_ptr<Process> process);
|
||||
|
||||
void SetCurrentMemPageTable(Memory::PageTable* page_table);
|
||||
|
||||
void SetCPU(std::shared_ptr<ARM_Interface> cpu);
|
||||
|
||||
ThreadManager& GetThreadManager();
|
||||
const ThreadManager& GetThreadManager() const;
|
||||
|
||||
|
@ -233,6 +238,8 @@ public:
|
|||
/// Map of named ports managed by the kernel, which can be retrieved using the ConnectToPort
|
||||
std::unordered_map<std::string, std::shared_ptr<ClientPort>> named_ports;
|
||||
|
||||
std::shared_ptr<ARM_Interface> current_cpu;
|
||||
|
||||
Memory::MemorySystem& memory;
|
||||
|
||||
Core::Timing& timing;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue