#ifdef CONFIG_PAE
// loop over pdpt entries
- for (int pdir_index = 0; pdir_index < X86_64_PDPTE_SIZE; pdir_index++) {
+ for (int pdir_index = 0; pdir_index < X86_32_PDPTE_SIZE; pdir_index++) {
// get pdir
- union x86_32_pdpte_entry *pdir = (union x86_64_pdir_entry *)root_pt + pdir_index;
+ union x86_32_pdpte_entry *pdir = (union x86_32_pdpte_entry *)root_pt + pdir_index;
if (!pdir->raw) { continue; }
genpaddr_t pdir_gp = pdir->d.base_addr << BASE_PAGE_BITS;
lvaddr_t pdir_lv = local_phys_to_mem(gen_phys_to_local_phys(pdir_gp));
/*
* Copyright (c) 2007-2013 ETH Zurich.
+ * Copyright (c) 2014, HP Labs.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
+ X86_32_PDIR_BASE(vaddr) * X86_32_PTABLE_SIZE
+ X86_32_PTABLE_BASE(vaddr)];
- debug(SUBSYS_PAGING, "Mapping 4K page: vaddr = 0x%x, base = 0x%x, "
- "PDPTE_BASE = %u, PDIR_BASE = %u, "
- "PTABLE_BASE = %u -- ", vaddr, base, X86_32_PDPTE_BASE(vaddr),
+ debug(SUBSYS_PAGING, "Mapping 4K page: vaddr = 0x%"PRIxLVADDR
+ ", base = 0x%"PRIxLPADDR", PDPTE_BASE = %lu, PDIR_BASE = %lu, "
+ "PTABLE_BASE = %lu -- ", vaddr, base, X86_32_PDPTE_BASE(vaddr),
X86_32_PDIR_BASE(vaddr), X86_32_PTABLE_BASE(vaddr));
#else
union x86_32_ptable_entry *ptable_base = &init_ptable[