Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 790a2ee2 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into core/efi



Pull v4.4 EFI updates from Matt Fleming:

  - Make the EFI System Resource Table (ESRT) driver explicitly
    non-modular by ripping out the module_* code since Kconfig doesn't
    allow it to be built as a module anyway. (Paul Gortmaker)

  - Make the x86 efi=debug kernel parameter, which enables EFI debug
    code and output, generic and usable by arm64. (Leif Lindholm)

  - Add support to the x86 EFI boot stub for 64-bit Graphics Output
    Protocol frame buffer addresses. (Matt Fleming)

  - Detect when the UEFI v2.5 EFI_PROPERTIES_TABLE feature is enabled
    in the firmware and set an efi.flags bit so the kernel knows when
    it can apply more strict runtime mapping attributes - Ard Biesheuvel

  - Auto-load the efi-pstore module on EFI systems, just like we
    currently do for the efivars module. (Ben Hutchings)

  - Add "efi_fake_mem" kernel parameter which allows the system's EFI
    memory map to be updated with additional attributes for specific
    memory ranges. This is useful for testing the kernel code that handles
    the EFI_MEMORY_MORE_RELIABLE memmap bit even if your firmware
    doesn't include support. (Taku Izumi)

Note: there is a semantic conflict between the following two commits:

  8a53554e ("x86/efi: Fix multiple GOP device support")
  ae2ee627 ("efifb: Add support for 64-bit frame buffer addresses")

I fixed up the interaction in the merge commit, changing the type of
current_fb_base from u32 to u64.

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents c7d77a79 0f96a99d
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -60,5 +60,3 @@ linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format.
--------------------------------------------------------------------------------
linux,uefi-stub-kern-ver  | string | Copy of linux_banner from build.
--------------------------------------------------------------------------------

For verbose debug messages, specify 'uefi_debug' on the kernel command line.
+15 −0
Original line number Diff line number Diff line
@@ -1094,6 +1094,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			you are really sure that your UEFI does sane gc and
			fulfills the spec otherwise your board may brick.

	efi_fake_mem=	nn[KMG]@ss[KMG]:aa[,nn[KMG]@ss[KMG]:aa,..] [EFI; X86]
			Add arbitrary attribute to specific memory range by
			updating original EFI memory map.
			Region of memory which aa attribute is added to is
			from ss to ss+nn.
			If efi_fake_mem=2G@4G:0x10000,2G@0x10a0000000:0x10000
			is specified, EFI_MEMORY_MORE_RELIABLE(0x10000)
			attribute is added to range 0x100000000-0x180000000 and
			0x10a0000000-0x1120000000.

			Using this parameter you can do debugging of EFI memmap
			related feature. For example, you can do debugging of
			Address Range Mirroring feature even if your box
			doesn't support it.

	eisa_irq_edge=	[PARISC,HW]
			See header of drivers/parisc/eisa.c.

+5 −14
Original line number Diff line number Diff line
@@ -51,15 +51,6 @@ static struct mm_struct efi_mm = {
	INIT_MM_CONTEXT(efi_mm)
};

static int uefi_debug __initdata;
static int __init uefi_debug_setup(char *str)
{
	uefi_debug = 1;

	return 0;
}
early_param("uefi_debug", uefi_debug_setup);

