Return a pointer to the PD slot that corresponds to a VA */
| 1411 | |
| 1412 | /* Return a pointer to the PD slot that corresponds to a VA */ |
| 1413 | static __inline pd_entry_t * |
| 1414 | pmap_pde(pmap_t pmap, vm_offset_t va) |
| 1415 | { |
| 1416 | pdp_entry_t *pdpe; |
| 1417 | pt_entry_t PG_V; |
| 1418 | |
| 1419 | PG_V = pmap_valid_bit(pmap); |
| 1420 | pdpe = pmap_pdpe(pmap, va); |
| 1421 | if (pdpe == NULL || (*pdpe & PG_V) == 0) |
| 1422 | return (NULL); |
| 1423 | KASSERT((*pdpe & PG_PS) == 0, |
| 1424 | ("pmap_pde for 1G page, pmap %p va %#lx", pmap, va)); |
| 1425 | return (pmap_pdpe_to_pde(pdpe, va)); |
| 1426 | } |
| 1427 | |
| 1428 | /* Return a pointer to the PT slot that corresponds to a VA */ |
| 1429 | static __inline pt_entry_t * |
no test coverage detected