Hi Nainar,

 

  1. Snp->StationAddress() calls UNDI->StationAddress(). Is there a guarantee that the UNDI driver you are using will persist the configuration across driver reloads / platform reboots? If there is no such guarantee, you should not reconnect UNDI driver – else the setting is lost.
  2. Ipconfig interfaces with Ip4Config2 protocol to obtain MAC address to display.

Check “HwAddress” field in “EFI_IP4_CONFIG2_INTERFACE_INFO” structure.

It is initialized in the Ip4Dxe driver, in Ip4Config2InitIfInfo(). If you follow Ip4Config2InitIfInfo() upwards the stack, you will see that it gets called in Ip4Dxe DriverBinding->Start() function.

 

What I would suggest is to only reconnect SNP driver.

 

Thanks,

Maciej

 

From: Sivaraman Nainar <sivaramann@ami.com>
Sent: Friday, March 24, 2023 5:22 AM
To: devel@edk2.groups.io; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Rabeda, Maciej <maciej.rabeda@intel.com>; Santhosh Kumar V <santhoshkumarv@ami.com>; Raj V Akilan <rajva@ami.com>
Subject: reg: MAC address could not change on pre-boot environment and failed to PXE boot.

 

Hello :

 

We are writing a application to program the MAC from UEFI shell and with the updated MAC address trying to do the PXE Boot which failed.

 

The application uses the Simple Network Protocols StationAddress() to update the MAC. After update the Current Address in the Mode of SimpleNetwork Interface updated to new MAC address. If we performed IfConfigl -l command the updated MAC not showing. Also in this environment PXE boot also got failed.

 

To bind the updated MAC, tried giving "reconnect -r" from UEFI shell after running test application and performed PXE boot. With On board Network controller (Intel I219), the MAC address updated in Snp->Mode->CurrentAddress is reverted back to older MAC address.  If reconnect not performed, the MAC Address changing but PXE Failed to boot.

 

Can someone comment if the method to update the MAC is correct or we missing something.

 

Thanks

Siva

-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.


Intel Technology Poland sp. z o.o.
ul. Słowackiego 173 | 80-298 Gdańsk | Sąd Rejonowy Gdańsk Północ | VII Wydział Gospodarczy Krajowego Rejestru Sądowego - KRS 101882 | NIP 957-07-52-316 | Kapitał zakładowy 200.000 PLN.
Spółka oświadcza, że posiada status dużego przedsiębiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdziałaniu nadmiernym opóźnieniom w transakcjach handlowych.

Ta wiadomość wraz z załącznikami jest przeznaczona dla określonego adresata i może zawierać informacje poufne. W razie przypadkowego otrzymania tej wiadomości, prosimy o powiadomienie nadawcy oraz trwałe jej usunięcie; jakiekolwiek przeglądanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.