[U-Boot] [PATCH 18/48] efi: Add start-up library code

Bin Meng bmeng.cn at gmail.com
Sun Aug 2 17:03:04 CEST 2015


Hi Simon,

On Fri, Jul 31, 2015 at 11:45 PM, Simon Glass <sjg at chromium.org> wrote:
> Hi Bin,
>
> On 23 July 2015 at 02:09, Bin Meng <bmeng.cn at gmail.com> wrote:
>> Hi Simon,
>>
>> On Wed, Jul 22, 2015 at 11:49 PM, Simon Glass <sjg at chromium.org> wrote:
>>> When running as an EFI application, U-Boot must request memory from EFI,
>>> and provide access to the boot services U-Boot needs.
>>>
>>> Add library code to perform these tasks. This includes efi_main() which is
>>> the entry point from EFI. U-Boot is built as a shared library.
>>>
>>> Signed-off-by: Simon Glass <sjg at chromium.org>
>>> ---
>>>

[snip]

>>> +struct efi_device_path;
>>> +
>>> +#define EFI_SUCCESS            0
>>> +#define EFI_LOAD_ERROR         (1 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_INVALID_PARAMETER  (2 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_UNSUPPORTED                (3 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_BAD_BUFFER_SIZE    (4 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_BUFFER_TOO_SMALL   (5 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_NOT_READY          (6 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_DEVICE_ERROR       (7 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_WRITE_PROTECTED    (8 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_OUT_OF_RESOURCES   (9 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_NOT_FOUND          (14 | (1UL << (BITS_PER_LONG - 1)))
>>> +#define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG - 1)))
>>> +
>>
>> Can we also remove those duplicated defines in
>> arch/x86/include/asm/fsp/fsp_types.h so that FSP codes can use the one
>> in efi.h?
>
> But these have an FSP prefix, right? If you are sure about this, I'll
> do it as a separate clean-up patch.
>

According to FSP spec, FSP is using EFI status codes, so they are
compatible. We can do it as a separate clean-up patch later.

[snip]

Regards,
Bin


More information about the U-Boot mailing list