XXX This should check for overlapping remap fields too.. */
| 1137 | |
| 1138 | /* XXX This should check for overlapping remap fields too.. */ |
| 1139 | int |
| 1140 | decode_win_overlap(int win, int win_no, const struct decode_win *wintab) |
| 1141 | { |
| 1142 | const struct decode_win *tab; |
| 1143 | int i; |
| 1144 | |
| 1145 | tab = wintab; |
| 1146 | |
| 1147 | for (i = 0; i < win_no; i++, tab++) { |
| 1148 | if (i == win) |
| 1149 | /* Skip self */ |
| 1150 | continue; |
| 1151 | |
| 1152 | if ((tab->base + tab->size - 1) < (wintab + win)->base) |
| 1153 | continue; |
| 1154 | |
| 1155 | else if (((wintab + win)->base + (wintab + win)->size - 1) < |
| 1156 | tab->base) |
| 1157 | continue; |
| 1158 | else |
| 1159 | return (i); |
| 1160 | } |
| 1161 | |
| 1162 | return (-1); |
| 1163 | } |
| 1164 | |
| 1165 | int |
| 1166 | decode_win_cpu_set(int target, int attr, vm_paddr_t base, uint32_t size, |
no outgoing calls
no test coverage detected