* Add an exclusion region. */
| 363 | * Add an exclusion region. |
| 364 | */ |
| 365 | void |
| 366 | physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags) |
| 367 | { |
| 368 | vm_offset_t adj; |
| 369 | |
| 370 | /* |
| 371 | * Truncate the starting address down to a page boundary, and round the |
| 372 | * ending page up to a page boundary. |
| 373 | */ |
| 374 | adj = pa - trunc_page(pa); |
| 375 | pa = trunc_page(pa); |
| 376 | sz = round_page(sz + adj); |
| 377 | |
| 378 | if (excnt >= nitems(exregions)) |
| 379 | panic("failed to exclude region %#jx-%#jx", (uintmax_t)pa, |
| 380 | (uintmax_t)(pa + sz)); |
| 381 | excnt = insert_region(exregions, excnt, pa, sz, exflags); |
| 382 | } |
| 383 | |
| 384 | size_t |
| 385 | physmem_avail(vm_paddr_t *avail, size_t maxavail) |
no test coverage detected