From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nbfkord-smmo02.seg.att.com (nbfkord-smmo02.seg.att.com [209.65.160.78]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3F77B81FC7 for ; Fri, 27 Jan 2017 08:51:42 -0800 (PST) Received: from unknown [193.34.186.16] (EHLO webmail.solarflare.com) by nbfkord-smmo02.seg.att.com(mxl_mta-7.2.4-7) over TLS secured channel with ESMTP id d9a7b885.0.2235300.00-2243.4665153.nbfkord-smmo02.seg.att.com (envelope-from ); Fri, 27 Jan 2017 16:51:43 +0000 (UTC) X-MXL-Hash: 588b7a9f637b8541-d8a34f456b781cf60544dc919e09feefbd9bfeff Received: from tp-desktop.uk.solarflarecom.com (10.17.20.51) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 27 Jan 2017 16:51:16 +0000 To: "edk2-devel@lists.01.org" From: "Tomas Pilar (tpilar)" Message-ID: Date: Fri, 27 Jan 2017 16:51:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 X-Originating-IP: [10.17.20.51] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-22848.003 X-TM-AS-Result: No--7.667600-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-AnalysisOut: [v=2.1 cv=ALPOwa1d c=1 sm=1 tr=0 a=8P+NB+fYZDP74ap4g4d9Kw==] X-AnalysisOut: [:17 a=uKoR9wHPcrcA:10 a=IkcTkHD0fZMA:10 a=IgFoBzBjUZAA:10 ] X-AnalysisOut: [a=qE-IBWizPUI3tqfDkRMA:9 a=7yIw4UWVU3HXKEbK:21 a=VLBGhfIqK] X-AnalysisOut: [qJTFXAr:21 a=QEXdDO2ut3YA:10] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [193.34.186.16] Subject: SNP_INIT while in TPL_NOTIFY X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2017 16:51:43 -0000 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Hi, I am currently maintaining our network driver written using the EDKII framework. Our network device implements a MCDI (mc-driver interface) which is (in theory) asynchronous (DMA doorbell-messagebox communication), although the majority of the calls take less than a jiffy. So for example, the setting up of TX and RX queues on the NIC requires some MCDI calls which the driver then has to wait for. I've implemented this using the gSB->SetTimer event system. My problem is that the SimpleNetworkInitialize() method is called by the UEFI platform network core (network core finds a new NIC with SNP -> tries to open -> not initialised, so it tries to INIT) using a TPL_NOTIFY context, where the code is not allowed to sleep (I assume that this is the MNP generic one second network poll timer). I could in theory initialise the NIC earlier, during probe, but the SNP allows for specification of extra buffer space for TX and RX during init. The network core might conceivable use that. Or the MNP might want to change station address using SNP or call for a reset which again requires asynchronous NIC operation. Has anyone encountered something similar? Is there a canonical solution to this issue? Cheers, Tomas Pilar The information contained in this message is confidential and is intended f= or the addressee(s) only. If you have received this message in error, pleas= e notify the sender immediately and delete the message. Unless you are an a= ddressee (or authorized to receive for an addressee), you may not use, copy= or disclose to anyone this message or any information contained in this me= ssage. The unauthorized use, disclosure, copying or alteration of this mess= age is strictly prohibited.