diff options
author | arades79 <scravers@protonmail.com> | 2023-02-11 19:28:03 +0100 |
---|---|---|
committer | arades79 <scravers@protonmail.com> | 2023-02-14 18:33:11 +0100 |
commit | 45e13b03f372230dbf780f3fa87dd88f388af605 (patch) | |
tree | 555593e7e5016b6ba2a777d7417ada244abce458 /src/core/hle/kernel/kernel.cpp | |
parent | Merge pull request #9795 from Kelebek1/biquad_fix (diff) | |
download | yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.gz yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.bz2 yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.lz yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.xz yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.zst yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 5b72eaaa1..563e2681b 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -254,7 +254,7 @@ struct KernelCore::Impl { system_resource_limit->Reserve(LimitableResource::PhysicalMemoryMax, kernel_size); // Reserve secure applet memory, introduced in firmware 5.0.0 - constexpr u64 secure_applet_memory_size{4_MiB}; + constexpr static u64 secure_applet_memory_size{4_MiB}; ASSERT(system_resource_limit->Reserve(LimitableResource::PhysicalMemoryMax, secure_applet_memory_size)); } @@ -477,9 +477,9 @@ struct KernelCore::Impl { const VAddr code_end_virt_addr = KernelVirtualAddressCodeEnd; // Setup the containing kernel region. - constexpr size_t KernelRegionSize = 1_GiB; - constexpr size_t KernelRegionAlign = 1_GiB; - constexpr VAddr kernel_region_start = + constexpr static size_t KernelRegionSize = 1_GiB; + constexpr static size_t KernelRegionAlign = 1_GiB; + constexpr static VAddr kernel_region_start = Common::AlignDown(code_start_virt_addr, KernelRegionAlign); size_t kernel_region_size = KernelRegionSize; if (!(kernel_region_start + KernelRegionSize - 1 <= KernelVirtualAddressSpaceLast)) { @@ -489,11 +489,11 @@ struct KernelCore::Impl { kernel_region_start, kernel_region_size, KMemoryRegionType_Kernel)); // Setup the code region. - constexpr size_t CodeRegionAlign = PageSize; - constexpr VAddr code_region_start = + constexpr static size_t CodeRegionAlign = PageSize; + constexpr static VAddr code_region_start = Common::AlignDown(code_start_virt_addr, CodeRegionAlign); - constexpr VAddr code_region_end = Common::AlignUp(code_end_virt_addr, CodeRegionAlign); - constexpr size_t code_region_size = code_region_end - code_region_start; + constexpr static VAddr code_region_end = Common::AlignUp(code_end_virt_addr, CodeRegionAlign); + constexpr static size_t code_region_size = code_region_end - code_region_start; ASSERT(memory_layout->GetVirtualMemoryRegionTree().Insert( code_region_start, code_region_size, KMemoryRegionType_KernelCode)); @@ -524,8 +524,8 @@ struct KernelCore::Impl { } // Decide on the actual size for the misc region. - constexpr size_t MiscRegionAlign = KernelAslrAlignment; - constexpr size_t MiscRegionMinimumSize = 32_MiB; + constexpr static size_t MiscRegionAlign = KernelAslrAlignment; + constexpr static size_t MiscRegionMinimumSize = 32_MiB; const size_t misc_region_size = Common::AlignUp( std::max(misc_region_needed_size, MiscRegionMinimumSize), MiscRegionAlign); ASSERT(misc_region_size > 0); @@ -541,8 +541,8 @@ struct KernelCore::Impl { const bool use_extra_resources = KSystemControl::Init::ShouldIncreaseThreadResourceLimit(); // Setup the stack region. - constexpr size_t StackRegionSize = 14_MiB; - constexpr size_t StackRegionAlign = KernelAslrAlignment; + constexpr static size_t StackRegionSize = 14_MiB; + constexpr static size_t StackRegionAlign = KernelAslrAlignment; const VAddr stack_region_start = memory_layout->GetVirtualMemoryRegionTree().GetRandomAlignedRegion( StackRegionSize, StackRegionAlign, KMemoryRegionType_Kernel); @@ -563,7 +563,7 @@ struct KernelCore::Impl { const PAddr code_end_phys_addr = code_start_phys_addr + code_region_size; const PAddr slab_start_phys_addr = code_end_phys_addr; const PAddr slab_end_phys_addr = slab_start_phys_addr + slab_region_size; - constexpr size_t SlabRegionAlign = KernelAslrAlignment; + constexpr static size_t SlabRegionAlign = KernelAslrAlignment; const size_t slab_region_needed_size = Common::AlignUp(code_end_phys_addr + slab_region_size, SlabRegionAlign) - Common::AlignDown(code_end_phys_addr, SlabRegionAlign); @@ -575,8 +575,8 @@ struct KernelCore::Impl { slab_region_start, slab_region_size, KMemoryRegionType_KernelSlab)); // Setup the temp region. - constexpr size_t TempRegionSize = 128_MiB; - constexpr size_t TempRegionAlign = KernelAslrAlignment; + constexpr static size_t TempRegionSize = 128_MiB; + constexpr static size_t TempRegionAlign = KernelAslrAlignment; const VAddr temp_region_start = memory_layout->GetVirtualMemoryRegionTree().GetRandomAlignedRegion( TempRegionSize, TempRegionAlign, KMemoryRegionType_Kernel); @@ -656,7 +656,7 @@ struct KernelCore::Impl { ASSERT(linear_extents.GetEndAddress() != 0); // Setup the linear mapping region. - constexpr size_t LinearRegionAlign = 1_GiB; + constexpr static size_t LinearRegionAlign = 1_GiB; const PAddr aligned_linear_phys_start = Common::AlignDown(linear_extents.GetAddress(), LinearRegionAlign); const size_t linear_region_size = @@ -737,11 +737,11 @@ struct KernelCore::Impl { void InitializeHackSharedMemory() { // Setup memory regions for emulated processes // TODO(bunnei): These should not be hardcoded regions initialized within the kernel - constexpr std::size_t hid_size{0x40000}; - constexpr std::size_t font_size{0x1100000}; - constexpr std::size_t irs_size{0x8000}; - constexpr std::size_t time_size{0x1000}; - constexpr std::size_t hidbus_size{0x1000}; + constexpr static std::size_t hid_size{0x40000}; + constexpr static std::size_t font_size{0x1100000}; + constexpr static std::size_t irs_size{0x8000}; + constexpr static std::size_t time_size{0x1000}; + constexpr static std::size_t hidbus_size{0x1000}; hid_shared_mem = KSharedMemory::Create(system.Kernel()); font_shared_mem = KSharedMemory::Create(system.Kernel()); |