mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-15 01:26:34 +00:00
thermosphere: move EnterInterruptibleHypervisorCode into IrqManager
This commit is contained in:
parent
4adb675072
commit
5b56d05e11
4 changed files with 10 additions and 4 deletions
|
@ -233,7 +233,7 @@ namespace ams::hvisor {
|
|||
|
||||
if (taskForBottomHalf != nullptr) {
|
||||
// Unmasking the irq signal is left at the discretion of the bottom half handler
|
||||
exceptionEnterInterruptibleHypervisorCode();
|
||||
EnterInterruptibleHypervisorCode();
|
||||
taskForBottomHalf->InterruptBottomHalfHandler(irqId, srcCore);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
#include "hvisor_gicv2.hpp"
|
||||
#include "hvisor_synchronization.hpp"
|
||||
#include "hvisor_i_interrupt_task.hpp"
|
||||
#include "hvisor_exception_stack_frame.hpp"
|
||||
#include "cpu/hvisor_cpu_sysreg_general.hpp"
|
||||
|
||||
#include "memory_map.h"
|
||||
|
||||
#include "exceptions.h" // TODO
|
||||
|
||||
namespace ams::hvisor {
|
||||
|
||||
class IrqManager final {
|
||||
|
@ -106,6 +106,13 @@ namespace ams::hvisor {
|
|||
gicd->sgir = GicV2Distributor::ForwardToAllOthers << 24 | id;
|
||||
}
|
||||
|
||||
static void EnterInterruptibleHypervisorCode()
|
||||
{
|
||||
// We don't want the guest to spam us with its timer interrupts. Disable the timers.
|
||||
THERMOSPHERE_SET_SYSREG(cntp_ctl_el0, 0);
|
||||
THERMOSPHERE_SET_SYSREG(cntv_ctl_el0, 0);
|
||||
}
|
||||
|
||||
static void HandleInterrupt(ExceptionStackFrame *frame);
|
||||
|
||||
public:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "defines.hpp"
|
||||
#include "exceptions.h"
|
||||
#include "cpu/hvisor_cpu_exception_sysregs.hpp"
|
||||
#include "hvisor_irq_manager.hpp"
|
||||
#include "memory_map.h"
|
||||
|
|
Loading…
Reference in a new issue