diff options
| author | 2023-12-18 00:49:46 -0500 | |
|---|---|---|
| committer | 2023-12-22 21:52:49 -0500 | |
| commit | db7b2bc8f136868ea5251d5a504bd9f89d993c67 (patch) | |
| tree | 74a01823219cd4248cea08f42b52110702ad5426 /src/core/hle/kernel | |
| parent | general: properly support multiple memory instances (diff) | |
| download | yuzu-db7b2bc8f136868ea5251d5a504bd9f89d993c67.tar.gz yuzu-db7b2bc8f136868ea5251d5a504bd9f89d993c67.tar.xz yuzu-db7b2bc8f136868ea5251d5a504bd9f89d993c67.zip | |
kernel: restrict nce to applications
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/k_process.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc/svc_info.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 2bfb71b3a..d6869c228 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp | |||
| @@ -1233,7 +1233,7 @@ void KProcess::LoadModule(CodeSet code_set, KProcessAddress base_addr) { | |||
| 1233 | ReprotectSegment(code_set.DataSegment(), Svc::MemoryPermission::ReadWrite); | 1233 | ReprotectSegment(code_set.DataSegment(), Svc::MemoryPermission::ReadWrite); |
| 1234 | 1234 | ||
| 1235 | #ifdef HAS_NCE | 1235 | #ifdef HAS_NCE |
| 1236 | if (Settings::IsNceEnabled()) { | 1236 | if (this->IsApplication() && Settings::IsNceEnabled()) { |
| 1237 | auto& buffer = m_kernel.System().DeviceMemory().buffer; | 1237 | auto& buffer = m_kernel.System().DeviceMemory().buffer; |
| 1238 | const auto& code = code_set.CodeSegment(); | 1238 | const auto& code = code_set.CodeSegment(); |
| 1239 | const auto& patch = code_set.PatchSegment(); | 1239 | const auto& patch = code_set.PatchSegment(); |
| @@ -1249,7 +1249,7 @@ void KProcess::InitializeInterfaces() { | |||
| 1249 | Core::MakeExclusiveMonitor(this->GetMemory(), Core::Hardware::NUM_CPU_CORES); | 1249 | Core::MakeExclusiveMonitor(this->GetMemory(), Core::Hardware::NUM_CPU_CORES); |
| 1250 | 1250 | ||
| 1251 | #ifdef HAS_NCE | 1251 | #ifdef HAS_NCE |
| 1252 | if (this->Is64Bit() && Settings::IsNceEnabled()) { | 1252 | if (this->IsApplication() && Settings::IsNceEnabled()) { |
| 1253 | for (size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { | 1253 | for (size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { |
| 1254 | m_arm_interfaces[i] = std::make_unique<Core::ArmNce>(m_kernel.System(), true, i); | 1254 | m_arm_interfaces[i] = std::make_unique<Core::ArmNce>(m_kernel.System(), true, i); |
| 1255 | } | 1255 | } |
diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index ada998772..231e4d0e1 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp | |||
| @@ -118,7 +118,6 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle | |||
| 118 | R_SUCCEED(); | 118 | R_SUCCEED(); |
| 119 | 119 | ||
| 120 | case InfoType::IsApplication: | 120 | case InfoType::IsApplication: |
| 121 | LOG_WARNING(Kernel_SVC, "(STUBBED) Assuming process is application"); | ||
| 122 | *result = process->IsApplication(); | 121 | *result = process->IsApplication(); |
| 123 | R_SUCCEED(); | 122 | R_SUCCEED(); |
| 124 | 123 | ||