Skip to content

Commit de727db

Browse files
machineyosemite: use PCI slot names that better match device tree properties.
1 parent 671cd0c commit de727db

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

machines/machineyosemite.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ int initialize_yosemite(std::string& id)
5252
// get pointer to the bridge of the secondary PCI bus
5353
DecPciBridge *sec_bridge = dynamic_cast<DecPciBridge*>(gMachineObj->get_comp_by_name("Dec21154"));
5454

55-
// connect PCI devices
55+
// attach PCI devices to the PCI bridges
56+
grackle_obj->pci_register_device(DEV_FUN(16,0),
57+
dynamic_cast<PCIBase*>(gMachineObj->get_comp_by_name("AtiRage128")));
58+
5659
grackle_obj->pci_register_device(DEV_FUN(13,0),
5760
dynamic_cast<PCIBase*>(gMachineObj->get_comp_by_name("Dec21154")));
5861

@@ -63,19 +66,20 @@ int initialize_yosemite(std::string& id)
6366
dynamic_cast<InterruptCtrl*>(gMachineObj->get_comp_by_type(HWCompType::INT_CTRL));
6467

6568
static const std::vector<PciIrqMap> grackle_irq_map = {
66-
{"Main_GPU", DEV_FUN(0x10,0), 1 << 22}
69+
{"pci_J12", DEV_FUN(0x10,0), 1 << 22} // GPU PCI slot, 66 MHz
6770
};
6871

6972
grackle_obj->set_interrupt_controller(int_ctrl_obj);
7073
grackle_obj->set_irq_map(grackle_irq_map);
7174

75+
// 33 MHz PCI devices behind the DEC21154 PCI-to-PCI bridge
7276
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}
77+
{"pci_FireWire", DEV_FUN(0x00,0), 1 << 21},
78+
{"pci_UltraATA", DEV_FUN(0x01,0), 1 << 26},
79+
{"pci_J11", DEV_FUN(0x02,0), 1 << 23},
80+
{"pci_J10", DEV_FUN(0x03,0), 1 << 24},
81+
{"pci_J9", DEV_FUN(0x04,0), 1 << 25},
82+
{"pci_USB", DEV_FUN(0x06,0), 1 << 28}
7983
};
8084

8185
sec_bridge->set_interrupt_controller(int_ctrl_obj);

0 commit comments

Comments
 (0)