All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/5] efi_loader: EFI_UNICODE_COLLATION_PROTOCOL
Date: Mon, 3 Sep 2018 23:26:01 +0200	[thread overview]
Message-ID: <282fd2fb-c3be-92c3-4c0d-7bc507e7b887@suse.de> (raw)
In-Reply-To: <9acd4ab7-4f67-7cd4-3bfc-f4c09632df83@gmx.de>



On 03.09.18 23:24, Heinrich Schuchardt wrote:
> On 09/03/2018 11:09 PM, Alexander Graf wrote:
>>
>>
>> On 03.09.18 18:35, Heinrich Schuchardt wrote:
>>> The patch implements the EFI_UNICODE_COLLATION_PROTOCOL.
>>>
>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>> ---
>>> v3:
>>> 	no change
>>> v2:
>>> 	add more comments
>>> ---
>>>  MAINTAINERS                            |   2 +
>>>  include/cp1250.h                       |  40 +++
>>>  include/cp437.h                        |  40 +++
>>>  include/efi_api.h                      |  21 ++
>>>  include/efi_loader.h                   |   5 +
>>>  lib/efi_loader/Makefile                |  18 +-
>>>  lib/efi_loader/efi_boottime.c          |   6 +
>>>  lib/efi_loader/efi_unicode_collation.c | 329 +++++++++++++++++++++++++
>>>  8 files changed, 457 insertions(+), 4 deletions(-)
>>>  create mode 100644 include/cp1250.h
>>>  create mode 100644 include/cp437.h
>>>  create mode 100644 lib/efi_loader/efi_unicode_collation.c
>>>

[...]

>>> @@ -127,6 +130,8 @@ extern const efi_guid_t efi_file_info_guid;
>>>  /* GUID for file system information */
>>>  extern const efi_guid_t efi_file_system_info_guid;
>>>  extern const efi_guid_t efi_guid_device_path_utilities_protocol;
>>> +/* GUID of the Unicode collation protocol */
>>> +extern const efi_guid_t efi_guid_unicode_collation_protocol;
>>>  
>>>  extern unsigned int __efi_runtime_start, __efi_runtime_stop;
>>>  extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;
>>> diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
>>> index 1ffbf52a89..0769df20f7 100644
>>> --- a/lib/efi_loader/Makefile
>>> +++ b/lib/efi_loader/Makefile
>>> @@ -17,10 +17,20 @@ always += helloworld.efi
>>>  endif
>>>  
>>>  obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
>>> -obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o
>>> -obj-y += efi_memory.o efi_device_path_to_text.o efi_device_path.o
>>> -obj-y += efi_device_path_utilities.o efi_file.o efi_variable.o efi_bootmgr.o
>>> -obj-y += efi_watchdog.o
>>> +obj-y += \
>>> +efi_bootmgr.o \
>>> +efi_boottime.o \
>>> +efi_console.o \
>>> +efi_device_path.o \
>>> +efi_device_path_to_text.o \
>>> +efi_device_path_utilities.o \
>>> +efi_file.o \
>>> +efi_image_loader.o \
>>> +efi_memory.o \
>>> +efi_runtime.o \
>>> +efi_unicode_collation.o \
>>> +efi_variable.o \
>>> +efi_watchdog.o
>>
>> Instead of line breaking them, just make each line an obj-y += line.
>>

[...]

>>> +const struct efi_unicode_collation_protocol efi_unicode_collation_protocol = {
>>> +	.stri_coll = efi_stri_coll,
>>> +	.metai_match = efi_metai_match,
>>> +	.str_lwr = efi_str_lwr,
>>> +	.str_upr = efi_str_upr,
>>> +	.fat_to_str = efi_fat_to_str,
>>> +	.str_to_fat = efi_str_to_fat,
>>> +	.supported_languages = "en-US",
>>
>> I have to admit I'm slightly puzzled on the supported language field.
>> The spec says quite clearly in appendix M what to do, but everyone seems
>> to interpret the specs differently:
>>
>>   edk2 provides "en"
>>   appendix M example is "en-us"
>>   your patch provides "en-US"
>>
>> I'm not sure which one of them is correct :).
>>
> 
> The spec refers to RFC 4646. RFC 4646 refers to ISO 3166 which uses
> capital letters for the two letter region codes.
> 
> In RFC 4646 you can find the following example:
> 
> en-US (English as used in the United States)
> 
> The value from edk2 complies with RFC 4646. It simply does not specify a
> region.
> 
> So should I change the value to match edk2?

I think that would remove a potential pitfall, yes. And please change
the Makefile according to my comment above :).


Alex

  reply	other threads:[~2018-09-03 21:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 16:35 [U-Boot] [PATCH v3 00/05]efi_loader: EFI_UNICODE_COLLATION_PROTOCOL Heinrich Schuchardt
2018-09-03 16:35 ` [U-Boot] [PATCH v3 1/5] efi_loader: capitalization table Heinrich Schuchardt
2018-09-03 20:54   ` Alexander Graf
2018-09-03 16:35 ` [U-Boot] [PATCH v3 2/5] lib: charset: upper/lower case conversion Heinrich Schuchardt
2018-09-03 16:35 ` [U-Boot] [PATCH v3 3/5] test: tests for utf_to_lower() utf_to_upper() Heinrich Schuchardt
2018-09-03 16:35 ` [U-Boot] [PATCH v3 4/5] efi_loader: EFI_UNICODE_COLLATION_PROTOCOL Heinrich Schuchardt
2018-09-03 21:09   ` Alexander Graf
2018-09-03 21:24     ` Heinrich Schuchardt
2018-09-03 21:26       ` Alexander Graf [this message]
2018-09-04 13:46   ` Alexander Graf
     [not found]     ` <2079463e-a243-3830-eaea-3148af637b42@gmx.de>
2018-09-04 17:20       ` [U-Boot] [Fwd] " Heinrich Schuchardt
2018-09-04 22:04       ` [U-Boot] " Alexander Graf
2018-09-04 22:28         ` Leif Lindholm
2018-09-04 22:35           ` Alexander Graf
2018-09-03 16:35 ` [U-Boot] [PATCH v3 5/5] efi_selftest: EFI_UNICODE_COLLATION_PROTOCOL Heinrich Schuchardt

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=282fd2fb-c3be-92c3-4c0d-7bc507e7b887@suse.de \
    --to=agraf@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.