public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ashish Singhal" <ashishsingha@nvidia.com>
To: "afish@apple.com" <afish@apple.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Ni, Ray" <ray.ni@intel.com>, Laszlo Ersek <lersek@redhat.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Gao, Zhichao" <zhichao.gao@intel.com>,
	Mike Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH] Support skipping automatic BM enumeration
Date: Tue, 5 Nov 2019 05:42:35 +0000	[thread overview]
Message-ID: <DM6PR12MB3324D16C9DC312DB99F98420BA7E0@DM6PR12MB3324.namprd12.prod.outlook.com> (raw)
In-Reply-To: <6766B443-E14A-4F57-984E-5A865FB22CC9@apple.com>

[-- Attachment #1: Type: text/plain, Size: 7080 bytes --]

Hi Andrew,

I have a use case where I install Load File protocol on a handle and want to expose that as a boot option through platform boot manager driver as I need it to have a custom description and custom option data along with it. This is the reason I submitted this patch so that someone can keep using edk2 uefi boot manager library and not expose a boot option if desired using this new protocol. In my use case, I use the load file protocol to be able to load kernel packaged in a proprietary manner for my platform and want to use custom optional data to provide kernel command line and custom description to identify the boot option.

Please suggest the best way for this and I would make necessary changes at my end.

Thanks
Ashish

From: afish@apple.com <afish@apple.com>
Sent: Monday, November 4, 2019 10:22 PM
To: Ashish Singhal <ashishsingha@nvidia.com>
Cc: devel@edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; Mike Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH] Support skipping automatic BM enumeration

Ashish,

Just to be clear on your definition of enumerate. In this case it means the Boot Manager lib that is just one of may implementations a platform could use to manage its boot options. 3rd party code, or an OS boot loader could try to boot your handle since by definition of the UEFI spec it is a bootable device.

The simple answer is if you don't want your device to boot in normal cases, then don't add a Load File Protocol to your handle? What problem are you trying to solve?

gBS->LoadImage () supports an optional Source Buffer so you can just add a custom protocol and call your protocol to get a memory buffer and then just pass that buffer into gBS->LoadImage ()?

Thanks,

Andrew Fish


On Nov 4, 2019, at 11:06 PM, Ashish Singhal <ashishsingha@nvidia.com<mailto:ashishsingha@nvidia.com>> wrote:

Hello Andrew,

On my platform, I am installing Load File protocol on a handle which I do not want to be auto enumerated by boot manager. In order to achieve this, I submitted this match on edk2 side and have installed gEdkiiSkipBmAutoEnumerateProtocolGuid on the same handle to achieve this on platform side. If there is a different way to achieve what I am trying to do, please let me know and I would be happy to adopt that.

Thanks
Ashish

From: afish@apple.com<mailto:afish@apple.com> <afish@apple.com<mailto:afish@apple.com>>
Sent: Monday, November 4, 2019 10:01 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ashish Singhal <ashishsingha@nvidia.com<mailto:ashishsingha@nvidia.com>>
Cc: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>>; Wang, Jian J <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Gao, Zhichao <zhichao.gao@intel.com<mailto:zhichao.gao@intel.com>>; Mike Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: Re: [edk2-devel] [PATCH] Support skipping automatic BM enumeration

On Nov 4, 2019, at 9:24 PM, Ashish Singhal <ashishsingha@nvidia.com<mailto:ashishsingha@nvidia.com>> wrote:

Hi Ray,

I did not see any example with which one can tell BDS not to enumerate a boot option. Can you please point me to an example where a protocol (Block IO, Simple FS or Load File) does not get enumerated as a boot option?



Ashish,

Are you asking for example code, or reasons that you would not want to enumerate something as bootable?

Most likely if you want to have a platform policy to add gEdkiiSkipBmAutoEnumerateProtocolGuid you are going to need an EFI Driver Model driver to add it to the handle based on some platform policy. This is the only way you can filter based on things getting connected at different times during boot.

Thanks,

Andrew Fish




Thanks
Ashish

-----Original Message-----
From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Sent: Monday, November 4, 2019 7:42 PM
To: Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ashish Singhal <ashishsingha@nvidia.com<mailto:ashishsingha@nvidia.com>>; Wang, Jian J <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Gao, Zhichao <zhichao.gao@intel.com<mailto:zhichao.gao@intel.com>>
Cc: Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: RE: [edk2-devel] [PATCH] Support skipping automatic BM enumeration

+ Mike

With the UEFI driver model, if a device is not needed by booting, it can skip the connecting.
Then I do not see a need of the new protocol.

Thanks,
Ray



-----Original Message-----
From: Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>>
Sent: Thursday, October 31, 2019 6:15 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; ashishsingha@nvidia.com<mailto:ashishsingha@nvidia.com>; Wang, Jian J
<jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Ni, Ray
<ray.ni@intel.com<mailto:ray.ni@intel.com>>; Gao, Zhichao <zhichao.gao@intel.com<mailto:zhichao.gao@intel.com>>
Subject: Re: [edk2-devel] [PATCH] Support skipping automatic BM
enumeration

