UiApp


Andrew Fish
 

Fabrice,

Any NVRAM variable in the gEfiGlobalVariableGuid namespace is defined in the UEFI Spec[1]. You can look at chapter 3 - Boot Manager in the UEFI Specification to get a detailed description of how they work.

The general idea is the OS installer will write the Boot#### and inject it into the BootOrder variable list. The BDS may create default options if no NVRAM is present or may enforce some rules like having a fallback option of booting the UEFI Shell as the last thing in the list. The UEFI spec only defines how nvram variables work, but not how the platform policy works. The generic BDS driver generally implements the UEFI Spec behavior and the libraries help configuring the platform defaults.

[1] https://uefi.org/specifications

Thanks,

Andrew Fish

On Nov 25, 2021, at 10:46 AM, PierreGondois <pierre.gondois@...> wrote:

Hi Fabrice,

I can only point you to https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c

I don't know enough about this module to describe how it works.

Also you can configure the boot options from the uefi shell with the 'bcfg' command (if it helps),

Regards,

Pierre


On 11/25/21 3:55 PM, Fabrice Decrop Longet wrote:
Hi Pierre,

Thank you very much for your answer.

It makes really sense to me, thanks PlatformRegisterFvBootOption function.

It makes sense for uefi shell boot. But how (and who) are added over boot options ?


Thanks in advance for your help,
Regards


Fabrice DECROP LONGET

-----Original Message-----
From: Pierre Gondois <pierre.gondois@...>
Sent: Tuesday, November 23, 2021 6:49 PM
To: discuss@edk2.groups.io; Fabrice Decrop Longet <fabrice.decrop-longet@...>
Subject: Re: [edk2-discuss] UiApp

Hi Fabrice,

I think the UiApp is only an application to have a user interface. The application is loaded just after the BDS driver, e.g.:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmVirtPkg/ArmVirtKvmTool.fdf#L187

The library managing boot options should be at:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/MdeModulePkg/Include/Library/UefiBootManagerLib.h

An example on how the Uefi shell boot option is added for Arm:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c#L360

Unfortunately I don't know more than that,

Regards,

Pierre


On 11/18/21 4:44 PM, Fabrice DECROP LONGET via groups.io wrote:
Hi,

This is my very first message on edk2, regarding UEFI software developpement.
Please, feel free to transfer my message to any other location if
needed 😊

I’m currently working on a BIOS setup menu to integrate in the boot flow of my HW platform. I’m working on a reference design of ARM, was able to compile and execute edk2 UEFI boot.

Could someone answer to the following questions :

1/UiApp is started during the BDS phase.
Because it has been configured so in the EFI variable
EfiGlobalVariable:Boot0000 Am I correct ?

2/Is it also correct to say that this parameter comes from NVRAM ?

3/Is there a way to change this value parameter ?
Is it possible through Boot Manager menu ?
And through EDK2 source code ?

4/Let's assume that there are Boot0000 to Boot0006 options on my platform.
How EDK2 fill the Boot#### options ? Is it pre-written in NVRAM, or is filled by EDK2 ?
If filled by EDK2, could you please point me where it is done in
source code

5/Is there a way to add a boot option (BootNext) outside EDK2 (saying outise Bott Manager Menu), outside UEFI shell, and outside OS ?


Thanks in advance for your help,
Regards








PierreGondois
 

Hi Fabrice,

I can only point you to https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c

I don't know enough about this module to describe how it works.

Also you can configure the boot options from the uefi shell with the 'bcfg' command (if it helps),

Regards,

Pierre

On 11/25/21 3:55 PM, Fabrice Decrop Longet wrote:
Hi Pierre,

Thank you very much for your answer.

It makes really sense to me, thanks PlatformRegisterFvBootOption function.

It makes sense for uefi shell boot. But how (and who) are added over boot options ?


Thanks in advance for your help,
Regards


Fabrice DECROP LONGET

-----Original Message-----
From: Pierre Gondois <pierre.gondois@...>
Sent: Tuesday, November 23, 2021 6:49 PM
To: discuss@edk2.groups.io; Fabrice Decrop Longet <fabrice.decrop-longet@...>
Subject: Re: [edk2-discuss] UiApp

Hi Fabrice,

I think the UiApp is only an application to have a user interface. The application is loaded just after the BDS driver, e.g.:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmVirtPkg/ArmVirtKvmTool.fdf#L187

The library managing boot options should be at:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/MdeModulePkg/Include/Library/UefiBootManagerLib.h

An example on how the Uefi shell boot option is added for Arm:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c#L360

Unfortunately I don't know more than that,

Regards,

Pierre


On 11/18/21 4:44 PM, Fabrice DECROP LONGET via groups.io wrote:
Hi,

This is my very first message on edk2, regarding UEFI software developpement.
Please, feel free to transfer my message to any other location if
needed 😊

I’m currently working on a BIOS setup menu to integrate in the boot flow of my HW platform. I’m working on a reference design of ARM, was able to compile and execute edk2 UEFI boot.

Could someone answer to the following questions :

1/UiApp is started during the BDS phase.
Because it has been configured so in the EFI variable
EfiGlobalVariable:Boot0000 Am I correct ?

2/Is it also correct to say that this parameter comes from NVRAM ?

3/Is there a way to change this value parameter ?
Is it possible through Boot Manager menu ?
And through EDK2 source code ?

