David,
Thanks for pointing that patch.

Now I understand it.
Normally it's the CSM16 code that builds the boot descriptions for legacy boot 
options
and LegacyBootManagerLib consumes that boot descriptions.

But in your case, LegacyBios driver builds the boot descriptions for VirtIo 
devices and
LegacyBootManagerLib consumes that boot descriptions.

The flow is like below: (I understand there is no 
VirtIoBootOptionDescriptionHandler() in
your current patch. But I think we could write such handler and register it 
through
EfiBootManagerRegisterBootDescriptionHandler() API)

  *module*          *UefiBootManagerLib*
LegacyBios -> GetBootOptionDescription() -> VirtIoBootOptionDescriptionHandler()
BdsDxe -> GetBootOptionDescription() -> VirtIoBootOptionDescriptionHandler()

So instead of routing to *UefiBootManagerLib* GetBootOptionDescription(),
why not you directly call VirtIoBootOptionDescriptionHandler() from LegacyBios?

I understand from functionality perspective, it makes no difference.
But I care about that because it avoids LegacyBios unnecessarily depends on
*UefiBootManagerLib*.

What do you think?


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of David
> Woodhouse
> Sent: Tuesday, June 25, 2019 5:29 PM
> To: devel@edk2.groups.io; Ni, Ray <ray...@intel.com>; ler...@redhat.com
> Subject: Re: [edk2-devel] [PATCH 6/7] MdeModulePkg/UefiBootManagerLib:
> describe VirtIO devices correctly
> 
> On Tue, 2019-06-25 at 09:15 +0000, Ni, Ray wrote:
> > But I still need to understand why the *GetBootOption() API is needed.
> > Because for quite a long time since the MdeModulePkg/Bds was added,
> there is no
> > such requirement.
> 
> It's for CSM, because otherwise all the legacy boot targets other than
> IDE are just shown as 'Harddisk'.
> 
> See patch [5/7] in this thread which uses the GetBootDescription API
> that [4/7] exposes.
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42803): https://edk2.groups.io/g/devel/message/42803
Mute This Topic: https://groups.io/mt/32163533/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to