From 98d661eda1c530df0b838a2e44fd4e4afcede7d0 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Mon, 12 Feb 2024 00:54:44 +0100 Subject: [PATCH] Wire PLATINUM interrupt. --- devices/ioctrl/grandcentral.cpp | 1 + devices/memctrl/platinum.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/devices/ioctrl/grandcentral.cpp b/devices/ioctrl/grandcentral.cpp index c9499b2..0630ebf 100644 --- a/devices/ioctrl/grandcentral.cpp +++ b/devices/ioctrl/grandcentral.cpp @@ -277,6 +277,7 @@ uint32_t GrandCentral::register_dev_int(IntSrc src_id) { case IntSrc::SCSI_MESH: return 1 << 13; case IntSrc::VIA_CUDA: return 1 << 18; case IntSrc::SWIM3: return 1 << 19; + case IntSrc::PLATINUM: return 1 << 30; default: ABORT_F("%s: unknown interrupt source %d", this->name.c_str(), src_id); } diff --git a/devices/memctrl/platinum.cpp b/devices/memctrl/platinum.cpp index 0676d86..8cc85d4 100644 --- a/devices/memctrl/platinum.cpp +++ b/devices/memctrl/platinum.cpp @@ -87,7 +87,7 @@ int PlatinumCtrl::device_postinit() { this->int_ctrl = dynamic_cast( gMachineObj->get_comp_by_type(HWCompType::INT_CTRL)); - this->irq_id = 1UL << 30; // FIXME: hardcoded IRQ ID + this->irq_id = this->int_ctrl->register_dev_int(IntSrc::PLATINUM); this->vbl_cb = [this](uint8_t irq_line_state) { this->update_irq(irq_line_state, SWATCH_INT_VBL);