linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/24] efi/libstub: Add printf implementation
@ 2020-05-18 19:06 Arvind Sankar
  2020-05-18 19:06 ` [PATCH 01/24] efi/libstub: Include dependencies of efistub.h Arvind Sankar
                   ` (24 more replies)
  0 siblings, 25 replies; 46+ messages in thread
From: Arvind Sankar @ 2020-05-18 19:06 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-efi

This series (on top of efi/next) adds a basic printf implementation for
the EFI stub to use.

Patches 1-2 are minor cleanup.

Patch 3 adds an on-stack buffer for efi_puts to do the char to UTF-16
conversion, to avoid calling into the firmware for each character.

Patches 4-16 copy the simple printf implementation from
arch/x86/boot/printf.c and spruce it up. The main enhancements are
support for 64-bit integers and conversion to vsnprintf. There are small
fixes to correct the behavior for edge cases (detailed in the individual
patches).

Patch 17 changes efi_info/efi_err to actually use efi_printk, and
introduces a loglevel into the EFI stub instead of just quiet/non-quiet.
The loglevels are reused from the main kernel. An efi_debug macro is
also added, but is currently unused. As an aside, we chose efi_info over
efi_pr_info, but I'm wondering whether we should make it efi_pr_info
after all: there is already an efi_info symbol (structure type and field
name) so it might lead to some confusion.

Patch 18-19 add an option to list the available modes from the GOP,
which should make using the new video=efifb parameters easier.

Patches 20-24 incorporate UTF-16 support into the new printf function
and use it in a couple of places.

Arvind Sankar (24):
  efi/libstub: Include dependencies of efistub.h
  efi/libstub: Rename efi_[char16_]printk to efi_[char16_]puts
  efi/libstub: Buffer output of efi_puts
  efi/libstub: Add a basic printf implementation
  efi/libstub: Optimize for size instead of speed
  efi/printf: Drop %n format and L qualifier
  efi/printf: Add 64-bit and 8-bit integer support
  efi/printf: Factor out flags parsing and handle '%' earlier
  efi/printf: Fix minor bug in precision handling
  efi/printf: Merge 'p' with the integer formats
  efi/printf: Factor out width/precision parsing
  efi/printf: Factor out integer argument retrieval
  efi/printf: Handle null string input
  efi/printf: Refactor code to consolidate padding and output
  efi/printf: Abort on invalid format
  efi/printf: Turn vsprintf into vsnprintf
  efi/libstub: Implement printk-style logging
  efi/libstub: Add definitions for console input and events
  efi/gop: Add an option to list out the available GOP modes
  efi/printf: Add support for wchar_t (UTF-16)
  efi/libstub: Add UTF-8 decoding to efi_puts
  efi/libstub: Use %ls for filename
  efi/libstub: Get the exact UTF-8 length
  efi/libstub: Use snprintf with %ls to convert the command line

 Documentation/fb/efifb.rst                    |   5 +
 arch/x86/include/asm/efi.h                    |  10 +
 arch/x86/xen/efi.c                            |   2 +-
 drivers/firmware/efi/libstub/Makefile         |   6 +-
 .../firmware/efi/libstub/efi-stub-helper.c    | 275 ++++++---
 drivers/firmware/efi/libstub/efistub.h        | 107 +++-
 drivers/firmware/efi/libstub/file.c           |   4 +-
 drivers/firmware/efi/libstub/gop.c            |  97 ++-
 drivers/firmware/efi/libstub/vsprintf.c       | 563 ++++++++++++++++++
 include/linux/efi.h                           |   4 +-
 10 files changed, 968 insertions(+), 105 deletions(-)
 create mode 100644 drivers/firmware/efi/libstub/vsprintf.c

-- 
2.26.2


