Dear UNDI and PCI developers,

UNDI defines a Map_Mem callback for mapping DMA buffers.  The SnpDxe driver 
implements this callback and converts it to a PCI_IO Map call.  If the UNDI map 
type is TO_AND_FROM_DEVICE then this results in a 
EfiPciIoOperationBusMasterCommonBuffer mapping type.

The UEFI spec states that whenever a common buffer mapping is made with PciIo 
that the buffer be allocated with the PciIo AllocateBuffer call.  However UNDI 
does not appear to have a corresponding call for a driver to allocate a common 
DMA buffer.  This means that an UNDI driver can try to make a Map_Mem call 
which results in a PCI_IO Map call that violates the AllocateBuffer rule.  
There appear to be some UNDI network drivers in existence that already exhibit 
this behavior.   Some UEFI PCI implementations do not enforce the rule that 
common buffers must be allocated through AllocateBuffer which may have led to a 
propagation of UNDI drivers with this issue.

Since this seems to be a collision between the UNDI and UEFI specifications I 
don't see a clear way out of this so I'm looking for some advice from the 
experts.

Thanks,

Eugene



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to