X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OptionRomPkg%2FUndiRuntimeDxe%2FInit.c;fp=OptionRomPkg%2FUndiRuntimeDxe%2FInit.c;h=9410fe167a48dcb508157452144e8a71f6392056;hp=3d0a3de5cb3fe14577dbcc8239306d7737a0a090;hb=61f2ab909d473aaf6faa278424287685a2c502fe;hpb=2e969d2e9e98820a136002699ff1d02ba2a2f551 diff --git a/OptionRomPkg/UndiRuntimeDxe/Init.c b/OptionRomPkg/UndiRuntimeDxe/Init.c index 3d0a3de5cb..9410fe167a 100644 --- a/OptionRomPkg/UndiRuntimeDxe/Init.c +++ b/OptionRomPkg/UndiRuntimeDxe/Init.c @@ -1,7 +1,7 @@ /** @file Initialization functions for EFI UNDI32 driver. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -64,7 +64,7 @@ UndiNotifyVirtual ( // // UNDI32DeviceList is an array of pointers // - for (Index = 0; Index < pxe_31->IFcnt; Index++) { + for (Index = 0; Index < (pxe_31->IFcnt | pxe_31->IFcntExt << 8); Index++) { UNDI32DeviceList[Index]->NIIProtocol_31.Id = (UINT64) (UINTN) Pxe31Pointer; EfiConvertPointer ( EFI_OPTIONAL_PTR, @@ -409,7 +409,7 @@ UndiDriverStart ( // the IfNum index for the current interface will be the total number // of interfaces initialized so far // - UNDI32Device->NIIProtocol_31.IfNum = pxe_31->IFcnt; + UNDI32Device->NIIProtocol_31.IfNum = pxe_31->IFcnt | pxe_31->IFcntExt << 8; PxeUpdate (&UNDI32Device->NicInfo, pxe_31); @@ -470,7 +470,7 @@ UndiDriverStart ( goto UndiErrorDeleteDevicePath; } - Len = (pxe_31->IFcnt * sizeof (UndiDataPointer->NII_entry)) + sizeof (UndiDataPointer); + Len = ((pxe_31->IFcnt|pxe_31->IFcntExt << 8)* sizeof (UndiDataPointer->NII_entry)) + sizeof (UndiDataPointer); Status = gBS->AllocatePool (EfiRuntimeServicesData, Len, (VOID **) &UndiDataPointer); if (EFI_ERROR (Status)) { @@ -949,10 +949,10 @@ InstallConfigTable ( UndiData = (UNDI_CONFIG_TABLE *)UndiDataPointer; - UndiData->NumberOfInterfaces = pxe_31->IFcnt; + UndiData->NumberOfInterfaces = (pxe_31->IFcnt | pxe_31->IFcntExt << 8); UndiData->nextlink = NULL; - for (Index = 0; Index < pxe_31->IFcnt; Index++) { + for (Index = 0; Index < (pxe_31->IFcnt | pxe_31->IFcntExt << 8); Index++) { UndiData->NII_entry[Index].NII_InterfacePointer = &UNDI32DeviceList[Index]->NIIProtocol_31; UndiData->NII_entry[Index].DevicePathPointer = UNDI32DeviceList[Index]->Undi32DevPath; }