• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/IOPCIFamily-239.1.2/

Lines Matching +defs:child +defs:name

74 #define DLOG_RANGE(name, range) if (range) {                                \
75 DLOG(name": start/size = 0x%08llx:0x%08llx,0x%08llx\n", \
80 #define DLOGI_RANGE(name, range) do { if (dolog) DLOG_RANGE(name, range); } while (0);
155 IOPCIConfigEntry * child;
164 child = NULL;
169 for (child = entry->child; child; child = child->peer)
173 if (dev != child->space.s.deviceNum) continue;
174 if (func != child->space.s.functionNum) continue;
177 if (!child->isBridge) continue;
178 else if (bus < child->secBusNum) continue;
179 else if (bus > child->subBusNum) continue;
180 next = child;
185 return (child);
716 const char * name;
723 const char * name;
778 // make generic name
780 name = 0;
782 (0 == name) && nextName->name;
786 name = nextName->name;
789 // or name from IDs
816 if (0 == name)
817 name = out;
835 nameProp = OSSymbol::withCString( name );
842 prop = OSData::withBytes( name, strlen(name) + 1 );
845 propTable->setObject("name", prop );
937 IOACPIPlatformDevice * child;
942 child = (IOACPIPlatformDevice *) rp->getChildEntry(gIOPCIACPIPlane);
943 if (child)
949 ret = child->evaluateInteger("_RMV", &result32);
955 else if ((obj = child->copyProperty(kACPIDevicePropertiesKey)))
1000 FOREACH_CHILD(bridge, child)
1002 if (kPCIDeviceStateDead & child->deviceState)
1004 if (child->space.s.deviceNum == deviceNum &&
1005 (functionAll || (child->space.s.functionNum == functionNum)))
1007 match = child;
1055 FOREACH_CHILD( bridge, child )
1057 if (kPCIDeviceStateDead & child->deviceState)
1059 if (child->space.s.deviceNum == deviceNum &&
1060 (functionAll || (child->space.s.functionNum == functionNum)))
1062 match = child;
1115 oneChild = (bridge->child && !bridge->child->peer);
1117 FOREACH_CHILD(bridge, child)
1119 if (!child->isBridge) continue;
1120 if (kPCIDeviceStateTreeConnected & child->deviceState) continue;
1121 // child->deviceState |= kPCIDeviceStateTreeConnected;
1125 && (child == bridge->child))
1128 bridge->child->supportsHotPlug = kPCIStatic;
1129 bridge->child->linkInterrupts = false;
1130 DLOG("tunnel controller "D()"\n", DEVICE_IDENT(bridge->child));
1134 if (tbok && child->dtEntry)
1136 if (child->dtEntry->getProperty(gIOPCIThunderboltKey))
1138 child->supportsHotPlug = kPCIHotPlugTunnelRoot;
1141 if ((obj = child->dtEntry->copyProperty(gIOPCIThunderboltKey, gIODTPlane,
1145 child->supportsHotPlug = kPCIHotPlugTunnelRootParent;
1153 child->supportsHotPlug = kPCIHotPlugTunnel;
1160 child->supportsHotPlug = kPCIHotPlug;
1164 if (child->headerType == kPCIHeaderType2)
1165 child->supportsHotPlug = kPCIHotPlugRoot;
1166 else if (child->dtEntry)
1168 child->supportsHotPlug = IOPCIIsHotplugPort(child->dtEntry);
1171 child->supportsHotPlug = kPCIStatic;
1179 FOREACH_CHILD(bridge, child)
1181 if ((kPCIHotPlugTunnelRootParent == child->supportsHotPlug)
1182 || (kPCIHotPlugTunnelRoot == child->supportsHotPlug)) bridge->countMaximize++;
1194 FOREACH_CHILD(bridge, child)
1196 if (!child->isBridge) continue;
1197 if (kPCIDeviceStateTreeConnected & child->deviceState) continue;
1198 child->deviceState |= kPCIDeviceStateTreeConnected;
1201 DEVICE_IDENT(child),
1202 child->supportsHotPlug, child->linkInterrupts);
1206 childRange = child->ranges[i];
1210 if (kPCIHotPlugTunnelRootParent == child->supportsHotPlug)
1213 child->rangeSizeChanges |= (1 << BRN(childRange->type));
1215 else if (kPCIHotPlugTunnelRoot == child->supportsHotPlug)
1219 child->rangeSizeChanges |= (1 << BRN(childRange->type));
1221 else if (child->linkInterrupts
1222 && (kPCIStatic != child->supportsHotPlug)
1249 // Create missing device-tree entries for any child devices.
1251 FOREACH_CHILD( bridge, child )
1261 if (kPCIDeviceStatePropertiesDone & child->deviceState) continue;
1262 child->deviceState |= kPCIDeviceStatePropertiesDone;
1264 DLOG("bridgeConstructDeviceTree at "D()"\n", DEVICE_IDENT(child));
1266 propTable = constructProperties(child);
1270 if (child->acpiDevice)
1274 obj = child->acpiDevice->copyProperty(kACPIDevicePropertiesKey);
1284 pciDevice = OSDynamicCast(IOPCIDevice, child->dtNub);
1293 if (child->dtEntry)
1296 ok = nub->init(child->dtEntry, gIODTPlane);
1297 child->dtNub = child->dtEntry = 0;
1300 initFrom = child->dtEntry->dictionaryWithProperties();
1316 nub->reserved->configEntry = child;
1317 child->dtNub = nub;
1319 child->dtEntry = nub;
1320 copyReg = child->acpiDevice;
1322 copyReg = child->dtEntry;
1349 child->dtNub->removeProperty("ranges");
1350 child->dtNub->removeProperty("reg");
1351 child->dtNub->removeProperty("assigned-addresses");
1352 child->dtNub->removeProperty("pcidebug");
1356 if (child->dtNub->getProperty(propKey)) continue;
1358 child->dtNub->setProperty(propKey, obj);
1365 && (kPCIDeviceStatePaused & child->deviceState)
1369 DLOG("IOPCIDevice::relocate at "D()"\n", DEVICE_IDENT(child));
1373 range = child->ranges[idx];
1395 IOPCIConfigEntry * child;
1447 for (child = bridge->child; child; child = next)
1449 next = child->peer;
1450 bridgeDeadChild(bridge, child);
1502 void CLASS::bridgeAddChild(IOPCIConfigEntry * bridge, IOPCIConfigEntry * child)
1504 IOPCIConfigEntry ** prev = &bridge->child;
1512 *prev = child;
1513 child->parent = bridge;
1515 if (child->isBridge)
1588 IOPCIConfigEntry * child;
1594 while ((child = dead->child))
1596 bridgeRemoveChild(dead, child, deallocTypes, freeTypes, childList);
1599 DLOG("bridge "B()" removing child %p "D()"\n",
1608 prev = &bridge->child;
1609 while ((child = *prev))
1611 if (dead == child)
1613 *prev = child->peer;
1616 prev = &child->peer;
1619 if (!child) panic("bridgeRemoveChild");
1677 dead->peer = to->child;
1678 to->child = dead;
1703 DLOG("bridge %p dead child at "D()"\n", bridge, DEVICE_IDENT(dead));
1717 IOPCIConfigEntry * child = NULL;
1730 for (child = bridge->child; child; child = child->peer)
1732 if (kPCIDeviceStateDead & child->deviceState)
1734 if (space.bits == child->space.bits)
1736 DLOG("bridge %p scan existing child at "D()" state 0x%x\n",
1737 bridge, DEVICE_IDENT(child), child->deviceState);
1743 if ((vendorProduct != child->vendorProduct)
1744 || (kPCIDeviceStateEjected & child->deviceState)
1745 || (kPCIDeviceStateToKill & child->deviceState))
1747 IOPCIConfigEntry * dead = child;
1748 if (!(kPCIDeviceStateEjected & child->deviceState))
1751 child = NULL;
1753 // may free child
1761 if (child)
1772 child = IONew(IOPCIConfigEntry, 1);
1773 if (!child) return;
1775 memset(child, 0, sizeof(*child));
1776 child->id = ++fNextID;
1777 child->space = space;
1778 child->headerType = configRead8(child, kIOPCIConfigHeaderType) & 0x7f;
1779 child->classCode = configRead32(child, kIOPCIConfigRevisionID) >> 8;
1780 child->vendorProduct = vendorProduct;
1783 child->headerType, child->classCode, configRead16(child, kIOPCIConfigCommand),
1784 DEVICE_IDENT(child),
1785 child->deviceState);
1787 switch (child->headerType)
1791 if ((child->classCode & 0xFFFFFF) == 0x060000)
1794 deviceProbeRanges(child, resetMask);
1798 child->isBridge = true;
1799 bridgeProbeRanges(child, resetMask);
1803 child->isBridge = true;
1804 cardbusProbeRanges(child, resetMask);
1808 DLOG(" bad PCI header type 0x%x\n", child->headerType);
1815 IODelete(child, IOPCIConfigEntry, 1);
1819 if (findPCICapability(child, kIOPCIPCIExpressCapability, &child->expressCapBlock))
1821 if (child->isBridge)
1831 expressCaps = configRead16(child, child->expressCapBlock + 0x02);
1832 linkCaps = configRead32(child, child->expressCapBlock + 0x0c);
1833 linkControl = configRead16(child, child->expressCapBlock + 0x10);
1834 if (0x100 & expressCaps) slotCaps = configRead32(child, child->expressCapBlock + 0x14);
1842 child->linkInterrupts = true;
1846 child->expressCaps = expressCaps;
1847 child->linkCaps = linkCaps;
1849 child->expressCaps, linkControl, child->linkCaps, slotCaps);
1851 child->expressDeviceCaps1 = configRead32(child, child->expressCapBlock + 0x04);
1852 child->expressMaxPayload = (child->expressDeviceCaps1 & 7);
1853 DLOG(" expressMaxPayload 0x%x\n", child->expressMaxPayload);
1856 bridgeAddChild(bridge, child);
1857 checkCacheLineSize(child);
2440 DLOG("bridge "B()" child change\n", BRIDGE_IDENT(bridge));
2461 FOREACH_CHILD(bridge, child) child->deviceState &= ~kPCIDeviceStateAllocatedBus;
2532 FOREACH_CHILD(bridge, child) child->deviceState &= ~kPCIDeviceStateAllocated;
2619 IOPCIConfigEntry * child;
2621 for (child = device->child; child; child = child->peer)
2623 if (!child->isBridge)
2626 child->iterator = kIteratorCheck;
2627 if (!next && (child->iterator < kIteratorDidCheck))
2628 next = child;
2781 IOPCIConfigEntry * child;
2816 if (!bridge->child) break;
2817 for (child = bridge->child; child; child = child->peer)
2819 if (!(kPCIDeviceStateDead & child->deviceState)) break;
2821 if (child) break;
2825 for (child = bridge->child; child; child = next)
2827 next = child->peer;
2828 bridgeRemoveChild(bridge, child, kIOPCIRangeAllBarsMask, 0, &pendingList);
2838 for (child = bridge->child; child; child = child->peer)
2842 childRange = child->ranges[i];
2851 logAllocatorRange(child, childRange, '\n');
2863 maxAddress[type], childRange->maxAddress, DEVICE_IDENT(child));
2868 && child->expressCapBlock
2872 if (child->expressMaxPayload < fMaxPayload)
2874 fMaxPayload = child->expressMaxPayload;
2913 DLOG(" %s: total child reqs 0x%llx of 0x%llx maxalign 0x%llx\n",
3010 FOREACH_CHILD(bridge, child)
3012 expressCards |= (kPCIHotPlugRoot == child->supportsHotPlug);
3013 if (kPCIStatic == child->supportsHotPlug) continue;
3016 childRange = child->ranges[rangeIndex];
3021 canRelocate |= (0 != (kPCIDeviceStatePaused & child->deviceState));
3027 ((!child->ranges[kIOPCIRangeBridgeMemory]
3028 || !child->ranges[kIOPCIRangeBridgeMemory]->nextSubRange)
3029 && (!child->ranges[kIOPCIRangeBridgePFMemory]
3030 || !child->ranges[kIOPCIRangeBridgePFMemory]->nextSubRange)
3031 && (!child->ranges[kIOPCIRangeBridgeIO]
3032 || !child->ranges[kIOPCIRangeBridgeIO]->nextSubRange));
3057 FOREACH_CHILD(bridge, child)
3061 childRange = child->ranges[rangeIndex];
3100 logAllocatorRange(child, childRange, '\n');
3129 child->rangeBaseChanges |= (1 << rangeIndex);
3149 FOREACH_CHILD(bridge, child)
3153 childRange = child->ranges[rangeIndex];
3165 DEVICE_IDENT(child));
3166 child->rangeBaseChanges |= (1 << rangeIndex);
3177 FOREACH_CHILD(bridge, child)
3179 applyConfiguration(child, typeMask, false);
3184 FOREACH_CHILD(bridge, child)
3188 childRange = child->ranges[rangeIndex];
3198 child->rangeBaseChanges |= (1 << rangeIndex);
3199 childRange->device = child;
3317 FOREACH_CHILD(bridge, child)
3323 & child->deviceState) continue;
3324 if (child->supportsHotPlug < kPCIHotPlug) continue;
3325 if (!child->dtNub || !child->dtNub->inPlane(gIOServicePlane)) continue;
3326 if (treeInState(child,
3329 DLOG("Request pause for "D()"\n", DEVICE_IDENT(child));
3330 child->deviceState |= kPCIDeviceStateRequestPause;
3331 markChanged(child);
3344 FOREACH_CHILD(bridge, child)
3346 applyConfiguration(child, typeMask, true);
3533 FOREACH_CHILD(bridge, child)
3535 child->space.s.busNum = bridge->secBusNum;
3536 child->deviceState &= ~kPCIDeviceStatePropertiesDone;
3790 FOREACH_CHILD(bridge, child)
3792 if (kPCIDeviceStateDead & child->deviceState) continue;
3793 if (kPCIDeviceStatePropertiesDone & child->deviceState) continue;
3794 if (!child->expressCapBlock) continue;
3795 deviceControl = configRead16(child, child->expressCapBlock + 0x08);
3805 configWrite16(child, child->expressCapBlock + 0x08, deviceControl);
3808 DEVICE_IDENT(child), fMaxPayload);
3830 FOREACH_CHILD(bridge, child)
3832 if (kPCIHeaderType0 != child->headerType) continue;
3833 if (0x868010b5 == child->vendorProduct) continue;
3835 reg32 = (child->space.s.busNum << 8);
3836 // reg32 |= (child->space.s.deviceNum << 3);
3837 // reg32 |= (child->space.s.functionNum << 0);
3849 child->plxAperture = parent->ranges[kIOPCIRangeBridgePFMemory]->start;