Lines Matching refs:mp

54 slotnm_create(topo_mod_t *mp, int dev, char *str)
58 if ((p = topo_mod_alloc(mp, sizeof (slotnm_t))) == NULL)
60 p->snm_mod = mp;
63 p->snm_name = topo_mod_strdup(mp, str);
83 di_devtype_get(topo_mod_t *mp, di_node_t src, char **devtype)
94 if (di_bytes_get(mp, src, DI_DEVTYPPROP, &sz, &buf) == 0) {
95 *devtype = topo_mod_strdup(mp, (char *)buf);
129 di_physlotinfo_get(topo_mod_t *mp, di_node_t src, int *slotnum, char **slotname)
139 (void) di_uintprop_get(mp, src, DI_PHYSPROP, (uint_t *)slotnum);
146 if (di_bytes_get(mp, src, DI_SLOTPROP, &sz, &buf) == 0 &&
166 if ((shp = topo_mod_smbios(mp)) != NULL) {
184 topo_mod_dprintf(mp, "%s: node=%p: using smbios name\n",
188 topo_mod_dprintf(mp, "%s: node=%p: found %s property\n",
197 topo_mod_dprintf(mp, "%s: node=%p: using generic slot name\n",
200 if ((*slotname = topo_mod_strdup(mp, slotbuf)) == NULL)
203 topo_mod_dprintf(mp, "%s: node=%p: slotname=%s\n",
210 di_slotinfo_get(topo_mod_t *mp, di_node_t src, int *nslots,
223 if (di_bytes_get(mp, src, DI_SLOTPROP, &sz, &slotbuf) < 0)
236 if ((newslot = slotnm_create(mp, andbit, s)) == NULL) {
269 did_create(topo_mod_t *mp, di_node_t src,
277 if ((pd = did_hash_lookup(mp, src)) != NULL) {
278 topo_mod_dprintf(mp, "Attempt to create existing did_t.\n");
283 if ((np = topo_mod_zalloc(mp, sizeof (did_t))) == NULL)
285 np->dp_mod = mp;
287 np->dp_hash = (did_hash_t *)topo_mod_getspecific(mp);
294 if (di_uintprop_get(mp, src, DI_REGPROP, &reg) < 0) {
295 topo_mod_free(mp, np, sizeof (did_t));
313 if (di_uintprop_get(mp, src, DI_CCPROP, &code) == 0) {
322 (void) di_devtype_get(mp, src, &np->dp_devtype);
328 if (di_physlotinfo_get(mp, src, &np->dp_physlot,
331 topo_mod_strfree(mp, np->dp_devtype);
332 topo_mod_free(mp, np, sizeof (did_t));
340 if (di_slotinfo_get(mp, src, &np->dp_nslots,
343 topo_mod_strfree(mp, np->dp_devtype);
344 topo_mod_free(mp, np, sizeof (did_t));
348 did_hash_insert(mp, src, np);
547 did_find(topo_mod_t *mp, di_node_t dn)
549 return (did_hash_lookup(mp, dn));
553 pci_BDF_get(topo_mod_t *mp, di_node_t dn, int *bus, int *dev, int *fn)
557 if ((dp = did_find(mp, dn)) == NULL)
567 pci_classcode_get(topo_mod_t *mp, di_node_t dn, uint_t *class, uint_t *sub)
571 if ((dp = did_find(mp, dn)) == NULL)
584 pci_devtype_get(topo_mod_t *mp, di_node_t dn)
588 if ((dp = did_find(mp, dn)) == NULL)
595 pciex_cap_get(topo_mod_t *mp, di_node_t dn)
599 if ((dp = did_find(mp, dn)) == NULL)
606 did_setspecific(topo_mod_t *mp, void *data)
611 topo_mod_setspecific(mp, hbdid->dp_hash);