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

Function pglvl_max_pages

freebsd/x86/iommu/intel_utils.c:177–188  ·  view source on GitHub ↗

* Calculate the total amount of page table pages needed to map the * whole bus address space on the context with the selected agaw. */

Source from the content-addressed store, hash-verified

175 * whole bus address space on the context with the selected agaw.
176 */
177vm_pindex_t
178pglvl_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

Callers 2

domain_get_idmap_pgtblFunction · 0.85
domain_alloc_pgtblFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected