]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
efi/libstub: Buffer output of efi_puts
authorArvind Sankar <nivedita@alum.mit.edu>
Mon, 18 May 2020 19:06:55 +0000 (15:06 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 19 May 2020 07:23:22 +0000 (09:23 +0200)
commitfd0528a24958b7e8d55669cf50749776308d4c5a
treeaad5868e4ab5fa6ba23105c60a938f8ff2d6a690
parentcb8c90a08c7f2f761919190093fca0611c1cece4
efi/libstub: Buffer output of efi_puts

Use a buffer to convert the string to UTF-16. This will reduce the
number of firmware calls required to print the string from one per
character to one per string in most cases.

Cast the input char to unsigned char before converting to efi_char16_t
to avoid sign-extension in case there are any non-ASCII characters in
the input.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200518190716.751506-4-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub-helper.c