diff --git a/src/system/kernel/arch/ppc/arch_int.cpp b/src/system/kernel/arch/ppc/arch_int.cpp index b4c977819a..c6a25ad3a2 100644 --- a/src/system/kernel/arch/ppc/arch_int.cpp +++ b/src/system/kernel/arch/ppc/arch_int.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -515,16 +516,13 @@ arch_int_init_post_device_manager(struct kernel_args *args) // iterate through the tree again and get an interrupt controller node iterator.Rewind(); while (device_node *node = iterator.Next()) { - const char *deviceType; - if (deviceManager->get_attr_string(node, B_DEVICE_TYPE, - &deviceType, false) == B_OK) { - bool isPIC = false; - - /* - bool isPIC - = (strcmp(deviceType, B_INTERRUPT_CONTROLLER_DRIVER_TYPE) == 0); - free(deviceType); - */ + uint16 pciBaseClass, pciSubType; + if (deviceManager->get_attr_uint16(node, B_DEVICE_TYPE, + &pciBaseClass, false) == B_OK && + deviceManager->get_attr_uint16(node, B_DEVICE_SUB_TYPE, + &pciSubType, false) == B_OK) { + bool isPIC = (pciBaseClass == PCI_base_peripheral) + && (pciSubType == PCI_pic); if (isPIC) { driver_module_info *driver;