Skip to content

Commit 671cd0c

Browse files
machineyosemite: set PCI IRQ maps.
1 parent ef62e8b commit 671cd0c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

machines/machineyosemite.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,28 @@ int initialize_yosemite(std::string& id)
5959
sec_bridge->pci_register_device(DEV_FUN(5,0),
6060
dynamic_cast<PCIDevice*>(gMachineObj->get_comp_by_name("Heathrow")));
6161

62+
InterruptCtrl *int_ctrl_obj =
63+
dynamic_cast<InterruptCtrl*>(gMachineObj->get_comp_by_type(HWCompType::INT_CTRL));
64+
65+
static const std::vector<PciIrqMap> grackle_irq_map = {
66+
{"Main_GPU", DEV_FUN(0x10,0), 1 << 22}
67+
};
68+
69+
grackle_obj->set_interrupt_controller(int_ctrl_obj);
70+
grackle_obj->set_irq_map(grackle_irq_map);
71+
72+
static const std::vector<PciIrqMap> pci_bridge_irq_map = {
73+
{"FireWire", DEV_FUN(0x00,0), 1 << 21},
74+
{"UltraATA", DEV_FUN(0x01,0), 1 << 26},
75+
{"Slot_J11", DEV_FUN(0x02,0), 1 << 23},
76+
{"Slot_J10", DEV_FUN(0x03,0), 1 << 24},
77+
{"Slot_J9" , DEV_FUN(0x04,0), 1 << 25},
78+
{"USB_OHCI", DEV_FUN(0x06,0), 1 << 28}
79+
};
80+
81+
sec_bridge->set_interrupt_controller(int_ctrl_obj);
82+
sec_bridge->set_irq_map(pci_bridge_irq_map);
83+
6284
// allocate ROM region
6385
if (!grackle_obj->add_rom_region(0xFFF00000, 0x100000)) {
6486
LOG_F(ERROR, "Could not allocate ROM region!");

0 commit comments

Comments
 (0)