[U-Boot] [PATCH v2 00/17][RESENT] efi_loader: EFI_UNICODE_COLLATION_PROTOCOL

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Aug 31 19:31:22 UTC 2018


This patchset implements the EFI_UNICODE_COLLATION_PROTOCOL and provides
unit tests.

Additionally some errors when handling Unicode strings are fixed.
* possible stack overflow
* incorrect handling of precision attribute in printf()
* incorrect limit on variable length

Some old Unicode functions are replaced.

An error in Unicode handling in the FAT file system shall be fixed after
merging Takahiro's FAT patches. Until then some redundancy between old and
new Unicode functions remains.

v2:
	use CONFIG_IS_ENABLED(EFI_LOADER) instead of
	defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD)
	add configuration option EFI_UNICODE_CAPITALIZATION
	use ut_assert*() for testing
	test illegal Unicode sequences
	add more comments

Heinrich Schuchardt (17):
  vsprintf.c: use #if CONFIG_IS_ENABLED(EFI_LOADER)
  test: print_ut.c use #if CONFIG_IS_ENABLED(EFI_LOADER)
  lib: build charset.o only if needed
  efi_loader: rename utf16_strlen, utf16_strnlen
  lib: charset: utility functions for Unicode
  test: unit tests for Unicode functions
  lib: vsprintf: correct printing of Unicode strings
  test: test printing Unicode
  efi_loader: remove limit on variable length
  efi_loader: don't use unlimited stack as buffer
  efi_loader: buffer size for load options
  lib: charset: remove obsolete functions
  efi_loader: capitalization table
  lib: charset: upper/lower case conversion
  test: tests for utf_to_lower() utf_to_upper().
  efi_loader: EFI_UNICODE_COLLATION_PROTOCOL
  efi_selftest: EFI_UNICODE_COLLATION_PROTOCOL

 MAINTAINERS                                   |    4 +
 cmd/bootefi.c                                 |    6 +-
 include/capitalization.h                      | 2028 +++++++++++++++++
 include/charset.h                             |  187 +-
 include/cp1250.h                              |   40 +
 include/cp437.h                               |   40 +
 include/efi_api.h                             |   21 +
 include/efi_loader.h                          |    5 +
 include/test/suites.h                         |    3 +-
 lib/Makefile                                  |    5 +
 lib/charset.c                                 |  359 ++-
 lib/efi_loader/Kconfig                        |   10 +
 lib/efi_loader/Makefile                       |   18 +-
 lib/efi_loader/efi_bootmgr.c                  |    2 +-
 lib/efi_loader/efi_boottime.c                 |    6 +
 lib/efi_loader/efi_console.c                  |   20 +-
 lib/efi_loader/efi_file.c                     |    2 +-
 lib/efi_loader/efi_unicode_collation.c        |  329 +++
 lib/efi_loader/efi_variable.c                 |   52 +-
 lib/efi_selftest/Makefile                     |    1 +
 .../efi_selftest_unicode_collation.c          |  260 +++
 lib/vsprintf.c                                |   29 +-
 test/Kconfig                                  |    8 +
 test/Makefile                                 |    1 +
 test/cmd_ut.c                                 |   13 +-
 test/print_ut.c                               |    6 +-
 test/unicode_ut.c                             |  539 +++++
 27 files changed, 3824 insertions(+), 170 deletions(-)
 create mode 100644 include/capitalization.h
 create mode 100644 include/cp1250.h
 create mode 100644 include/cp437.h
 create mode 100644 lib/efi_loader/efi_unicode_collation.c
 create mode 100644 lib/efi_selftest/efi_selftest_unicode_collation.c
 create mode 100644 test/unicode_ut.c

-- 
2.18.0



More information about the U-Boot mailing list