aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/efi
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-11 15:45:20 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-11 15:45:20 +0200
commit0923fba2cf02e08275c6e454906a0420baa455b5 (patch)
tree0acb7d37d0920c77a9775f869aab0e6b60a4b681 /xen/arch/x86/efi
parent28957ed4fd2fecc99b67db60a9266aa2f59ab980 (diff)
downloadxen-0923fba2cf02e08275c6e454906a0420baa455b5.tar.gz
xen-0923fba2cf02e08275c6e454906a0420baa455b5.tar.bz2
xen-0923fba2cf02e08275c6e454906a0420baa455b5.zip
x86: allow early use of fixmaps
As a prerequisite for adding an EHCI debug port based console implementation, set up the page tables needed for (a sub-portion of) the fixmaps together with other boot time page table construction. 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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xen/arch/x86/efi/boot.c b/xen/arch/x86/efi/boot.c
index 184448c4d8..f5a3fb4347 100644
--- a/xen/arch/x86/efi/boot.c
+++ b/xen/arch/x86/efi/boot.c
@@ -17,6 +17,9 @@
#include <xen/vga.h>
#include <asm/e820.h>
#include <asm/edd.h>
+#define __ASSEMBLY__ /* avoid pulling in ACPI stuff (conflicts with EFI) */
+#include <asm/fixmap.h>
+#undef __ASSEMBLY__
#include <asm/mm.h>
#include <asm/msr.h>
#include <asm/processor.h>
@@ -1123,14 +1126,19 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
slot &= L2_PAGETABLE_ENTRIES - 1;
l2_bootmap[slot] = l2e_from_paddr(addr, __PAGE_HYPERVISOR|_PAGE_PSE);
}
+ /* Initialise L2 fixmap page directory entry. */
+ l2_fixmap[l2_table_offset(FIXADDR_TOP - 1)] =
+ l2e_from_paddr((UINTN)l1_fixmap, __PAGE_HYPERVISOR);
/* Initialise L3 identity-map page directory entries. */
for ( i = 0; i < ARRAY_SIZE(l2_identmap) / L2_PAGETABLE_ENTRIES; ++i )
l3_identmap[i] = l3e_from_paddr((UINTN)(l2_identmap +
i * L2_PAGETABLE_ENTRIES),
__PAGE_HYPERVISOR);
- /* Initialise L3 xen-map page directory entry. */
+ /* Initialise L3 xen-map and fixmap page directory entries. */
l3_xenmap[l3_table_offset(XEN_VIRT_START)] =
l3e_from_paddr((UINTN)l2_xenmap, __PAGE_HYPERVISOR);
+ l3_xenmap[l3_table_offset(FIXADDR_TOP - 1)] =
+ l3e_from_paddr((UINTN)l2_fixmap, __PAGE_HYPERVISOR);
/* Initialise L3 boot-map page directory entries. */
l3_bootmap[l3_table_offset(xen_phys_start)] =
l3e_from_paddr((UINTN)l2_bootmap, __PAGE_HYPERVISOR);