aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/efi
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-11 16:03:38 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-11 16:03:38 +0200
commita495404575be41b26d86464b1ecc33c4a0d4b90f (patch)
tree5e5a204ec2ab57ee690eb90f4e07f7573df111f5 /xen/arch/x86/efi
parente46ea4d44dc0929d9e15dcde5c13b569278970d2 (diff)
downloadxen-a495404575be41b26d86464b1ecc33c4a0d4b90f.tar.gz
xen-a495404575be41b26d86464b1ecc33c4a0d4b90f.tar.bz2
xen-a495404575be41b26d86464b1ecc33c4a0d4b90f.zip
x86: construct static part of 1:1 mapping at build time
... rather than at boot time, removing unnecessary redundancy between EFI and legacy boot code. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/efi')
-rw-r--r--xen/arch/x86/efi/boot.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/xen/arch/x86/efi/boot.c b/xen/arch/x86/efi/boot.c
index f5a3fb4347..61821d0330 100644
--- a/xen/arch/x86/efi/boot.c
+++ b/xen/arch/x86/efi/boot.c
@@ -1119,8 +1119,6 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
unsigned int slot = (xen_phys_start >> L2_PAGETABLE_SHIFT) + i;
paddr_t addr = slot << L2_PAGETABLE_SHIFT;
- l2_identmap[i] = l2e_from_paddr(i << L2_PAGETABLE_SHIFT,
- PAGE_HYPERVISOR|_PAGE_PSE);
l2_identmap[slot] = l2e_from_paddr(addr, PAGE_HYPERVISOR|_PAGE_PSE);
l2_xenmap[i] = l2e_from_paddr(addr, PAGE_HYPERVISOR|_PAGE_PSE);
slot &= L2_PAGETABLE_ENTRIES - 1;
@@ -1150,16 +1148,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
l4e_from_paddr((UINTN)l3_identmap, __PAGE_HYPERVISOR);
idle_pg_table[l4_table_offset(XEN_VIRT_START)] =
l4e_from_paddr((UINTN)l3_xenmap, __PAGE_HYPERVISOR);
- /* Initialize 4kB mappings of first 2MB of memory. */
- for ( i = 0; i < L1_PAGETABLE_ENTRIES; ++i )
- {
- unsigned int attr = PAGE_HYPERVISOR|MAP_SMALL_PAGES;
-
- /* VGA hole (0xa0000-0xc0000) should be mapped UC. */
- if ( i >= 0xa0 && i < 0xc0 )
- attr |= _PAGE_PCD;
- l1_identmap[i] = l1e_from_pfn(i, attr);
- }
+ /* Hook 4kB mappings of first 2MB of memory into L2. */
l2_identmap[0] = l2e_from_paddr((UINTN)l1_identmap, __PAGE_HYPERVISOR);
if ( gop )