core: Remove special regions (#7211)

This commit is contained in:
GPUCode
2023-11-26 12:07:30 -08:00
committed by GitHub
parent dc8425a986
commit db7b929e47
11 changed files with 4 additions and 13996 deletions
+1 -25
View File
@@ -6,8 +6,6 @@
#include <map>
#include <memory>
#include <utility>
#include <vector>
#include <boost/serialization/map.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/split_member.hpp>
@@ -16,7 +14,6 @@
#include "core/hle/kernel/memory.h"
#include "core/hle/result.h"
#include "core/memory.h"
#include "core/mmio.h"
namespace Kernel {
@@ -25,8 +22,6 @@ enum class VMAType : u8 {
Free,
/// VMA is backed by a raw, unmanaged pointer.
BackingMemory,
/// VMA is mapped to MMIO registers at a fixed PAddr.
MMIO,
};
/// Permissions for mapped memory blocks
@@ -74,15 +69,10 @@ struct VirtualMemoryArea {
/// Tag returned by svcQueryMemory. Not otherwise used.
MemoryState meminfo_state = MemoryState::Free;
// Settings for type = BackingMemory
/// Settings for type = BackingMemory
/// Pointer backing this VMA. It will not be destroyed or freed when the VMA is removed.
MemoryRef backing_memory{};
// Settings for type = MMIO
/// Physical address of the register area this VMA maps to.
PAddr paddr = 0;
Memory::MMIORegionPointer mmio_handler = nullptr;
/// Tests if this area can be merged to the right with `next`.
bool CanBeMergedWith(const VirtualMemoryArea& next) const;
@@ -96,8 +86,6 @@ private:
ar& permissions;
ar& meminfo_state;
ar& backing_memory;
ar& paddr;
ar& mmio_handler;
}
};
@@ -166,18 +154,6 @@ public:
ResultVal<VMAHandle> MapBackingMemory(VAddr target, MemoryRef memory, u32 size,
MemoryState state);
/**
* Maps a memory-mapped IO region at a given address.
*
* @param target The guest address to start the mapping at.
* @param paddr The physical address where the registers are present.
* @param size Size of the mapping.
* @param state MemoryState tag to attach to the VMA.
* @param mmio_handler The handler that will implement read and write for this MMIO region.
*/
ResultVal<VMAHandle> MapMMIO(VAddr target, PAddr paddr, u32 size, MemoryState state,
Memory::MMIORegionPointer mmio_handler);
/**
* Updates the memory state and permissions of the specified range. The range's original memory
* state and permissions must match the `expected` parameters.