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:
@ -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;
|
||||
|
Reference in New Issue
Block a user