^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2020-06-15  9:43 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18 19:06 [PATCH 00/24] efi/libstub: Add printf implementation Arvind Sankar
2020-05-18 19:06 ` [PATCH 01/24] efi/libstub: Include dependencies of efistub.h Arvind Sankar
2020-05-18 19:06 ` [PATCH 02/24] efi/libstub: Rename efi_[char16_]printk to efi_[char16_]puts Arvind Sankar
2020-05-18 19:06 ` [PATCH 03/24] efi/libstub: Buffer output of efi_puts Arvind Sankar
2020-05-18 19:06 ` [PATCH 04/24] efi/libstub: Add a basic printf implementation Arvind Sankar
2020-05-18 19:06 ` [PATCH 05/24] efi/libstub: Optimize for size instead of speed Arvind Sankar
2020-06-05  0:31   ` Andrey Ignatov
2020-06-05  6:33     ` Ard Biesheuvel
2020-06-05 13:14       ` Arvind Sankar
2020-06-05 13:32         ` Arvind Sankar
2020-06-05 14:53           ` Ard Biesheuvel
2020-06-05 15:10             ` Arvind Sankar
2020-06-05 15:11               ` Ard Biesheuvel
2020-06-05 15:06           ` [PATCH] efi/x86: Fix build with gcc 4 Arvind Sankar
2020-06-05 16:09             ` Andrey Ignatov
2020-06-15  9:43               ` Ard Biesheuvel
2020-05-18 19:06 ` [PATCH 06/24] efi/printf: Drop %n format and L qualifier Arvind Sankar
2020-05-18 19:06 ` [PATCH 07/24] efi/printf: Add 64-bit and 8-bit integer support Arvind Sankar
2020-05-18 19:07 ` [PATCH 08/24] efi/printf: Factor out flags parsing and handle '%' earlier Arvind Sankar
2020-05-18 19:07 ` [PATCH 09/24] efi/printf: Fix minor bug in precision handling Arvind Sankar
2020-05-18 19:07 ` [PATCH 10/24] efi/printf: Merge 'p' with the integer formats Arvind Sankar
2020-05-18 19:07 ` [PATCH 11/24] efi/printf: Factor out width/precision parsing Arvind Sankar
2020-05-18 19:07 ` [PATCH 12/24] efi/printf: Factor out integer argument retrieval Arvind Sankar
2020-05-18 19:07 ` [PATCH 13/24] efi/printf: Handle null string input Arvind Sankar
2020-05-18 19:07 ` [PATCH 14/24] efi/printf: Refactor code to consolidate padding and output Arvind Sankar
2020-05-18 19:07 ` [PATCH 15/24] efi/printf: Abort on invalid format Arvind Sankar
2020-05-18 19:07 ` [PATCH 16/24] efi/printf: Turn vsprintf into vsnprintf Arvind Sankar
2020-05-18 19:07 ` [PATCH 17/24] efi/libstub: Implement printk-style logging Arvind Sankar
2020-05-19  8:22   ` Ard Biesheuvel
2020-05-19 15:07     ` Arvind Sankar
2020-05-20 16:38       ` Arvind Sankar
2020-05-20 16:38         ` Ard Biesheuvel
2020-05-20 17:02           ` Arvind Sankar
2020-05-20 17:09             ` Ard Biesheuvel
2020-05-18 19:07 ` [PATCH 18/24] efi/libstub: Add definitions for console input and events Arvind Sankar
2020-05-18 19:07 ` [PATCH 19/24] efi/gop: Add an option to list out the available GOP modes Arvind Sankar
2020-05-18 19:07 ` [PATCH 20/24] efi/printf: Add support for wchar_t (UTF-16) Arvind Sankar
2020-05-18 19:07 ` [PATCH 21/24] efi/libstub: Add UTF-8 decoding to efi_puts Arvind Sankar
2020-05-18 19:07 ` [PATCH 22/24] efi/libstub: Use %ls for filename Arvind Sankar
2020-05-18 19:07 ` [PATCH 23/24] efi/libstub: Get the exact UTF-8 length Arvind Sankar
2020-05-18 19:07 ` [PATCH 24/24] efi/libstub: Use snprintf with %ls to convert the command line Arvind Sankar
2020-05-19  7:53 ` [PATCH 00/24] efi/libstub: Add printf implementation Ard Biesheuvel
2020-05-19 15:06   ` Arvind Sankar
2020-05-19 16:44     ` Ard Biesheuvel
2020-05-21  0:29       ` [PATCH] efi/libstub: Don't parse overlong command lines Arvind Sankar
2020-05-22 13:13         ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).