MCPcopy Create free account
hub / github.com/F-Stack/f-stack / decode_win_overlap

Function decode_win_overlap

freebsd/arm/mv/mv_common.c:1139–1163  ·  view source on GitHub ↗

XXX This should check for overlapping remap fields too.. */

Source from the content-addressed store, hash-verified

1137
1138/* XXX This should check for overlapping remap fields too.. */
1139int
1140decode_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
1165int
1166decode_win_cpu_set(int target, int attr, vm_paddr_t base, uint32_t size,

Callers 2

decode_win_idma_validFunction · 0.85
decode_win_xor_validFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected