
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