192 di_devfs_path_free(dnpath);
193 (void) topo_mod_seterrno(mp, err);
194 }
195 di_devfs_path_free(dnpath);
196 }
197 /* Oberon device type is always "pciex" */
198 if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEVTYPE,
199 TOPO_PROP_IMMUTABLE, OPL_PX_DEVTYPE, &err) != 0) {
200 topo_mod_dprintf(mp, "Failed to set DEVTYPE property\n");
201 }
202 /* Oberon driver is always "px" */
203 if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DRIVER,
204 TOPO_PROP_IMMUTABLE, OPL_PX_DRV, &err) != 0) {
205 topo_mod_dprintf(mp, "Failed to set DRIVER property\n");
206 }
207 if ((mod = topo_mod_modfmri(mp, FM_MOD_SCHEME_VERSION, OPL_PX_DRV))
208 == NULL || topo_prop_set_fmri(rcn, TOPO_PGROUP_IO,
209 TOPO_IO_MODULE, TOPO_PROP_IMMUTABLE, mod, &err) != 0) {
210 topo_mod_dprintf(mp, "Failed to set MODULE property\n");
211 }
212 if (mod != NULL)
213 nvlist_free(mod);
214
215 /* This is a PCIEX Root Complex */
216 if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI, TOPO_PCI_EXCAP,
217 TOPO_PROP_IMMUTABLE, PCIEX_ROOT, &err) != 0) {
218 topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
219 }
220 /* BDF of Oberon root complex is constant */
221 if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI,
222 TOPO_PCI_BDF, TOPO_PROP_IMMUTABLE, OPL_PX_BDF, &err) != 0) {
223 topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
224 }
225
226 /* Make room for children */
227 (void) topo_node_range_create(mp, rcn, PCIEX_BUS, 0, OPL_BUS_MAX);
228 return (rcn);
229 }
230
231 /*
232 * Create a hostbridge node.
|
192 di_devfs_path_free(dnpath);
193 (void) topo_mod_seterrno(mp, err);
194 }
195 di_devfs_path_free(dnpath);
196 }
197 /* Oberon device type is always "pciex" */
198 if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEVTYPE,
199 TOPO_PROP_IMMUTABLE, OPL_PX_DEVTYPE, &err) != 0) {
200 topo_mod_dprintf(mp, "Failed to set DEVTYPE property\n");
201 }
202 /* Oberon driver is always "px" */
203 if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DRIVER,
204 TOPO_PROP_IMMUTABLE, OPL_PX_DRV, &err) != 0) {
205 topo_mod_dprintf(mp, "Failed to set DRIVER property\n");
206 }
207 if ((mod = topo_mod_modfmri(mp, FM_MOD_SCHEME_VERSION, OPL_PX_DRV))
208 == NULL || topo_prop_set_fmri(rcn, TOPO_PGROUP_IO,
209 TOPO_IO_MODULE, TOPO_PROP_IMMUTABLE, mod, &err) != 0) {
210 topo_mod_dprintf(mp, "Failed to set MODULE property\n");
211 }
212 nvlist_free(mod);
213
214 /* This is a PCIEX Root Complex */
215 if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI, TOPO_PCI_EXCAP,
216 TOPO_PROP_IMMUTABLE, PCIEX_ROOT, &err) != 0) {
217 topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
218 }
219 /* BDF of Oberon root complex is constant */
220 if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI,
221 TOPO_PCI_BDF, TOPO_PROP_IMMUTABLE, OPL_PX_BDF, &err) != 0) {
222 topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
223 }
224
225 /* Make room for children */
226 (void) topo_node_range_create(mp, rcn, PCIEX_BUS, 0, OPL_BUS_MAX);
227 return (rcn);
228 }
229
230 /*
231 * Create a hostbridge node.
|