* How to make a memory mapped to FV ffs efi program?
@ 2018-03-27 3:52 david moheban
2018-03-27 5:28 ` Andrew Fish
0 siblings, 1 reply; 5+ messages in thread
From: david moheban @ 2018-03-27 3:52 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Hi,
This question has always been very elusive despite hours of google
searching. Was wondering how it would be possible to convert an efi program
into a memory mapped volume that advertises itself onto your boot menu? For
example to convert shell.efi into a bootable item on my boot menu.
Thank you
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to make a memory mapped to FV ffs efi program?
2018-03-27 3:52 How to make a memory mapped to FV ffs efi program? david moheban
@ 2018-03-27 5:28 ` Andrew Fish
2018-03-27 9:24 ` Laszlo Ersek
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Fish @ 2018-03-27 5:28 UTC (permalink / raw)
To: david moheban; +Cc: edk2-devel@lists.01.org
David,
I'm not sure what you are asking? Per UEFI Spec boot policy there are well know NVRAM variables that define boot policy. See UEFI Spec 3.3 Globally Defined Variables. Look at BootOrder, BootNext, Boot#### etc.
The memory mapped volume part is tricky as there is not a concept of booting from a memory mapped volume. See "3.5 Boot Mechanisms" in the UEFI Spec.
If you loaded a RAM Disk driver that produced Simple File System then you could form boot from that. The PI spec also defines how to load something out of the FV, so it is also possible to boot from an FV via a device path, but that is not mentioned in the UEFI Spec, as the PI Spec is not required to implement UEFI.
Thanks,
Andrew Fish
> On Mar 26, 2018, at 8:52 PM, david moheban <moheban79@gmail.com> wrote:
>
> Hi,
>
> This question has always been very elusive despite hours of google
> searching. Was wondering how it would be possible to convert an efi program
> into a memory mapped volume that advertises itself onto your boot menu? For
> example to convert shell.efi into a bootable item on my boot menu.
>
> Thank you
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to make a memory mapped to FV ffs efi program?
2018-03-27 5:28 ` Andrew Fish
@ 2018-03-27 9:24 ` Laszlo Ersek
0 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2018-03-27 9:24 UTC (permalink / raw)
To: david moheban; +Cc: Andrew Fish, edk2-devel@lists.01.org
On 03/27/18 07:28, Andrew Fish wrote:
> David,
>
> I'm not sure what you are asking? Per UEFI Spec boot policy there are
> well know NVRAM variables that define boot policy. See UEFI Spec 3.3
> Globally Defined Variables. Look at BootOrder, BootNext, Boot#### etc.
>
> The memory mapped volume part is tricky as there is not a concept of
> booting from a memory mapped volume. See "3.5 Boot Mechanisms" in the
> UEFI Spec.
>
> If you loaded a RAM Disk driver that produced Simple File System then
> you could form boot from that. The PI spec also defines how to load
> something out of the FV, so it is also possible to boot from an FV via
> a device path, but that is not mentioned in the UEFI Spec, as the PI
> Spec is not required to implement UEFI.
edk2 also offers:
MdeModulePkg/Universal/FvSimpleFileSystemDxe
(Please see "FvSimpleFileSystemDxe.inf" for a description -- "Its
primary intended use is to be able to start EFI applications embedded in
FVs from the UEFI shell".)
Thanks
Laszlo
>> On Mar 26, 2018, at 8:52 PM, david moheban <moheban79@gmail.com> wrote:
>>
>> Hi,
>>
>> This question has always been very elusive despite hours of google
>> searching. Was wondering how it would be possible to convert an efi program
>> into a memory mapped volume that advertises itself onto your boot menu? For
>> example to convert shell.efi into a bootable item on my boot menu.
>>
>> Thank you
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* How to make a memory mapped to FV ffs efi program?
@ 2018-03-27 11:43 david moheban
2018-03-27 12:27 ` Laszlo Ersek
0 siblings, 1 reply; 5+ messages in thread
From: david moheban @ 2018-03-27 11:43 UTC (permalink / raw)
To: edk2-devel
Some months back I played around with the Simple File System code examples
in the Edk2 package and am familiar sort of on how it works. I was just
curious on how certain firmware packages take a Efi Shell and make it
available to boot from the F8 or F11 (or whatever) boot menu. I suppose to
make your own you have to write a dxe driver that adds the location via
guid to the boot menu?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to make a memory mapped to FV ffs efi program?
2018-03-27 11:43 david moheban
@ 2018-03-27 12:27 ` Laszlo Ersek
0 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2018-03-27 12:27 UTC (permalink / raw)
To: david moheban; +Cc: edk2-devel
On 03/27/18 13:43, david moheban wrote:
> I was just curious on how certain firmware packages take a Efi Shell
> and make it available to boot from the F8 or F11 (or whatever) boot
> menu. I suppose to make your own you have to write a dxe driver that
> adds the location via guid to the boot menu?
Almost. In edk2 platforms, the agent that does this is usually not a
separate DXE driver, but the given platform's PlatformBootManagerLib
instance, which is linked into, and called from, BdsDxe.
For two examples, please see PlatformRegisterFvBootOption() in:
- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
- OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
A related function is RemoveStaleFvFileOptions(), in both.
Thanks
Laszlo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-03-27 12:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 3:52 How to make a memory mapped to FV ffs efi program? david moheban
2018-03-27 5:28 ` Andrew Fish
2018-03-27 9:24 ` Laszlo Ersek
-- strict thread matches above, loose matches on Subject: below --
2018-03-27 11:43 david moheban
2018-03-27 12:27 ` Laszlo Ersek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox