summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/process_capability.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp
index 615b354c6..e98157f9c 100644
--- a/src/core/hle/kernel/process_capability.cpp
+++ b/src/core/hle/kernel/process_capability.cpp
@@ -278,7 +278,27 @@ ResultCode ProcessCapabilities::HandleMapIOFlags(u32 flags, VMManager& vm_manage
278} 278}
279 279
280ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) { 280ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) {
281 // TODO: Implement 281 constexpr u32 interrupt_ignore_value = 0x3FF;
282 const u32 interrupt0 = (flags >> 12) & 0x3FF;
283 const u32 interrupt1 = (flags >> 22) & 0x3FF;
284
285 for (u32 interrupt : {interrupt0, interrupt1}) {
286 if (interrupt == interrupt_ignore_value) {
287 continue;
288 }
289
290 // NOTE:
291 // This should be checking a generic interrupt controller value
292 // as part of the calculation, however, given we don't currently
293 // emulate that, it's sufficient to mark every interrupt as defined.
294
295 if (interrupt >= interrupt_capabilities.size()) {
296 return ERR_OUT_OF_RANGE;
297 }
298
299 interrupt_capabilities[interrupt] = true;
300 }
301
282 return RESULT_SUCCESS; 302 return RESULT_SUCCESS;
283} 303}
284 304