Lines Matching defs:secbus
901 fix_ppb_res(uchar_t secbus, boolean_t prog_sub)
916 if (pci_bus_res[secbus].par_bus == (uchar_t)-1)
920 if (pci_bus_res[secbus].subtractive && !prog_sub)
924 dip = pci_bus_res[secbus].dip;
955 parbus = pci_bus_res[secbus].par_bus;
962 if (pci_bus_res[secbus].num_cbb != 0 &&
963 pci_bus_res[secbus].bus_avail == NULL) {
967 range = pci_bus_res[secbus].num_cbb * 2;
980 memlist_insert(&pci_bus_res[secbus].bus_avail,
983 pci_bus_res[secbus].sub_bus = subbus;
985 add_bus_range_prop(secbus);
989 secbus, subbus);
1004 io_size = (subbus - secbus + 1) * 0x200;
1005 if (io_size < pci_bus_res[secbus].io_size)
1006 io_size = pci_bus_res[secbus].io_size;
1019 mem_size = (subbus - secbus + 1) * PPB_MEM_ALIGNMENT;
1020 if (mem_size < pci_bus_res[secbus].mem_size) {
1021 mem_size = pci_bus_res[secbus].mem_size;
1028 if (pci_bus_res[secbus].subtractive && prog_sub) {
1052 if (pci_bus_res[secbus].io_avail == NULL) {
1053 addr = get_parbus_io_res(parbus, secbus, io_size,
1056 add_ranges_prop(secbus, 1);
1057 pci_bus_res[secbus].io_reprogram =
1069 if (pci_bus_res[secbus].mem_avail == NULL) {
1070 addr = get_parbus_mem_res(parbus, secbus, mem_size,
1073 add_ranges_prop(secbus, 1);
1074 pci_bus_res[secbus].mem_reprogram =
1098 scratch_list = memlist_dup(pci_bus_res[secbus].io_avail);
1099 memlist_merge(&pci_bus_res[secbus].io_used, &scratch_list);
1105 if (pci_bus_res[secbus].io_used) {
1106 memlist_subsume(&pci_bus_res[secbus].io_used,
1107 &pci_bus_res[secbus].io_avail);
1109 if (pci_bus_res[secbus].io_avail &&
1113 list = pci_bus_res[secbus].io_avail;
1137 memlist_free_all(&pci_bus_res[secbus].io_avail);
1138 memlist_insert(&pci_bus_res[secbus].io_avail,
1144 pci_bus_res[secbus].io_reprogram = B_TRUE;
1147 addr = get_parbus_io_res(parbus, secbus, io_size,
1152 pci_bus_res[secbus].io_reprogram = B_TRUE;
1155 if (pci_bus_res[secbus].io_reprogram) {
1163 add_ranges_prop(secbus, 1);
1180 scratch_list = memlist_dup(pci_bus_res[secbus].mem_avail);
1181 memlist_merge(&pci_bus_res[secbus].mem_used, &scratch_list);
1187 if (pci_bus_res[secbus].mem_used) {
1188 memlist_subsume(&pci_bus_res[secbus].mem_used,
1189 &pci_bus_res[secbus].mem_avail);
1191 if (pci_bus_res[secbus].mem_avail &&
1195 list = pci_bus_res[secbus].mem_avail;
1218 memlist_free_all(&pci_bus_res[secbus].mem_avail);
1219 memlist_insert(&pci_bus_res[secbus].mem_avail,
1225 pci_bus_res[secbus].mem_reprogram = B_TRUE;
1228 addr = get_parbus_mem_res(parbus, secbus, mem_size,
1233 pci_bus_res[secbus].mem_reprogram = B_TRUE;
1237 if (pci_bus_res[secbus].mem_reprogram) {
1266 add_ranges_prop(secbus, 1);
1276 if (pci_bus_res[secbus].io_avail)
1278 if (pci_bus_res[secbus].mem_avail)
1949 uchar_t secbus = 0;
1954 secbus = pci_getb(bus, dev, func, PCI_BCNF_SECBUS);
1957 pci_cfgacc_add_workaround(bdf, secbus, subbus);
2784 uchar_t secbus = pci_getb(bus, dev, func, PCI_BCNF_SECBUS);
2788 ASSERT(secbus <= subbus);
2795 pci_bus_res[secbus].subtractive = B_TRUE;
2806 ASSERT(pci_bus_res[secbus].dip == NULL);
2807 pci_bus_res[secbus].dip = dip;
2808 pci_bus_res[secbus].par_bus = bus;
2813 pci_bus_res[secbus].sub_bus = subbus;
2829 for (i = secbus + 1; i <= subbus; i++)
2881 memlist_insert(&pci_bus_res[secbus].io_avail,
2893 secbus, io_range[0], io_range[1]);
2908 memlist_insert(&pci_bus_res[secbus].mem_avail,
2922 secbus, mem_range[0], mem_range[1]);
2931 memlist_insert(&pci_bus_res[secbus].pmem_avail,
2945 secbus, pmem_range[0], pmem_range[1]);
2966 memlist_insert(&pci_bus_res[secbus].io_avail, 0x3b0, 0xc);
2974 memlist_insert(&pci_bus_res[secbus].io_avail, 0x3c0, 0x20);
2982 memlist_insert(&pci_bus_res[secbus].mem_avail, 0xa0000,
2991 add_bus_range_prop(secbus);
2992 add_ranges_prop(secbus, 1);