4/Let's assume that there are Boot0000 to Boot0006 options on my platform.
How EDK2 fill the Boot#### options ? Is it pre-written in NVRAM, or is filled by EDK2 ?
If filled by EDK2, could you please point me where it is done in
source code

5/Is there a way to add a boot option (BootNext) outside EDK2 (saying outise Bott Manager Menu), outside UEFI shell, and outside OS ?


Thanks in advance for your help,
Regards







PierreGondois
 

Hi Fabrice,

I think the UiApp is only an application to have a user interface. The application is loaded just after the BDS driver, e.g.:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmVirtPkg/ArmVirtKvmTool.fdf#L187

The library managing boot options should be at:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/MdeModulePkg/Include/Library/UefiBootManagerLib.h

An example on how the Uefi shell boot option is added for Arm:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c#L360

Unfortunately I don't know more than that,

Regards,

Pierre

On 11/18/21 4:44 PM, Fabrice DECROP LONGET via groups.io wrote:
Hi,

This is my very first message on edk2, regarding UEFI software developpement.
Please, feel free to transfer my message to any other location if needed 😊

I’m currently working on a BIOS setup menu to integrate in the boot flow of my HW platform. I’m working on a reference design of ARM, was able to compile and execute edk2 UEFI boot.

Could someone answer to the following questions :

1/UiApp is started during the BDS phase.
Because it has been configured so in the EFI variable EfiGlobalVariable:Boot0000
Am I correct ?

2/Is it also correct to say that this parameter comes from NVRAM ?

3/Is there a way to change this value parameter ?
Is it possible through Boot Manager menu ?
And through EDK2 source code ?

4/Let's assume that there are Boot0000 to Boot0006 options on my platform.
How EDK2 fill the Boot#### options ? Is it pre-written in NVRAM, or is filled by EDK2 ?
If filled by EDK2, could you please point me where it is done in source code

5/Is there a way to add a boot option (BootNext) outside EDK2 (saying outise Bott Manager Menu), outside UEFI shell, and outside OS ?


Thanks in advance for your help,
Regards







Fabrice DECROP LONGET
 

Hi Pierre,

Thank you very much for your answer.

It makes really sense to me, thanks PlatformRegisterFvBootOption function.

It makes sense for uefi shell boot. But how (and who) are added over boot options ?


Thanks in advance for your help,
Regards


Fabrice DECROP LONGET

-----Original Message-----
From: Pierre Gondois <pierre.gondois@...>
Sent: Tuesday, November 23, 2021 6:49 PM
To: discuss@edk2.groups.io; Fabrice Decrop Longet <fabrice.decrop-longet@...>
Subject: Re: [edk2-discuss] UiApp

Hi Fabrice,

I think the UiApp is only an application to have a user interface. The application is loaded just after the BDS driver, e.g.:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmVirtPkg/ArmVirtKvmTool.fdf#L187

The library managing boot options should be at:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/MdeModulePkg/Include/Library/UefiBootManagerLib.h

An example on how the Uefi shell boot option is added for Arm:

https://github.com/tianocore/edk2/blob/edk2-stable202111-rc1/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c#L360

Unfortunately I don't know more than that,

Regards,

Pierre


On 11/18/21 4:44 PM, Fabrice DECROP LONGET via groups.io wrote:
Hi,

This is my very first message on edk2, regarding UEFI software developpement.
Please, feel free to transfer my message to any other location if
needed 😊

I’m currently working on a BIOS setup menu to integrate in the boot flow of my HW platform. I’m working on a reference design of ARM, was able to compile and execute edk2 UEFI boot.

Could someone answer to the following questions :

1/UiApp is started during the BDS phase.
Because it has been configured so in the EFI variable
EfiGlobalVariable:Boot0000 Am I correct ?

2/Is it also correct to say that this parameter comes from NVRAM ?

3/Is there a way to change this value parameter ?
Is it possible through Boot Manager menu ?
And through EDK2 source code ?

4/Let's assume that there are Boot0000 to Boot0006 options on my platform.
How EDK2 fill the Boot#### options ? Is it pre-written in NVRAM, or is filled by EDK2 ?
If filled by EDK2, could you please point me where it is done in
source code

5/Is there a way to add a boot option (BootNext) outside EDK2 (saying outise Bott Manager Menu), outside UEFI shell, and outside OS ?


Thanks in advance for your help,
Regards







Fabrice DECROP LONGET
 

Hi,

This is my very first message on edk2, regarding UEFI software developpement.
Please, feel free to transfer my message to any other location if needed 😊

I’m currently working on a BIOS setup menu to integrate in the boot flow of my HW platform. I’m working on a reference design of ARM, was able to compile and execute edk2 UEFI boot.

Could someone answer to the following questions :

1/UiApp is started during the BDS phase.
Because it has been configured so in the EFI variable EfiGlobalVariable:Boot0000
Am I correct ?

2/Is it also correct to say that this parameter comes from NVRAM ?

3/Is there a way to change this value parameter ?
Is it possible through Boot Manager menu ?
And through EDK2 source code ?

4/Let's assume that there are Boot0000 to Boot0006 options on my platform.
How EDK2 fill the Boot#### options ? Is it pre-written in NVRAM, or is filled by EDK2 ?
If filled by EDK2, could you please point me where it is done in source code

5/Is there a way to add a boot option (BootNext) outside EDK2 (saying outise Bott Manager Menu), outside UEFI shell, and outside OS ?


Thanks in advance for your help,
Regards