static int __init is_normal_ram(efi_memory_desc_t *md)
{
	if (md->attribute & EFI_MEMORY_WB)
@@ -171,14 +162,14 @@ static __init void reserve_regions(void)
	efi_memory_desc_t *md;
	u64 paddr, npages, size;

	if (uefi_debug)
	if (efi_enabled(EFI_DBG))
		pr_info("Processing EFI memory map:\n");

	for_each_efi_memory_desc(&memmap, md) {
		paddr = md->phys_addr;
		npages = md->num_pages;

		if (uefi_debug) {
		if (efi_enabled(EFI_DBG)) {
			char buf[64];

			pr_info("  0x%012llx-0x%012llx %s",
@@ -194,11 +185,11 @@ static __init void reserve_regions(void)

		if (is_reserve_region(md)) {
			memblock_reserve(paddr, size);
			if (uefi_debug)
			if (efi_enabled(EFI_DBG))
				pr_cont("*");
		}

		if (uefi_debug)
		if (efi_enabled(EFI_DBG))
			pr_cont("\n");
	}

@@ -210,7 +201,7 @@ void __init efi_init(void)
	struct efi_fdt_params params;

	/* Grab UEFI information placed in FDT by stub */
	if (!efi_get_fdt_params(&params, uefi_debug))
	if (!efi_get_fdt_params(&params))
		return;

	efi_system_table = params.system_table;
+22 −6
Original line number Diff line number Diff line
@@ -624,7 +624,7 @@ setup_pixel_info(struct screen_info *si, u32 pixels_per_scan_line,
static efi_status_t
__gop_query32(struct efi_graphics_output_protocol_32 *gop32,
	      struct efi_graphics_output_mode_info **info,
	      unsigned long *size, u32 *fb_base)
	      unsigned long *size, u64 *fb_base)
{
	struct efi_graphics_output_protocol_mode_32 *mode;
	efi_status_t status;
@@ -650,7 +650,8 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
	unsigned long nr_gops;
	u16 width, height;
	u32 pixels_per_scan_line;
	u32 fb_base;
	u32 ext_lfb_base;
	u64 fb_base;
	struct efi_pixel_bitmask pixel_info;
	int pixel_format;
	efi_status_t status;
@@ -667,7 +668,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
		bool conout_found = false;
		void *dummy = NULL;
		u32 h = handles[i];
		u32 current_fb_base;
		u64 current_fb_base;

		status = efi_call_early(handle_protocol, h,
					proto, (void **)&gop32);
@@ -715,6 +716,13 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
	si->lfb_width = width;
	si->lfb_height = height;
	si->lfb_base = fb_base;

	ext_lfb_base = (u64)(unsigned long)fb_base >> 32;
	if (ext_lfb_base) {
		si->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
		si->ext_lfb_base = ext_lfb_base;
	}

	si->pages = 1;

	setup_pixel_info(si, pixels_per_scan_line, pixel_info, pixel_format);
@@ -729,7 +737,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
static efi_status_t
__gop_query64(struct efi_graphics_output_protocol_64 *gop64,
	      struct efi_graphics_output_mode_info **info,
	      unsigned long *size, u32 *fb_base)
	      unsigned long *size, u64 *fb_base)
{
	struct efi_graphics_output_protocol_mode_64 *mode;
	efi_status_t status;
@@ -755,7 +763,8 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto,
	unsigned long nr_gops;
	u16 width, height;
	u32 pixels_per_scan_line;
	u32 fb_base;
	u32 ext_lfb_base;
	u64 fb_base;
	struct efi_pixel_bitmask pixel_info;
	int pixel_format;
	efi_status_t status;
@@ -772,7 +781,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto,
		bool conout_found = false;
		void *dummy = NULL;
		u64 h = handles[i];
		u32 current_fb_base;
		u64 current_fb_base;

		status = efi_call_early(handle_protocol, h,
					proto, (void **)&gop64);
@@ -820,6 +829,13 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto,
	si->lfb_width = width;
	si->lfb_height = height;
	si->lfb_base = fb_base;

	ext_lfb_base = (u64)(unsigned long)fb_base >> 32;
	if (ext_lfb_base) {
		si->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
		si->ext_lfb_base = ext_lfb_base;
	}

	si->pages = 1;

	setup_pixel_info(si, pixels_per_scan_line, pixel_info, pixel_format);
+1 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ extern void __init efi_set_executable(efi_memory_desc_t *md, bool executable);
extern int __init efi_memblock_x86_reserve_range(void);
extern pgd_t * __init efi_call_phys_prolog(void);
extern void __init efi_call_phys_epilog(pgd_t *save_pgd);
extern void __init efi_print_memmap(void);
extern void __init efi_unmap_memmap(void);
extern void __init efi_memory_uc(u64 addr, unsigned long size);
extern void __init efi_map_region(efi_memory_desc_t *md);
Loading