+Ray, +Zhichao

(although, the actual patch seems to be missing from the posting)

Thanks
Laszlo

On 10/30/19 04:47, Ashish Singhal wrote:


Right now, any and every handle with a BlockIO or SimpleFileSystem
or LoadFile protocol installed on the system is used to enumerate BM
automatically. There may be cases where on a platform, some of these
are not desirable to be enumerated automatically. This patch adds
support for skipping this automatic enumeration if on the same
handle, a new protocol defined as EdkiiSkipBmAutoEnumerate is found
to be
installed.



Ashish Singhal (1):
 MdeModulePkg/UefiBootManagerLib: Support skipping BM enumeration

.../Include/Protocol/SkipBmAutoEnumerate.h         | 25 ++++++++++++++
MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c   | 40
+++++++++++++++++++++-


.../Library/UefiBootManagerLib/InternalBm.h        |  1 +
.../UefiBootManagerLib/UefiBootManagerLib.inf      |  1 +
MdeModulePkg/MdeModulePkg.dec                      |  3 ++
5 files changed, 69 insertions(+), 1 deletion(-)  create mode
100644 MdeModulePkg/Include/Protocol/SkipBmAutoEnumerate.h


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------




[-- Attachment #2: Type: text/html, Size: 17777 bytes --]

  reply	other threads:[~2019-11-05  5:42 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  3:47 [PATCH] Support skipping automatic BM enumeration Ashish Singhal
2019-10-30  3:47 ` [PATCH] MdeModulePkg/UefiBootManagerLib: Support skipping " Ashish Singhal
2019-10-31 10:14 ` [edk2-devel] [PATCH] Support skipping automatic " Laszlo Ersek
     [not found]   ` <DM6PR12MB33249A87560B32B0155D4FE0BA630@DM6PR12MB3324.namprd12.prod.outlook.com>
2019-11-01 21:42     ` Laszlo Ersek
2019-11-01 22:05       ` Ashish Singhal
2019-11-01 22:57         ` Laszlo Ersek
2019-11-04 17:51           ` Ashish Singhal
2019-11-05  2:42   ` Ni, Ray
2019-11-05  3:24     ` Ashish Singhal
2019-11-05  5:00       ` Andrew Fish
2019-11-05  5:06         ` Ashish Singhal
2019-11-05  5:21           ` Andrew Fish
2019-11-05  5:42             ` Ashish Singhal [this message]
2019-11-05  6:15               ` Andrew Fish
2019-11-05  9:54                 ` Laszlo Ersek
2019-11-05 16:52                   ` Andrew Fish
2019-11-05 18:00                     ` Ashish Singhal
2019-11-05 19:23                       ` Laszlo Ersek
2019-11-05 23:19                         ` Jeff Brasen
2019-11-06  0:20                           ` Andrew Fish
2019-11-06  9:56                           ` Laszlo Ersek
2019-11-06 16:15                             ` Andrew Fish
2019-11-06 19:58                               ` Laszlo Ersek
2019-11-06  1:07                         ` Ashish Singhal
2019-11-06  1:34                           ` Jeff Brasen
2019-11-06  2:47                             ` Andrew Fish
2019-11-06  3:20                               ` Ni, Ray
2019-11-06 16:19                                 ` Andrew Fish
2019-11-07  4:12                                   ` Jeff Brasen
2019-11-07  6:59                                     ` Ni, Ray
2019-11-07  7:02                                       ` Jeff Brasen
2019-11-07  7:21                                         ` Ni, Ray
2019-11-07 17:46                                           ` Jeff Brasen
2019-11-08 16:37                                             ` Laszlo Ersek
2019-11-11 22:57                                               ` Jeff Brasen
2019-11-11 23:58                                                 ` Ni, Ray
2019-11-12  0:00                                                   ` Jeff Brasen
2019-11-13 18:42                                                     ` Jeff Brasen
2019-11-14  2:09                                                       ` Ni, Ray
2019-11-14 17:04                                                         ` Jeff Brasen
2019-12-10 20:46                                                           ` Jeff Brasen
2019-12-11  9:54                                                             ` [edk2-discuss] " Wang, Sunny (HPS SW)
2019-12-11 14:00                                                             ` Ni, Ray
2019-12-12 17:52                                                               ` Jeff Brasen
2019-12-17 20:15                                                                 ` Ashish Singhal
2019-12-18  3:54                                                                   ` [edk2-discuss] " Wang, Sunny (HPS SW)
2019-12-18  8:43                                                                     ` Ni, Ray
2019-11-07  7:01                                   ` Ni, Ray
2019-11-05  9:33       ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR12MB3324D16C9DC312DB99F98420BA7E0@DM6PR12MB3324.namprd12.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox