diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index b3071d94b2..08d6e73688 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -342,7 +342,6 @@ add_library(core STATIC hle/kernel/message_buffer.h hle/kernel/physical_core.cpp hle/kernel/physical_core.h - hle/kernel/physical_memory.h hle/kernel/slab_helpers.h hle/kernel/svc.cpp hle/kernel/svc.h diff --git a/src/core/arm/nce/patcher.cpp b/src/core/arm/nce/patcher.cpp index bd8e4fd7fb..9885238b1d 100644 --- a/src/core/arm/nce/patcher.cpp +++ b/src/core/arm/nce/patcher.cpp @@ -46,8 +46,7 @@ Patcher::Patcher() : c(m_patch_instructions), c_pre(m_patch_instructions_pre) { Patcher::~Patcher() = default; -bool Patcher::PatchText(const Kernel::PhysicalMemory& program_image, - const Kernel::CodeSet::Segment& code) { +bool Patcher::PatchText(std::vector program_image, const Kernel::CodeSet::Segment& code) { // If we have patched modules but cannot reach the new module, then it needs its own patcher. const size_t image_size = program_image.size(); @@ -175,10 +174,7 @@ bool Patcher::PatchText(const Kernel::PhysicalMemory& program_image, return true; } -bool Patcher::RelocateAndCopy(Common::ProcessAddress load_base, - const Kernel::CodeSet::Segment& code, - Kernel::PhysicalMemory& program_image, - EntryTrampolines* out_trampolines) { +bool Patcher::RelocateAndCopy(Common::ProcessAddress load_base, const Kernel::CodeSet::Segment& code, std::vector& program_image, EntryTrampolines* out_trampolines) { const size_t patch_size = GetSectionSize(); const size_t pre_patch_size = GetPreSectionSize(); diff --git a/src/core/arm/nce/patcher.h b/src/core/arm/nce/patcher.h index 303cf68ec6..499c98c901 100644 --- a/src/core/arm/nce/patcher.h +++ b/src/core/arm/nce/patcher.h @@ -14,7 +14,6 @@ #include "common/settings.h" #include "core/hle/kernel/code_set.h" #include "core/hle/kernel/k_typed_address.h" -#include "core/hle/kernel/physical_memory.h" #include using ModuleID = std::array; // NSO build ID struct PatchCacheKey { @@ -56,10 +55,8 @@ public: } explicit Patcher(); ~Patcher(); - bool PatchText(const Kernel::PhysicalMemory& program_image, - const Kernel::CodeSet::Segment& code); - bool RelocateAndCopy(Common::ProcessAddress load_base, const Kernel::CodeSet::Segment& code, - Kernel::PhysicalMemory& program_image, EntryTrampolines* out_trampolines); + bool PatchText(std::span program_image, const Kernel::CodeSet::Segment& code); + bool RelocateAndCopy(Common::ProcessAddress load_base, const Kernel::CodeSet::Segment& code, std::vector& program_image, EntryTrampolines* out_trampolines); size_t GetSectionSize() const noexcept; size_t GetPreSectionSize() const noexcept;