Browse Source
Merge pull request #12509 from liamwhite/ktrace
k_capabilities: simplify KTrace map skip logic
pull/15/merge
liamwhite
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
src/core/hle/kernel/k_capabilities.cpp
|
|
|
@ -185,6 +185,10 @@ Result KCapabilities::ProcessMapRegionCapability(const u32 cap, F f) { |
|
|
|
case RegionType::NoMapping: |
|
|
|
break; |
|
|
|
case RegionType::KernelTraceBuffer: |
|
|
|
if constexpr (!IsKTraceEnabled) { |
|
|
|
break; |
|
|
|
} |
|
|
|
[[fallthrough]]; |
|
|
|
case RegionType::OnMemoryBootImage: |
|
|
|
case RegionType::DTB: |
|
|
|
R_TRY(f(MemoryRegions[static_cast<u32>(type)], perm)); |
|
|
|
@ -330,8 +334,6 @@ Result KCapabilities::SetCapabilities(std::span<const u32> caps, KProcessPageTab |
|
|
|
|
|
|
|
// Map the range.
|
|
|
|
R_TRY(this->MapRange_(cap, size_cap, page_table)); |
|
|
|
} else if (GetCapabilityType(cap) == CapabilityType::MapRegion && !IsKTraceEnabled) { |
|
|
|
continue; |
|
|
|
} else { |
|
|
|
R_TRY(this->SetCapability(cap, set_flags, set_svc, page_table)); |
|
|
|
} |
|
|
|
|