From: Graf, Alexander <graf@amazon.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/1] efi_loader: optional data in load options are binary
Date: Tue, 7 May 2019 11:47:26 +0200 [thread overview]
Message-ID: <00b2f550-3f7e-ba7d-e75a-a582d087906e@amazon.com> (raw)
In-Reply-To: <20190507073046.GI11160@linaro.org>
On 07.05.19 09:30, Takahiro Akashi wrote:
> On Tue, May 07, 2019 at 09:12:56AM +0200, Heinrich Schuchardt wrote:
>> On 5/7/19 8:16 AM, Takahiro Akashi wrote:
>>> On Tue, May 07, 2019 at 08:04:26AM +0200, Heinrich Schuchardt wrote:
>>>> On 5/7/19 7:16 AM, Heinrich Schuchardt wrote:
>>>>> On 5/7/19 3:53 AM, Takahiro Akashi wrote:
>>>>>> On Tue, Apr 30, 2019 at 08:11:15AM +0200, Heinrich Schuchardt wrote:
>>>>>>> The field boot OptionalData in structure _EFI_LOAD_OPTIONS is for binary
>>>>>>> data.
>>>>>>>
>>>>>>> When we use `efidebug boot add` we should convert the 5th argument from
>>>>>>> UTF-8 to UTF-16 before putting it into the BootXXXX variable.
>>>>>> While optional_data holds u8 string in calling
>>>>>> efi_serialize_load_option(),
>>>>>> it holds u16 string in leaving from efi_deserialize_load_option().
>>>>>> We should handle it in a consistent way if you want to keep optional_data
>>>>>> as "const u8."
>>>> When communicating with Linux optional data may contain a u16 string.
>>>> But I cannot see were our coding is inconsistent.
>>> I don't get your point.
>>> Do you want to allow 'u8 *' variable to hold u16 string?#
>> Yes, optional data may contain anything, in the case of Linux the
>> command line parameters as an u16 string.
>>
>> Other operating systems may use the field in other ways, e.g. store an
>> ASCII string.
> The problem is that with your patch optional_data is *always* converted
> to utf-16 as far as we use efidebug.
> My efidebug is not for linux only.
So what does the UEFI Shell do for command argument passing? Does it
always pass in a utf16 string? If so, why?
Alex
next prev parent reply other threads:[~2019-05-07 9:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 6:11 [U-Boot] [PATCH v2 1/1] efi_loader: optional data in load options are binary Heinrich Schuchardt
2019-05-07 1:53 ` Takahiro Akashi
2019-05-07 5:16 ` Heinrich Schuchardt
2019-05-07 6:04 ` Heinrich Schuchardt
2019-05-07 6:16 ` Takahiro Akashi
2019-05-07 7:12 ` Heinrich Schuchardt
2019-05-07 7:30 ` Takahiro Akashi
2019-05-07 9:47 ` Graf, Alexander [this message]
2019-05-07 16:54 ` Heinrich Schuchardt
2019-05-07 23:56 ` Takahiro Akashi
2019-05-08 0:50 ` 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=00b2f550-3f7e-ba7d-e75a-a582d087906e@amazon.com \
--to=graf@amazon.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