public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/5] vsprintf and short-wchar for EFI_LOADER
Date: Wed,  9 Aug 2017 19:14:30 -0400	[thread overview]
Message-ID: <20170809231441.22691-1-robdclark@gmail.com> (raw)

As requested, I've split this out of the larger EFI_LOADER patchset.

This adds two things that the later EFI_LOADER patchset depends on:

1) UUID/GUID support
2) %ls UTF string support, in particular UTF-16.  In the UEFI API,
   all strings are UTF-16

I had started converting this over to using c11 + u"string" literals,
instead of using -fshort-wchar + L"string" literals and %ls, but I
ran into two problems:

1) we lose out on the printf (and friends) va_arg type checking if we
   roll our own custom printf fmt modifier for UTF-16 strings
2) and worse than that, we have to disable -Wformat warnings

So given that we have a significant downside for not just using
-fshort-wchar, and I don't think any really strong argument against,
I am back to thinking that we should just go with -fshort-wchar.

The current patchset has a Kconfig option to opt-in to -fshort-wchar,
which EFI_LOADER selects.  If the consensus is to enable -fshort-wchar
for everything, I'll drop the kconfig part and make it unconditional.

The current version of this patchset and efi-loader patchset are at

  https://github.com/robclark/u-boot.git  vsprintf

and

  https://github.com/robclark/u-boot.git enough-uefi-for-shim-2

I'll resend the enought-uefi-for-shim-2 patchset after I have a
chance to figure out fs-test.sh and add tests for fs_readdir().

Rob Clark (5):
  Kconfig: add option to build with -fshort-wchar
  lib: add some utf16 handling helpers
  vsprintf.c: add UTF-16 string (%ls) support
  vsprintf.c: add GUID printing
  examples: add fallback memcpy

 Kconfig                      |  8 +++++
 Makefile                     |  4 +++
 examples/api/Makefile        |  2 ++
 examples/api/glue.c          | 12 +++++++
 include/charset.h            | 55 ++++++++++++++++++++++++++++++
 include/config_fallbacks.h   |  1 +
 lib/Makefile                 |  1 +
 lib/charset.c                | 81 ++++++++++++++++++++++++++++++++++++++++++++
 lib/efi_loader/Kconfig       |  1 +
 lib/efi_loader/efi_console.c | 17 ++--------
 lib/vsprintf.c               | 77 ++++++++++++++++++++++++++++++++++++++---
 11 files changed, 241 insertions(+), 18 deletions(-)
 create mode 100644 include/charset.h
 create mode 100644 lib/charset.c

-- 
2.13.0

             reply	other threads:[~2017-08-09 23:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 23:14 Rob Clark [this message]
2017-08-09 23:14 ` [U-Boot] [PATCH 1/5] Kconfig: add option to build with -fshort-wchar Rob Clark
2017-08-10  2:28   ` Tom Rini
2017-08-09 23:14 ` [U-Boot] [PATCH 2/5] lib: add some utf16 handling helpers Rob Clark
2017-08-13 21:36   ` Simon Glass
2017-08-09 23:14 ` [U-Boot] [PATCH 3/5] vsprintf.c: add UTF-16 string (%ls) support Rob Clark
2017-08-13 21:36   ` Simon Glass
2017-08-09 23:14 ` [U-Boot] [PATCH 4/5] vsprintf.c: add GUID printing Rob Clark
2017-08-15 20:12   ` Heinrich Schuchardt
2017-08-09 23:14 ` [U-Boot] [PATCH 5/5] examples: add fallback memcpy Rob Clark
2017-09-06 15:31 ` [U-Boot] [PATCH 0/5] vsprintf and short-wchar for EFI_LOADER Heinrich Schuchardt
2017-09-06 16:45   ` Tom Rini
2017-09-06 18:14     ` Rob Clark
2017-09-06 18:16       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170809231441.22691-1-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox