Hi, As per UEFI Spec 2.4A PXE_OPFLAGS_STATION_ADDRESS_READ and PXE_OPFLAG_STATION_ADDRESS_WRITE flags are 0x0000. To differentiate among them you need to check "Cdb->CPBaddr" in your UNDI code.
Please see UEFI specification 2.4 Errata A, Section E.3.4 Page No 1972. Thanks and Regards, Shiva On Tue, Mar 11, 2014 at 1:13 PM, Li, Ruth <ruth...@intel.com> wrote: > Hi Ari, > > > > I tend to agree with your assessment. > > > > At the same time, I checked UEFI/code again. It turns out the > PXE_OPFLAGS_STATION_ADDRESS_READ and PXE_OPFLAG_STATION_ADDRESS_WRITE are > both defined as zero. > > So, using current BIOS FW, I thought there'll be no actual functionality > impact if you pass PXE_OPFLAGS_STATION_ADDRESS_WRITE. > > > > Thanks, > > Ruth > > *From:* Ari Zigler [mailto:a...@mellanox.com] > *Sent:* Tuesday, March 11, 2014 2:39 PM > > *To:* edk2-devel@lists.sourceforge.net > *Cc:* Haggai Eran > *Subject:* Re: [edk2] > MdeModulePkg/Universal/Network/SnpDxp/Station_address.c > > > > Hi Ruth, > > > > Yes, I'm developing a UNDI driver for our device. > > The bellow code, if integrated into a BIOS FW, do cause me an issue as it > implies that there is no need to pass PXE_OPFLAGS_STATION_ADDRESS_WRITE > whereas > my driver expects this kind of flag in order to perform SetAddress(). With > the current implementation, calling to SetStationAddress on the SNP driver > will not be processed by our UNDI driver. > > I tend to think that this code is not aligned to UNDI spec. > > > > Ari > > > > *From:* Li, Ruth [mailto:ruth...@intel.com <ruth...@intel.com>] > *Sent:* Tuesday, March 11, 2014 5:14 AM > *To:* edk2-devel@lists.sourceforge.net > *Cc:* Haggai Eran > *Subject:* Re: [edk2] > MdeModulePkg/Universal/Network/SnpDxp/Station_address.c > > > > Ari, > > > > Below piece of code has been here for many years, the purpose of the > comment seems to remind the operation result for some UNDI implementation. > > > > Are you development UNDI driver for some device? Whether below code bring > any issue to you? > > > > Thanks, > > Ruth > > *From:* Ari Zigler [mailto:a...@mellanox.com <a...@mellanox.com>] > *Sent:* Sunday, March 09, 2014 6:07 PM > *To:* edk2-devel@lists.sourceforge.net > *Cc:* Haggai Eran > *Subject:* [edk2] MdeModulePkg/Universal/Network/SnpDxp/Station_address.c > > > > Hi, > > > > I found this weird comment (and consequent behavior) in the SnpDxe > PxeSetStnAddr() implementation: > > EFI_STATUS > > PxeSetStnAddr ( > > SNP_DRIVER *Snp, > > EFI_MAC_ADDRESS *NewMacAddr > > ) > > { > > ... > > ... > > Snp->Cdb.OpFlags = PXE_OPFLAGS_STATION_ADDRESS_READ; > > // > > // even though the OPFLAGS are set to READ, supplying a new address > > // in the CPB will make undi change the mac address to the new one. > > // > > CopyMem (&Cpb->StationAddr, NewMacAddr, Snp->Mode.HwAddressSize); > > > > Snp->Cdb.CPBsize = (UINT16) sizeof (PXE_CPB_STATION_ADDRESS); > > Snp->Cdb.CPBaddr = (UINT64)(UINTN) Cpb; > > } > > ... > > ... > > } > > > > I looked through the UNDI section in the UEFI 2.4A spec for a statement > declaring that once a CPB is present UNDI corresponding StationAddress() > shall set the current mac address to the address specified in the CPB > struct, but my efforts were in vain. > > > > Can anyone refute (or substantiate) this claim? > > > > Thanks, > > > > Ari > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > > -- Thanks and Regards, Shiva.
<<inline: image001.png>>
------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel