Wire PLATINUM interrupt.

This commit is contained in:
Maxim Poliakovski 2024-02-12 00:54:44 +01:00
parent 8ddbc9c427
commit 98d661eda1
2 changed files with 2 additions and 1 deletions

View File

@ -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);
}

View File

@ -87,7 +87,7 @@ int PlatinumCtrl::device_postinit() {
this->int_ctrl = dynamic_cast<InterruptCtrl*>(
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);