From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZmF4w-0005M1-TD for mharc-grub-devel@gnu.org; Wed, 14 Oct 2015 01:58:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmF4O-0005H4-Ss for grub-devel@gnu.org; Wed, 14 Oct 2015 01:57:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmF4L-00078W-NR for grub-devel@gnu.org; Wed, 14 Oct 2015 01:57:48 -0400 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:33340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmF4L-00078H-GW for grub-devel@gnu.org; Wed, 14 Oct 2015 01:57:45 -0400 Received: by lbbpp2 with SMTP id pp2so9322468lbb.0 for ; Tue, 13 Oct 2015 22:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=mev0yyuXZZXb7NDEcnnMWM/RZ3T4l4joAQhxdDQpWlk=; b=X1OcVRooqRbl0jyM/ZK2Xy/8TeZbpEWhU4WSYdZgVZBN9BBXI56FXlXxKhCSbQuixb 7GvfDUtmErIfc4e2cmDM8t/5jO0SQP0SqsO0ydlod8wSS0lCuOiv1+imHit3u3sufyew c9FIrl+F6cvLn3K3TlWdIU8jaBefDqzkEmdOngv/a9T2jImcEyndaX4ofD5g5dBQvrix /s52szwtsGdBvr/2AvmYl00lI/MkxL0bVRPXFRmmN53b3WuCvzBykKQKOxFIbXsLBojj tGin/9VLViJaM95n8Tqb+K6AkKisiuuZitSmVqo2FQ1AyOD9QVadNywZOZvTYrEPXumv L4jQ== X-Received: by 10.112.163.99 with SMTP id yh3mr555959lbb.121.1444802264348; Tue, 13 Oct 2015 22:57:44 -0700 (PDT) Received: from [192.168.1.43] (ppp91-76-142-206.pppoe.mtu-net.ru. [91.76.142.206]) by smtp.gmail.com with ESMTPSA id ut10sm1045638lbc.31.2015.10.13.22.57.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 22:57:43 -0700 (PDT) Subject: Re: [edk2] [grub PATCH] efinet: disable MNP background polling To: "Ye, Ting" , Laszlo Ersek , "daniel.kiper@oracle.com" , "grub-devel@gnu.org" References: <20151001.182655.371384337.d.hatayama@jp.fujitsu.com> <560D1E07.3090902@redhat.com> <20151013214919.GA6140@router-fw-old.local.net-space.pl> <561D83E9.6050703@redhat.com> From: Andrei Borzenkov Message-ID: <561DEED6.7050601@gmail.com> Date: Wed, 14 Oct 2015 08:57:42 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::233 Cc: edk2-devel-01 , Mark Salter , "glin@suse.com" , "seth.goldberg@oracle.com" X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 05:57:49 -0000 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.