From 7b279ab863e3ee1990094596d334eb84f10f4981 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 1 Dec 2020 06:54:53 -0800 Subject: [PATCH] kern: remove KPageTableBase::MakeAndOpenContiguousPageGroup --- .../arch/arm64/kern_k_process_page_table.hpp | 4 ---- .../mesosphere/kern_k_page_table_base.hpp | 1 - .../source/kern_k_page_table_base.cpp | 23 ------------------- 3 files changed, 28 deletions(-) diff --git a/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_process_page_table.hpp b/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_process_page_table.hpp index 2b46a723c..52d56618b 100644 --- a/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_process_page_table.hpp +++ b/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_process_page_table.hpp @@ -128,10 +128,6 @@ namespace ams::kern::arch::arm64 { return this->page_table.MakeAndOpenPageGroup(out, address, num_pages, state_mask, state, perm_mask, perm, attr_mask, attr); } - Result MakeAndOpenPageGroupContiguous(KPageGroup *out, KProcessAddress address, size_t num_pages, u32 state_mask, u32 state, u32 perm_mask, u32 perm, u32 attr_mask, u32 attr) { - return this->page_table.MakeAndOpenPageGroupContiguous(out, address, num_pages, state_mask, state, perm_mask, perm, attr_mask, attr); - } - Result InvalidateProcessDataCache(KProcessAddress address, size_t size) { return this->page_table.InvalidateProcessDataCache(address, size); } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_page_table_base.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_page_table_base.hpp index f1a6ac8f0..f22d476c8 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_page_table_base.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_page_table_base.hpp @@ -345,7 +345,6 @@ namespace ams::kern { Result UnmapPageGroup(KProcessAddress address, const KPageGroup &pg, KMemoryState state); Result MakeAndOpenPageGroup(KPageGroup *out, KProcessAddress address, size_t num_pages, u32 state_mask, u32 state, u32 perm_mask, u32 perm, u32 attr_mask, u32 attr); - Result MakeAndOpenPageGroupContiguous(KPageGroup *out, KProcessAddress address, size_t num_pages, u32 state_mask, u32 state, u32 perm_mask, u32 perm, u32 attr_mask, u32 attr); Result InvalidateProcessDataCache(KProcessAddress address, size_t size); diff --git a/libraries/libmesosphere/source/kern_k_page_table_base.cpp b/libraries/libmesosphere/source/kern_k_page_table_base.cpp index 00f2b4639..a28938593 100644 --- a/libraries/libmesosphere/source/kern_k_page_table_base.cpp +++ b/libraries/libmesosphere/source/kern_k_page_table_base.cpp @@ -2039,29 +2039,6 @@ namespace ams::kern { return ResultSuccess(); } - Result KPageTableBase::MakeAndOpenPageGroupContiguous(KPageGroup *out, KProcessAddress address, size_t num_pages, u32 state_mask, u32 state, u32 perm_mask, u32 perm, u32 attr_mask, u32 attr) { - /* Ensure that the page group isn't null. */ - MESOSPHERE_ASSERT(out != nullptr); - - /* Make sure that the region we're mapping is valid for the table. */ - const size_t size = num_pages * PageSize; - R_UNLESS(this->Contains(address, size), svc::ResultInvalidCurrentMemory()); - - /* Lock the table. */ - KScopedLightLock lk(this->general_lock); - - /* Check if state allows us to create the group. */ - R_TRY(this->CheckMemoryStateContiguous(address, size, state_mask | KMemoryState_FlagReferenceCounted, state | KMemoryState_FlagReferenceCounted, perm_mask, perm, attr_mask, attr)); - - /* Create a new page group for the region. */ - R_TRY(this->MakePageGroup(*out, address, num_pages)); - - /* Open a new reference to the pages in the group. */ - out->Open(); - - return ResultSuccess(); - } - Result KPageTableBase::InvalidateProcessDataCache(KProcessAddress address, size_t size) { /* Check that the region is in range. */ R_UNLESS(this->Contains(address, size), svc::ResultInvalidCurrentMemory());