KVM: nVMX: Fix returned value of MSR_IA32_VMX_VMCS_ENUM
[linux/fpc-iii.git] / arch / x86 / platform / efi / efi_32.c
blob9ee3491e31fbab7f6643462395d31c6f9f36f1b4
1 /*
2 * Extensible Firmware Interface
4 * Based on Extensible Firmware Interface Specification version 1.0
6 * Copyright (C) 1999 VA Linux Systems
7 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
8 * Copyright (C) 1999-2002 Hewlett-Packard Co.
9 * David Mosberger-Tang <davidm@hpl.hp.com>
10 * Stephane Eranian <eranian@hpl.hp.com>
12 * All EFI Runtime Services are not implemented yet as EFI only
13 * supports physical mode addressing on SoftSDV. This is to be fixed
14 * in a future version. --drummond 1999-07-20
16 * Implemented EFI runtime services and virtual mode calls. --davidm
18 * Goutham Rao: <goutham.rao@intel.com>
19 * Skip non-WB memory and ignore empty memory ranges.
22 #include <linux/kernel.h>
23 #include <linux/types.h>
24 #include <linux/ioport.h>
25 #include <linux/efi.h>
27 #include <asm/io.h>
28 #include <asm/desc.h>
29 #include <asm/page.h>
30 #include <asm/pgtable.h>
31 #include <asm/tlbflush.h>
32 #include <asm/efi.h>
35 * To make EFI call EFI runtime service in physical addressing mode we need
36 * prelog/epilog before/after the invocation to disable interrupt, to
37 * claim EFI runtime service handler exclusively and to duplicate a memory in
38 * low memory space say 0 - 3G.
40 static unsigned long efi_rt_eflags;
42 void efi_sync_low_kernel_mappings(void) {}
43 void __init efi_dump_pagetable(void) {}
44 int efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
46 return 0;
48 void efi_cleanup_page_tables(unsigned long pa_memmap, unsigned num_pages) {}
50 void __init efi_map_region(efi_memory_desc_t *md)
52 old_map_region(md);
55 void __init efi_map_region_fixed(efi_memory_desc_t *md) {}
56 void __init parse_efi_setup(u64 phys_addr, u32 data_len) {}
58 void efi_call_phys_prelog(void)
60 struct desc_ptr gdt_descr;
62 local_irq_save(efi_rt_eflags);
64 load_cr3(initial_page_table);
65 __flush_tlb_all();
67 gdt_descr.address = __pa(get_cpu_gdt_table(0));
68 gdt_descr.size = GDT_SIZE - 1;
69 load_gdt(&gdt_descr);
72 void efi_call_phys_epilog(void)
74 struct desc_ptr gdt_descr;
76 gdt_descr.address = (unsigned long)get_cpu_gdt_table(0);
77 gdt_descr.size = GDT_SIZE - 1;
78 load_gdt(&gdt_descr);
80 load_cr3(swapper_pg_dir);
81 __flush_tlb_all();
83 local_irq_restore(efi_rt_eflags);
86 void __init efi_runtime_mkexec(void)
88 if (__supported_pte_mask & _PAGE_NX)
89 runtime_code_page_mkexec();