public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* SNP_INIT while in TPL_NOTIFY
@ 2017-01-27 16:51 Tomas Pilar (tpilar)
  2017-01-27 18:12 ` Laszlo Ersek
  0 siblings, 1 reply; 7+ messages in thread
From: Tomas Pilar (tpilar) @ 2017-01-27 16:51 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

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 for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-07  3:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 16:51 SNP_INIT while in TPL_NOTIFY Tomas Pilar (tpilar)
2017-01-27 18:12 ` Laszlo Ersek
2017-01-30 10:51   ` Tomas Pilar (tpilar)
2017-01-30 17:51   ` Andrew Fish
2017-02-06  6:10   ` Ye, Ting
2017-02-06 14:58     ` Tomas Pilar (tpilar)
2017-02-07  3:31       ` Ye, Ting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox