/* Add the pci card inventory information to the hwgraph */ static void pciio_device_inventory_add(devfs_handle_t pconn_vhdl) { pciio_info_t pciio_info = pciio_info_get(pconn_vhdl); ASSERT(pciio_info); ASSERT(pciio_info->c_vertex == pconn_vhdl); /* Donot add inventory for non-existent devices */ if ((pciio_info->c_vendor == PCIIO_VENDOR_ID_NONE) || (pciio_info->c_device == PCIIO_DEVICE_ID_NONE)) return; device_inventory_add(pconn_vhdl,INV_IOBD,INV_PCIADAP, pciio_info->c_vendor,pciio_info->c_device, pciio_info->c_slot); }
/* Add inventory information to the widget vertex * Right now (module,slot,revision) is being * added as inventory information. */ static void xwidget_inventory_add(vertex_hdl_t widgetv, lboard_t *board, struct xwidget_hwid_s hwid) { if (!board) return; /* Donot add inventory information for the baseio * on a speedo with an xbox. It has already been * taken care of in SN00_vmc. * Speedo with xbox's baseio comes in at slot io1 (widget 9) */ device_inventory_add(widgetv,INV_IOBD,board->brd_type, geo_module(board->brd_geoid), SLOTNUM_GETSLOT(board->brd_slot), hwid.rev_num); }
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); }