Merge branch 'core-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 EFI update from Peter Anvin:
"EFI tree, from Matt Fleming. Most of the patches are the new efivarfs
filesystem by Matt Garrett & co. The balance are support for EFI
wallclock in the absence of a hardware-specific driver, and various
fixes and cleanups."
* 'core-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
efivarfs: Make efivarfs_fill_super() static
x86, efi: Check table header length in efi_bgrt_init()
efivarfs: Use query_variable_info() to limit kmalloc()
efivarfs: Fix return value of efivarfs_file_write()
efivarfs: Return a consistent error when efivarfs_get_inode() fails
efivarfs: Make 'datasize' unsigned long
efivarfs: Add unique magic number
efivarfs: Replace magic number with sizeof(attributes)
efivarfs: Return an error if we fail to read a variable
efi: Clarify GUID length calculations
efivarfs: Implement exclusive access for {get,set}_variable
efivarfs: efivarfs_fill_super() ensure we clean up correctly on error
efivarfs: efivarfs_fill_super() ensure we free our temporary name
efivarfs: efivarfs_fill_super() fix inode reference counts
efivarfs: efivarfs_create() ensure we drop our reference on inode on error
efivarfs: efivarfs_file_read ensure we free data in error paths
x86-64/efi: Use EFI to deal with platform wall clock (again)
x86/kernel: remove tboot 1:1 page table creation code
x86, efi: 1:1 pagetable mapping for virtual EFI calls
x86, mm: Include the entire kernel memory map in trampoline_pgd
...
This commit is contained in:
@@ -58,6 +58,21 @@ static void __init early_code_mapping_set_exec(int executable)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long efi_call_virt_prelog(void)
|
||||
{
|
||||
unsigned long saved;
|
||||
|
||||
saved = read_cr3();
|
||||
write_cr3(real_mode_header->trampoline_pgd);
|
||||
|
||||
return saved;
|
||||
}
|
||||
|
||||
void efi_call_virt_epilog(unsigned long saved)
|
||||
{
|
||||
write_cr3(saved);
|
||||
}
|
||||
|
||||
void __init efi_call_phys_prelog(void)
|
||||
{
|
||||
unsigned long vaddress;
|
||||
|
||||
Reference in New Issue
Block a user