diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-03-18 07:45:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 07:45:30 +0100 |
commit | fe1182e916287a67649151c40b840ad725140c5e (patch) | |
tree | 52542c3a41e7da8719cf3263f598149cd1ca37d6 /src/core/hle/kernel/k_page_buffer.h | |
parent | Merge pull request #8024 from liamwhite/const-indexing (diff) | |
parent | general: Reduce core.h includes (diff) | |
download | yuzu-fe1182e916287a67649151c40b840ad725140c5e.tar yuzu-fe1182e916287a67649151c40b840ad725140c5e.tar.gz yuzu-fe1182e916287a67649151c40b840ad725140c5e.tar.bz2 yuzu-fe1182e916287a67649151c40b840ad725140c5e.tar.lz yuzu-fe1182e916287a67649151c40b840ad725140c5e.tar.xz yuzu-fe1182e916287a67649151c40b840ad725140c5e.tar.zst yuzu-fe1182e916287a67649151c40b840ad725140c5e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_page_buffer.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/hle/kernel/k_page_buffer.h b/src/core/hle/kernel/k_page_buffer.h index 0a9451228..6ff3c1568 100644 --- a/src/core/hle/kernel/k_page_buffer.h +++ b/src/core/hle/kernel/k_page_buffer.h @@ -6,12 +6,10 @@ #include <array> -#include "common/alignment.h" -#include "common/assert.h" #include "common/common_types.h" -#include "core/core.h" #include "core/device_memory.h" #include "core/hle/kernel/memory_types.h" +#include "core/hle/kernel/slab_helpers.h" namespace Kernel { @@ -19,10 +17,7 @@ class KPageBuffer final : public KSlabAllocated<KPageBuffer> { public: KPageBuffer() = default; - static KPageBuffer* FromPhysicalAddress(Core::System& system, PAddr phys_addr) { - ASSERT(Common::IsAligned(phys_addr, PageSize)); - return reinterpret_cast<KPageBuffer*>(system.DeviceMemory().GetPointer(phys_addr)); - } + static KPageBuffer* FromPhysicalAddress(Core::System& system, PAddr phys_addr); private: [[maybe_unused]] alignas(PageSize) std::array<u8, PageSize> m_buffer{}; |