Commit 58ff3b76 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'efi-core-2020-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI updates from Ingo Molnar:
 "The EFI changes for this cycle are:

   - preliminary changes for RISC-V

   - Add support for setting the resolution on the EFI framebuffer

   - Simplify kernel image loading for arm64

   - Move .bss into .data via the linker script instead of relying on
     symbol annotations.

   - Get rid of __pure getters to access global variables

   - Clean up the config table matching arrays

   - Rename pr_efi/pr_efi_err to efi_info/efi_err, and use them
     consistently

   - Simplify and unify initrd loading

   - Parse the builtin command line on x86 (if provided)

   - Implement printk() support, including support for wide character
     strings

   - Simplify GDT handling in early mixed mode thunking code

   - Some other minor fixes and cleanups"

* tag 'efi-core-2020-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits)
  efi/x86: Don't blow away existing initrd
  efi/x86: Drop the special GDT for the EFI thunk
  efi/libstub: Add missing prototype for PE/COFF entry point
  efi/efivars: Add missing kobject_put() in sysfs entry creation error path
  efi/libstub: Use pool allocation for the command line
  efi/libstub: Don't parse overlong command lines
  efi/libstub: Use snprintf with %ls to convert the command line
  efi/libstub: Get the exact UTF-8 length
  efi/libstub: Use %ls for filename
  efi/libstub: Add UTF-8 decoding to efi_puts
  efi/printf: Add support for wchar_t (UTF-16)
  efi/gop: Add an option to list out the available GOP modes
  efi/libstub: Add definitions for console input and events
  efi/libstub: Implement printk-style logging
  efi/printf: Turn vsprintf into vsnprintf
  efi/printf: Abort on invalid format
  efi/printf: Refactor code to consolidate padding and output
  efi/printf: Handle null string input
  efi/printf: Factor out integer argument retrieval
  efi/printf: Factor out width/precision parsing
  ...
parents a7092c82 e9524fb9
Loading
Loading
Loading
Loading
+35 −3
Original line number Diff line number Diff line
@@ -2,8 +2,10 @@
What is efifb?
==============

This is a generic EFI platform driver for Intel based Apple computers.
efifb is only for EFI booted Intel Macs.
This is a generic EFI platform driver for systems with UEFI firmware. The
system must be booted via the EFI stub for this to be usable. efifb supports
both firmware with Graphics Output Protocol (GOP) displays as well as older
systems with only Universal Graphics Adapter (UGA) displays.

Supported Hardware
==================
@@ -12,11 +14,14 @@ Supported Hardware
- Macbook
- Macbook Pro 15"/17"
- MacMini
- ARM/ARM64/X86 systems with UEFI firmware

How to use it?
==============

efifb does not have any kind of autodetection of your machine.
For UGA displays, efifb does not have any kind of autodetection of your
machine.

You have to add the following kernel parameters in your elilo.conf::

	Macbook :
@@ -28,6 +33,9 @@ You have to add the following kernel parameters in your elilo.conf::
	Macbook Pro 17", iMac 20" :
		video=efifb:i20

For GOP displays, efifb can autodetect the display's resolution and framebuffer
address, so these should work out of the box without any special parameters.

Accepted options:

======= ===========================================================
@@ -36,4 +44,28 @@ nowc Don't map the framebuffer write combined. This can be used
	when large amounts of console data are written.
======= ===========================================================

Options for GOP displays:

mode=n
        The EFI stub will set the mode of the display to mode number n if
        possible.

<xres>x<yres>[-(rgb|bgr|<bpp>)]
        The EFI stub will search for a display mode that matches the specified
        horizontal and vertical resolution, and optionally bit depth, and set
        the mode of the display to it if one is found. The bit depth can either
        "rgb" or "bgr" to match specifically those pixel formats, or a number
        for a mode with matching bits per pixel.

auto
        The EFI stub will choose the mode with the highest resolution (product
        of horizontal and vertical resolution). If there are multiple modes
        with the highest resolution, it will choose one with the highest color
        depth.

list
        The EFI stub will list out all the display modes that are available. A
        specific mode can then be chosen using one of the above options for the
        next boot.

Edgar Hucek <gimli@dark-green.com>
+1 −1
Original line number Diff line number Diff line
@@ -1955,7 +1955,7 @@ config EFI
	select UCS2_STRING
	select EFI_PARAMS_FROM_FDT
	select EFI_STUB
	select EFI_ARMSTUB
	select EFI_GENERIC_STUB
	select EFI_RUNTIME_WRAPPERS
	---help---
	  This option provides support for runtime services provided
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ optional_header:
		.long	__pecoff_code_size		@ SizeOfCode
		.long	__pecoff_data_size		@ SizeOfInitializedData
		.long	0				@ SizeOfUninitializedData
		.long	efi_entry - start		@ AddressOfEntryPoint
		.long	efi_pe_entry - start		@ AddressOfEntryPoint
		.long	start_offset			@ BaseOfCode
		.long	__pecoff_data_start - start	@ BaseOfData

+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ SECTIONS
     * The EFI stub always executes from RAM, and runs strictly before the
     * decompressor, so we can make an exception for its r/w data, and keep it
     */
    *(.data.efistub)
    *(.data.efistub .bss.efistub)
    __pecoff_data_end = .;

    /*
+0 −8
Original line number Diff line number Diff line
@@ -50,14 +50,6 @@ void efi_virtmap_unload(void);

/* arch specific definitions used by the stub code */

#define efi_bs_call(func, ...)	efi_system_table()->boottime->func(__VA_ARGS__)
#define efi_rt_call(func, ...)	efi_system_table()->runtime->func(__VA_ARGS__)
#define efi_is_native()		(true)

#define efi_table_attr(inst, attr)	(inst->attr)

#define efi_call_proto(inst, func, ...) inst->func(inst, ##__VA_ARGS__)

struct screen_info *alloc_screen_info(void);
void free_screen_info(struct screen_info *si);

Loading