cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/platform/efi/efi_32.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Extensible Firmware Interface
 *
 * Based on Extensible Firmware Interface Specification version 1.0
 *
 * Copyright (C) 1999 VA Linux Systems
 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
 * Copyright (C) 1999-2002 Hewlett-Packard Co.
 *      David Mosberger-Tang <davidm@hpl.hp.com>
 *      Stephane Eranian <eranian@hpl.hp.com>
 *
 * All EFI Runtime Services are not implemented yet as EFI only
 * supports physical mode addressing on SoftSDV. This is to be fixed
 * in a future version.  --drummond 1999-07-20
 *
 * Implemented EFI runtime services and virtual mode calls.  --davidm
 *
 * Goutham Rao: <goutham.rao@intel.com>
 *      Skip non-WB memory and ignore empty memory ranges.
 */

#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/ioport.h>
#include <linux/efi.h>

#include <asm/io.h>
#include <asm/desc.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/efi.h>

/*
 * To make EFI call EFI runtime service in physical addressing mode we need
 * prolog/epilog before/after the invocation to claim the EFI runtime service
 * handler exclusively and to duplicate a memory mapping in low memory space,
 * say 0 - 3G.
 */


int __init efi_alloc_page_tables(void) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Matt Fleming11100.00%1100.00%
Total11100.00%1100.00%


void efi_sync_low_kernel_mappings(void) {}

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov6100.00%1100.00%
Total6100.00%1100.00%


void __init efi_dump_pagetable(void) { #ifdef CONFIG_EFI_PGT_DUMP ptdump_walk_pgd_level(NULL, swapper_pg_dir); #endif }

Contributors

PersonTokensPropCommitsCommitProp
Sai Praneeth1470.00%133.33%
Borislav Petkov630.00%266.67%
Total20100.00%3100.00%


int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov1593.75%266.67%
Mathias Krause16.25%133.33%
Total16100.00%3100.00%


void __init efi_map_region(efi_memory_desc_t *md) { old_map_region(md); }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov15100.00%1100.00%
Total15100.00%1100.00%


void __init efi_map_region_fixed(efi_memory_desc_t *md) {}

Contributors

PersonTokensPropCommitsCommitProp
Dave Young9100.00%1100.00%
Total9100.00%1100.00%


void __init parse_efi_setup(u64 phys_addr, u32 data_len) {}

Contributors

PersonTokensPropCommitsCommitProp
Dave Young11100.00%1100.00%
Total11100.00%1100.00%


pgd_t * __init efi_call_phys_prolog(void) { struct desc_ptr gdt_descr; pgd_t *save_pgd; /* Current pgd is swapper_pg_dir, we'll restore it later: */ save_pgd = swapper_pg_dir; load_cr3(initial_page_table); __flush_tlb_all(); gdt_descr.address = get_cpu_gdt_paddr(0); gdt_descr.size = GDT_SIZE - 1; load_gdt(&gdt_descr); return save_pgd; }

Contributors

PersonTokensPropCommitsCommitProp
Rusty Russell1628.57%110.00%
Ingo Molnar1425.00%110.00%
Andrew Morton1323.21%110.00%
Zachary Amsden47.14%110.00%
Matt Fleming23.57%110.00%
Mathias Krause23.57%110.00%
Edgar (gimli) Hucek23.57%110.00%
Andrew Lutomirski11.79%110.00%
Glauber de Oliveira Costa11.79%110.00%
Huang Ying11.79%110.00%
Total56100.00%10100.00%


void __init efi_call_phys_epilog(pgd_t *save_pgd) { struct desc_ptr gdt_descr; gdt_descr.address = (unsigned long)get_cpu_gdt_rw(0); gdt_descr.size = GDT_SIZE - 1; load_gdt(&gdt_descr); load_cr3(save_pgd); __flush_tlb_all(); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton2040.82%218.18%
Rusty Russell1428.57%19.09%
Ingo Molnar48.16%19.09%
Zachary Amsden48.16%19.09%
Edgar (gimli) Hucek24.08%19.09%
Huang Ying12.04%19.09%
Glauber de Oliveira Costa12.04%19.09%
Matt Fleming12.04%19.09%
Mathias Krause12.04%19.09%
Thomas Garnier12.04%19.09%
Total49100.00%11100.00%


void __init efi_runtime_update_mappings(void) { if (__supported_pte_mask & _PAGE_NX) runtime_code_page_mkexec(); }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov1694.12%150.00%
Sai Praneeth15.88%150.00%
Total17100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton5823.87%28.00%
Borislav Petkov5823.87%416.00%
Rusty Russell3012.35%14.00%
Dave Young208.23%28.00%
Ingo Molnar197.82%28.00%
Sai Praneeth156.17%28.00%
Matt Fleming145.76%28.00%
Zachary Amsden83.29%14.00%
Edgar (gimli) Hucek41.65%14.00%
Mathias Krause41.65%14.00%
Harvey Harrison31.23%14.00%
Paul Gortmaker31.23%14.00%
Huang Ying20.82%14.00%
Glauber de Oliveira Costa20.82%14.00%
Thomas Garnier10.41%14.00%
Andrew Lutomirski10.41%14.00%
Greg Kroah-Hartman10.41%14.00%
Total243100.00%25100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.