[edk2-devel] [PATCH 6/7] MdeModulePkg/UefiBootManagerLib: describe VirtIO devices correctly

Ni, Ray ray.ni at intel.com
Tue Jun 25 09:56:51 UTC 2019


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 at edk2.groups.io <devel at edk2.groups.io> On Behalf Of David
> Woodhouse
> Sent: Tuesday, June 25, 2019 5:29 PM
> To: devel at edk2.groups.io; Ni, Ray <ray.ni at intel.com>; lersek at 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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list