Lines Matching refs:mod

80 _topo_init(topo_mod_t *mod, topo_version_t version)
87 topo_mod_setdebug(mod);
89 topo_mod_dprintf(mod, "module initializing.\n");
92 (void) topo_mod_seterrno(mod, EMOD_VER_NEW);
93 topo_mod_dprintf(mod, "incompatible topo version %d\n",
101 topo_mod_dprintf(mod, "not i86pc architecture: %s\n", isa);
105 result = topo_mod_register(mod, &x86pi_modinfo, TOPO_VERSION);
107 topo_mod_dprintf(mod, "registration failed: %s\n",
108 topo_mod_errmsg(mod));
112 topo_mod_dprintf(mod, "module ready.\n");
121 _topo_fini(topo_mod_t *mod)
123 topo_mod_dprintf(mod, "module finishing.\n");
126 topo_mod_unregister(mod);
135 x86pi_enum(topo_mod_t *mod, tnode_t *t_parent, const char *name,
144 topo_mod_dprintf(mod, "enumeration starting.\n");
151 result = x86pi_enum_start(mod, &x86pi);
153 topo_mod_dprintf(mod, "Enumeration failed.\n");
158 topo_mod_dprintf(mod, "enumeration complete in %lld ms.\n",
166 x86pi_enum_start(topo_mod_t *mod, x86pi_enum_t *x86pi)
176 shp = x86pi_smb_open(mod);
178 topo_mod_dprintf(mod, "%s: failed to open SMBIOS\n", f);
181 complvl = x86pi_check_comp(mod);
184 topo_mod_dprintf(mod, "%s: SMBIOS x86pi compliance: %s\n", f,
189 topo_mod_dprintf(mod,
192 return (topo_mod_enummap(mod, x86pi->t_parent,
199 if (x86pi_hbr_enum_init(mod) < 0) {
200 topo_mod_dprintf(mod, "%s: x86pi_hbr_enum_init() failed.\n", f);
208 rv = x86pi_enum_gentopo(mod, x86pi->t_parent);
210 x86pi_hbr_enum_fini(mod);
215 x86pi->mod = mod;
218 (void) topo_mod_enummap(mod, motherchassis_node, "chassis",
220 (void) topo_mod_enummap(mod, motherchassis_node, "fan",
222 (void) topo_mod_enummap(mod, motherchassis_node, "psu",
227 topo_mod_dprintf(mod, "%s: done.\n", f);
248 x86pi_enum_gentopo(topo_mod_t *mod, tnode_t *t_parent)
269 shp = topo_mod_smbios(mod);
271 topo_mod_dprintf(mod, "%s: failed to load SMBIOS\n", f);
276 topo_mod_dprintf(mod, "%s: NULL parent\n", f);
285 x86pi_smb_strcnt(mod, &stypes[SMB_TYPE_CHASSIS]);
290 topo_mod_dprintf(mod, "%s: found %d chassis\n", f,
301 x86pi_gen_chassis(mod, t_parent, ch_smbid,
305 chassis_node = x86pi_gen_chassis(mod,
308 chassis_node = x86pi_gen_chassis(mod,
313 topo_mod_dprintf(mod,
322 x86pi_smb_strcnt(mod, smbc);
329 rv = topo_node_range_create(mod, chassis_node, BAY, 0,
332 topo_mod_dprintf(mod,
334 f, BAY, topo_mod_errmsg(mod));
338 topo_mod_dprintf(mod,
345 topo_mod_dprintf(mod,
358 rv = x86pi_gen_bay(mod, chassis_node, &export,
361 topo_mod_dprintf(mod,
372 x86pi_smb_strcnt(mod, &stypes[SMB_TYPE_BASEBOARD]);
380 (void) x86pi_bb_contains(mod);
411 bb_smbid = x86pi_bb_topparent(mod, nbb, &pnode, &psmbid);
413 topo_mod_dprintf(mod,
434 basebd_node = x86pi_gen_bboard(mod, pnode, bb_smbid,
437 topo_mod_dprintf(mod,
448 ncmp = x86pi_bb_getchips(mod, nbb, bb_count);
452 topo_mod_dprintf(mod, "%s: loading chip enum\n", f);
454 if (topo_mod_load(mod, CHIP, TOPO_VERSION) == NULL) {
455 topo_mod_dprintf(mod,
457 CHIP, topo_strerror(topo_mod_errno(mod)));
460 topo_mod_dprintf(mod,
463 rv = topo_node_range_create(mod, basebd_node,
466 topo_mod_dprintf(mod,
469 topo_strerror(topo_mod_errno(mod)));
472 topo_mod_dprintf(mod, "%s: calling"
475 topo_mod_enumerate(mod, basebd_node,
480 topo_mod_dprintf(mod, "%s:%s"
488 rv = topo_node_range_create(mod, basebd_node, HOSTBRIDGE,
491 topo_mod_dprintf(mod,
493 f, HOSTBRIDGE, topo_mod_errmsg(mod));
499 x86pi_smb_strcnt(mod, smbc);
503 topo_mod_dprintf(mod,
511 rv = x86pi_gen_hbr(mod, basebd_node,
514 topo_mod_dprintf(mod,