shr $(L2_PAGETABLE_SHIFT-3),%ebx
mov $8,%ecx
1: mov %eax,sym_fs(l2_bootmap)-8(%ebx,%ecx,8)
- mov %eax,sym_fs(l2_identmap)-8(%ebx,%ecx,8)
+ mov %eax,sym_fs(l2_directmap)-8(%ebx,%ecx,8)
sub $(1<<L2_PAGETABLE_SHIFT),%eax
loop 1b
* of physical memory. In any case the VGA hole should be mapped with type UC.
* Uses 1x 4k page.
*/
-l1_identmap:
+l1_directmap:
pfn = 0
.rept L1_PAGETABLE_ENTRIES
/* VGA hole (0xa0000-0xc0000) should be mapped UC-. */
.endif
pfn = pfn + 1
.endr
- .size l1_identmap, . - l1_identmap
+ .size l1_directmap, . - l1_directmap
/*
* __page_tables_{start,end} cover the range of pagetables which need
/*
* Space for 4G worth of 2M mappings, first 2M actually mapped via
- * l1_identmap[]. Uses 4x 4k pages.
+ * l1_directmap[]. Uses 4x 4k pages.
*/
-GLOBAL(l2_identmap)
- .quad sym_offs(l1_identmap) + __PAGE_HYPERVISOR
+GLOBAL(l2_directmap)
+ .quad sym_offs(l1_directmap) + __PAGE_HYPERVISOR
.fill 4 * L2_PAGETABLE_ENTRIES - 1, 8, 0
- .size l2_identmap, . - l2_identmap
+ .size l2_directmap, . - l2_directmap
/*
* L2 mapping the 1GB Xen text/data/bss region. At boot it maps 16MB from
.endr
.size l2_fixmap, . - l2_fixmap
-/* Identity map, covering the 4 l2_identmap tables. Uses 1x 4k page. */
-l3_identmap:
+/* Direct map, initially covering the 4 l2_directmap tables. Uses 1x 4k page. */
+l3_directmap:
idx = 0
.rept 4
- .quad sym_offs(l2_identmap) + (idx << PAGE_SHIFT) + __PAGE_HYPERVISOR
+ .quad sym_offs(l2_directmap) + (idx << PAGE_SHIFT) + __PAGE_HYPERVISOR
idx = idx + 1
.endr
.fill L3_PAGETABLE_ENTRIES - 4, 8, 0
- .size l3_identmap, . - l3_identmap
+ .size l3_directmap, . - l3_directmap
/* L3 mapping the fixmap. Uses 1x 4k page. */
l3_xenmap:
idx = 1
.rept L4_PAGETABLE_ENTRIES - 1
.if idx == l4_table_offset(DIRECTMAP_VIRT_START)
- .quad sym_offs(l3_identmap) + __PAGE_HYPERVISOR
+ .quad sym_offs(l3_directmap) + __PAGE_HYPERVISOR
.elseif idx == l4_table_offset(XEN_VIRT_START)
.quad sym_offs(l3_xenmap) + __PAGE_HYPERVISOR
.else
/*
* Relevant l{2,3}_bootmap entries get initialized explicitly in
* efi_arch_memory_setup(), so we must not apply relocations there.
- * l2_identmap's first slot, otoh, should be handled normally, as
+ * l2_directmap's first slot, otoh, should be handled normally, as
* efi_arch_memory_setup() won't touch it (xen_phys_start should
* never be zero).
*/
return;
/* Check that there is at least 4G of mapping space in l2_*map[] */
- BUILD_BUG_ON((sizeof(l2_bootmap) / L2_PAGETABLE_ENTRIES) < 4);
- BUILD_BUG_ON((sizeof(l2_identmap) / L2_PAGETABLE_ENTRIES) < 4);
+ BUILD_BUG_ON((sizeof(l2_bootmap) / L2_PAGETABLE_ENTRIES) < 4);
+ BUILD_BUG_ON((sizeof(l2_directmap) / L2_PAGETABLE_ENTRIES) < 4);
/* Initialize L3 boot-map page directory entries. */
for ( i = 0; i < 4; ++i )
unsigned int slot = (xen_phys_start >> L2_PAGETABLE_SHIFT) + i;
paddr_t addr = slot << L2_PAGETABLE_SHIFT;
- l2_identmap[slot] = l2e_from_paddr(addr, PAGE_HYPERVISOR|_PAGE_PSE);
+ l2_directmap[slot] = l2e_from_paddr(addr, PAGE_HYPERVISOR|_PAGE_PSE);
l2_bootmap[slot] = l2e_from_paddr(addr, __PAGE_HYPERVISOR|_PAGE_PSE);
}
}
for ( i = boot_e820.nr_map-1; i >= 0; i-- )
{
uint64_t s, e, mask = (1UL << L2_PAGETABLE_SHIFT) - 1;
- uint64_t end, limit = ARRAY_SIZE(l2_identmap) << L2_PAGETABLE_SHIFT;
+ uint64_t end, limit = ARRAY_SIZE(l2_directmap) << L2_PAGETABLE_SHIFT;
if ( boot_e820.map[i].type != E820_RAM )
continue;
/* The only data mappings to be relocated are in the Xen area. */
pl2e = __va(__pa(l2_xenmap));
/*
- * Undo the temporary-hooking of the l1_identmap. __2M_text_start
+ * Undo the temporary-hooking of the l1_directmap. __2M_text_start
* is contained in this PTE.
*/
BUG_ON(using_2M_mapping() &&
/* Need to create mappings above PREBUILT_MAP_LIMIT. */
map_s = max_t(uint64_t, s, PREBUILT_MAP_LIMIT);
map_e = min_t(uint64_t, e,
- ARRAY_SIZE(l2_identmap) << L2_PAGETABLE_SHIFT);
+ ARRAY_SIZE(l2_directmap) << L2_PAGETABLE_SHIFT);
/* Pass mapped memory to allocator /before/ creating new mappings. */
init_boot_pages(s, min(map_s, e));
extern l2_pgentry_t l2_xenmap[L2_PAGETABLE_ENTRIES],
l2_bootmap[4*L2_PAGETABLE_ENTRIES];
extern l3_pgentry_t l3_bootmap[L3_PAGETABLE_ENTRIES];
-extern l2_pgentry_t l2_identmap[4*L2_PAGETABLE_ENTRIES];
+extern l2_pgentry_t l2_directmap[4*L2_PAGETABLE_ENTRIES];
extern l1_pgentry_t l1_fixmap[L1_PAGETABLE_ENTRIES];
void paging_init(void);
void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t);