[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [edk2] [grub PATCH] efinet: disable MNP background polling
From: |
Ye, Ting |
Subject: |
RE: [edk2] [grub PATCH] efinet: disable MNP background polling |
Date: |
Wed, 14 Oct 2015 08:00:39 +0000 |
Could you please describe the details how does GRUB use UEFI network protocols?
I see the thread says that EXCLUSIVE open SNP causes PXE boot fail.
If you read below description about 'EXCLUSIVE' in UEFI specification, you will
find when GRUB exclusive opens SNP protocol, the UEFI will remove any drivers
that opened SNP with BY_DRIVER by calling the driver's Stop() function. In UEFI
network stack, MNP driver will open SNP 'BY_DRIVER'. So if GRUB/iPXE exclusive
opens SNP, MNP will uninstall itself and the whole UEFI network stack is
disconnected except SNP and UNDI. Hence, the UEFI PXE no longer work.
>> EXCLUSIVE Used by applications to gain exclusive access to a
>> protocol interface.
>> If any drivers have the protocol interface opened with
>> an attribute of BY_DRIVER,
>> then an attempt will be made to remove them by calling
>> the driver's Stop() function.
If GRUB would like to call SNP protocol only, it should use EXCLUSIVE open to
gain the exclusive access and disconnect UEFI network stack since MNP. Then the
MNP background polling is also disabled.
If GRUB still needs UEFI PXE capability, it should utilize PXE base code
protocol to continue the process, rather than calling SNP, as SNP is already
consumed by UEFI network stack.
Thanks,
Ye Ting
-----Original Message-----
From: edk2-devel [mailto:address@hidden On Behalf Of Andrei Borzenkov
Sent: Wednesday, October 14, 2015 2:58 PM
To: Ye, Ting; Laszlo Ersek; address@hidden; address@hidden
Cc: edk2-devel-01; Mark Salter; address@hidden; address@hidden; address@hidden
Subject: Re: [edk2] [grub PATCH] efinet: disable MNP background polling
14.10.2015 09:15, Ye, Ting пишет:
> May I know the details what problems it causes in some cases?
>
One is being discussed in this thread:
http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00013.html
http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00068.html
Another was reported recently:
http://lists.gnu.org/archive/html/help-grub/2015-09/msg00033.html
http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00071.html
> Thanks,
> Ye Ting
>
> -----Original Message-----
> From: Andrei Borzenkov [mailto:address@hidden
> Sent: Wednesday, October 14, 2015 1:58 PM
> To: Ye, Ting; Laszlo Ersek; address@hidden; address@hidden
> Cc: address@hidden; edk2-devel-01; address@hidden; address@hidden; Mark Salter
> Subject: Re: [edk2] [grub PATCH] efinet: disable MNP background polling
>
> 14.10.2015 08:19, Ye, Ting пишет:
>> Hi all,
>>
>> If I understand the issue correctly, I don't quite agree that UEFI spec is
>> imprecise about SNP constraints described as following.
>> The "constraint" described here is that the grub should use attribute
>> "EXCLUSIVE" to open SNP protocol to gain exclusive access. This usage is
>> clearly described in page 184, chapter 6.3 EFI_BOOT_SERVICES.OpenProtocol().
>>
>> EXCLUSIVE Used by applications to gain exclusive access to a
>> protocol interface.
>> If any drivers have the protocol interface opened with
>> an attribute of BY_DRIVER,
>> then an attempt will be made to remove them by calling
>> the driver's Stop() function.
>>
>> The grub code should not assume that the SNP is not occupied by other
>> drivers, instead, it should use EXCLUSIVE to open SNP protocol, or to be
>> more precise, use OpenProtocolInformation() to check whether SNP is already
>> opened by other driver, then decide whether need to use EXCLUSIVE to
>> disconnect the other drivers. This is the typical usage for all UEFI
>> protocol, not particular constraints to SNP protocol.
>>
>
> That is exactly what grub currently does - it opens SNP exclusively.
> Apparently it is causing problems in some cases.
>
_______________________________________________
edk2-devel mailing list
address@hidden
https://lists.01.org/mailman/listinfo/edk2-devel
- Re: [grub PATCH] efinet: disable MNP background polling, (continued)
- Re: [grub PATCH] efinet: disable MNP background polling, HATAYAMA Daisuke, 2015/10/09
- Re: [grub PATCH] efinet: disable MNP background polling, Daniel Kiper, 2015/10/15
- Re: [grub PATCH] efinet: disable MNP background polling, Laszlo Ersek, 2015/10/15
- Re: [grub PATCH] efinet: disable MNP background polling, Daniel Kiper, 2015/10/13
- Re: [grub PATCH] efinet: disable MNP background polling, Seth Goldberg, 2015/10/13
- RE: [edk2] [grub PATCH] efinet: disable MNP background polling, Ye, Ting, 2015/10/14
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Andrei Borzenkov, 2015/10/14
- RE: [edk2] [grub PATCH] efinet: disable MNP background polling, Ye, Ting, 2015/10/14
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Andrei Borzenkov, 2015/10/15
- RE: [edk2] [grub PATCH] efinet: disable MNP background polling,
Ye, Ting <=
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Andrei Borzenkov, 2015/10/15
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Daniel Kiper, 2015/10/14
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Seth Goldberg, 2015/10/14
- RE: [edk2] [grub PATCH] efinet: disable MNP background polling, Ye, Ting, 2015/10/14
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Laszlo Ersek, 2015/10/15
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Andrew Fish, 2015/10/16
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Michael Brown, 2015/10/15
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Laszlo Ersek, 2015/10/15
- Re: [edk2] [grub PATCH] efinet: disable MNP background polling, Vladimir 'φ-coder/phcoder' Serbinenko, 2015/10/29
Re: [PATCH] efinet: disable MNP background polling, Andrei Borzenkov, 2015/10/08