summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-03-12 01:11:57 +0100
committerbunnei <bunneidev@gmail.com>2022-03-15 02:14:54 +0100
commita25cd4bb4bb00949d0f51ebde093e04639e3bb85 (patch)
treec775c4690b24b1632cf6c3a5a591e6dfe1ee0417 /src/core/hle/kernel/kernel.cpp
parentcore: hle: kernel: k_page_buffer: Add KThreadLocalPage primitive. (diff)
downloadyuzu-a25cd4bb4bb00949d0f51ebde093e04639e3bb85.tar
yuzu-a25cd4bb4bb00949d0f51ebde093e04639e3bb85.tar.gz
yuzu-a25cd4bb4bb00949d0f51ebde093e04639e3bb85.tar.bz2
yuzu-a25cd4bb4bb00949d0f51ebde093e04639e3bb85.tar.lz
yuzu-a25cd4bb4bb00949d0f51ebde093e04639e3bb85.tar.xz
yuzu-a25cd4bb4bb00949d0f51ebde093e04639e3bb85.tar.zst
yuzu-a25cd4bb4bb00949d0f51ebde093e04639e3bb85.zip
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 71bd466cf..b543f4083 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -76,7 +76,7 @@ struct KernelCore::Impl {
// Initialize kernel memory and resources.
InitializeSystemResourceLimit(kernel, system.CoreTiming());
InitializeMemoryLayout();
- InitializePageSlab();
+ Init::InitializeKPageBufferSlabHeap(system);
InitializeSchedulers();
InitializeSuspendThreads();
InitializePreemption(kernel);
@@ -660,22 +660,6 @@ struct KernelCore::Impl {
time_phys_addr, time_size, "Time:SharedMemory");
}
- void InitializePageSlab() {
- // Allocate slab heaps
- user_slab_heap_pages =
- std::make_unique<KSlabHeap<Page>>(KSlabHeap<Page>::AllocationType::Guest);
-
- // TODO(ameerj): This should be derived, not hardcoded within the kernel
- constexpr u64 user_slab_heap_size{0x3de000};
- // Reserve slab heaps
- ASSERT(
- system_resource_limit->Reserve(LimitableResource::PhysicalMemory, user_slab_heap_size));
- // Initialize slab heap
- user_slab_heap_pages->Initialize(
- system.DeviceMemory().GetPointer(Core::DramMemoryMap::SlabHeapBase),
- user_slab_heap_size);
- }
-
KClientPort* CreateNamedServicePort(std::string name) {
auto search = service_interface_factory.find(name);
if (search == service_interface_factory.end()) {
@@ -756,7 +740,6 @@ struct KernelCore::Impl {
// Kernel memory management
std::unique_ptr<KMemoryManager> memory_manager;
- std::unique_ptr<KSlabHeap<Page>> user_slab_heap_pages;
// Shared memory for services
Kernel::KSharedMemory* hid_shared_mem{};
@@ -1031,14 +1014,6 @@ const KMemoryManager& KernelCore::MemoryManager() const {
return *impl->memory_manager;
}
-KSlabHeap<Page>& KernelCore::GetUserSlabHeapPages() {
- return *impl->user_slab_heap_pages;
-}
-
-const KSlabHeap<Page>& KernelCore::GetUserSlabHeapPages() const {
- return *impl->user_slab_heap_pages;
-}
-
Kernel::KSharedMemory& KernelCore::GetHidSharedMem() {
return *impl->hid_shared_mem;
}