From c6b26921683505802e6dbce7c78d715853680286 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 9 Oct 2024 12:52:07 -0700 Subject: [PATCH] kern: clear gicd/gicc pointers in KInterruptController::Finalize --- .../source/arch/arm/kern_generic_interrupt_controller.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/libmesosphere/source/arch/arm/kern_generic_interrupt_controller.inc b/libraries/libmesosphere/source/arch/arm/kern_generic_interrupt_controller.inc index 864da44a5..ef363c0cf 100644 --- a/libraries/libmesosphere/source/arch/arm/kern_generic_interrupt_controller.inc +++ b/libraries/libmesosphere/source/arch/arm/kern_generic_interrupt_controller.inc @@ -79,6 +79,12 @@ namespace ams::kern::arch::arm { /* Setup all interrupt lines. */ SetupInterruptLines(core_id); + + /* Clear pointers, if needed. */ + if (core_id == 0) { + m_gicd = nullptr; + m_gicc = nullptr; + } } void KInterruptController::SaveCoreLocal(LocalState *state) const {