* Copy len bytes of data from the pointer cp into the vm_page_t array, * skipping the first off bytes, Return the number of bytes skipped and copied. * Does not verify the length of the array. */
| 219 | * Does not verify the length of the array. |
| 220 | */ |
| 221 | static int |
| 222 | cvm_page_copydata(vm_page_t *pages, int off, int len, caddr_t cp) |
| 223 | { |
| 224 | int processed = 0; |
| 225 | unsigned count; |
| 226 | |
| 227 | CVM_PAGE_SKIP(); |
| 228 | while (len > 0) { |
| 229 | count = min(PAGE_SIZE - off, len); |
| 230 | bcopy(((char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*pages)) + off), cp, |
| 231 | count); |
| 232 | len -= count; |
| 233 | cp += count; |
| 234 | processed += count; |
| 235 | off = 0; |
| 236 | pages++; |
| 237 | } |
| 238 | return processed; |
| 239 | } |
| 240 | #endif /* CRYPTO_MAY_HAVE_VMPAGE */ |
| 241 | |
| 242 | void |
no test coverage detected