int mem_refcnt_attach(devfs_handle_t hub) { devfs_handle_t refcnt_dev; hwgraph_char_device_add(hub, "refcnt", "hubspc_", &refcnt_dev); device_info_set(refcnt_dev, (void*)(ulong)HUBSPC_REFCOUNTERS); return (0); }
int cpuprom_attach(devfs_handle_t node) { devfs_handle_t prom_dev; hwgraph_char_device_add(node, EDGE_LBL_PROM, "hubspc_", &prom_dev); #ifdef HUBSPC_DEBUG printf("hubspc: prom_attach hub: 0x%x prom: 0x%x\n", node, prom_dev); #endif /* HUBSPC_DEBUG */ device_inventory_add(prom_dev, INV_PROM, SN_PROMVERSION, (major_t)0, (minor_t)0, 0); /* Add additional inventory info about the cpu prom like * revision & version numbers etc. */ cpuprom_detailed_inventory_info_add(prom_dev,node); device_info_set(prom_dev, (void*)(ulong)HUBSPC_PROM); prominfo_add(node, prom_dev); return (0); }