* Calculate the total amount of page table pages needed to map the * whole bus address space on the context with the selected agaw. */
| 175 | * whole bus address space on the context with the selected agaw. |
| 176 | */ |
| 177 | vm_pindex_t |
| 178 | pglvl_max_pages(int pglvl) |
| 179 | { |
| 180 | vm_pindex_t res; |
| 181 | int i; |
| 182 | |
| 183 | for (res = 0, i = pglvl; i > 0; i--) { |
| 184 | res *= DMAR_NPTEPG; |
| 185 | res++; |
| 186 | } |
| 187 | return (res); |
| 188 | } |
| 189 | |
| 190 | /* |
| 191 | * Return true if the page table level lvl supports the superpage for |
no outgoing calls
no test coverage detected