summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-13 09:08:17 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-13 09:08:17 +0000
commit41057d7787037c9f103046251cfe9bf80dd027f6 (patch)
treed282f8003f4295d13a7966e4ef5f53797bb0890a /MdeModulePkg/Bus
parentcfe9de52447337bd470bd831080f5671ed979fe6 (diff)
downloadedk2-platforms-41057d7787037c9f103046251cfe9bf80dd027f6.tar.xz
Remove gEfiNetworkInterfaceIdentifierProtocolGuid reference from code base. Only left its definition in MdePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4295 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c57
-rw-r--r--MdeModulePkg/Bus/Pci/UndiRuntimeDxe/E100b.h4
-rw-r--r--MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c47
-rw-r--r--MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Undi32.h9
-rw-r--r--MdeModulePkg/Bus/Pci/UndiRuntimeDxe/UndiRuntimeDxe.inf9
5 files changed, 21 insertions, 105 deletions
diff --git a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
index cb7fa89749..3e81c9eab7 100644
--- a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
+++ b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
@@ -1290,52 +1290,6 @@ Returns:
return ;
}
-VOID
-UNDI_APIEntry_old (
- IN UINT64 cdb
- )
-/*++
-
-Routine Description:
- This is the main SW UNDI API entry using the older nii protocol.
- The parameter passed in is a 64 bit flat model virtual
- address of the cdb. We then jump into the common routine for both old and
- new nii protocol entries.
-
-Arguments:
- CdbPtr - Pointer to the command descriptor block.
- AdapterInfo - Pointer to the NIC data structure information which the UNDI driver is layering on..
-
-Returns:
- None
-
---*/
-// TODO: cdb - add argument and description to function comment
-{
- PXE_CDB *CdbPtr;
- NIC_DATA_INSTANCE *AdapterInfo;
-
- if (cdb == (UINT64) 0) {
- return ;
-
- }
-
- CdbPtr = (PXE_CDB *) (UINTN) cdb;
-
- if (CdbPtr->IFnum >= pxe->IFcnt) {
- CdbPtr->StatFlags = PXE_STATFLAGS_COMMAND_FAILED;
- CdbPtr->StatCode = PXE_STATCODE_INVALID_CDB;
- return ;
- }
-
- AdapterInfo = &(UNDI32DeviceList[CdbPtr->IFnum]->NicInfo);
-
- //
- // entering from older entry point
- //
- AdapterInfo->VersionFlag = 0x30;
- UNDI_APIEntry_Common (cdb);
-}
VOID
UNDI_APIEntry_new (
@@ -1580,8 +1534,7 @@ Returns:
VOID
PxeStructInit (
- IN PXE_SW_UNDI *PxePtr,
- IN UINTN VersionFlag
+ IN PXE_SW_UNDI *PxePtr
)
/*++
@@ -1629,12 +1582,8 @@ Returns:
PXE_ROMID_IMP_SOFTWARE_INT_SUPPORTED |
PXE_ROMID_IMP_PACKET_RX_INT_SUPPORTED;
- if (VersionFlag == 0x30) {
- PxePtr->EntryPoint = (UINT64) UNDI_APIEntry_old;
- } else {
- PxePtr->EntryPoint = (UINT64) UNDI_APIEntry_new;
- PxePtr->MinorVer = PXE_ROMID_MINORVER_31;
- }
+ PxePtr->EntryPoint = (UINT64) UNDI_APIEntry_new;
+ PxePtr->MinorVer = PXE_ROMID_MINORVER_31;
PxePtr->reserved2[0] = 0;
PxePtr->reserved2[1] = 0;
diff --git a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/E100b.h b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/E100b.h
index 80c90b5a6f..d1107ddba7 100644
--- a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/E100b.h
+++ b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/E100b.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, 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
@@ -630,7 +630,7 @@ typedef struct s_data_instance {
UINT8 Rx_Filter;
UINT8 VersionFlag; // UNDI30 or UNDI31??
UINT8 rsvd[3];
-
+
struct mc{
UINT16 reserved [3]; // padding for this structure to make it 8 byte aligned
UINT16 list_len;
diff --git a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c
index 3e3391ebee..b79c5fe7a6 100644
--- a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c
+++ b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, 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
@@ -26,10 +26,9 @@ Revision History
//
// Global Variables
//
-PXE_SW_UNDI *pxe = 0; // 3.0 entry point
-PXE_SW_UNDI *pxe_31 = 0; // 3.1 entry
-UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
+PXE_SW_UNDI *pxe_31 = NULL; // 3.1 entry
+UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
NII_TABLE *UndiDataPointer = NULL;
VOID
@@ -381,16 +380,10 @@ Returns:
} else {
pxe_31 = (PXE_SW_UNDI *) TmpPxePointer;
}
- //
- // assuming that the sizeof pxe_31 is a 16 byte multiple
- //
- pxe = (PXE_SW_UNDI *) ((CHAR8 *) (pxe_31) + sizeof (PXE_SW_UNDI));
- PxeStructInit (pxe, 0x30);
- PxeStructInit (pxe_31, 0x31);
+ PxeStructInit (pxe_31);
}
- UNDI32Device->NIIProtocol.ID = (UINT64) (UINTN) (pxe);
UNDI32Device->NIIProtocol_31.ID = (UINT64) (UINTN) (pxe_31);
Status = PciIoFncs->Attributes (
@@ -454,15 +447,13 @@ Returns:
// the IfNum index for the current interface will be the total number
// of interfaces initialized so far
//
- UNDI32Device->NIIProtocol.IfNum = pxe->IFcnt;
UNDI32Device->NIIProtocol_31.IfNum = pxe_31->IFcnt;
- PxeUpdate (&UNDI32Device->NicInfo, pxe);
PxeUpdate (&UNDI32Device->NicInfo, pxe_31);
- UNDI32Device->NicInfo.Io_Function = PciIoFncs;
- UNDI32DeviceList[UNDI32Device->NIIProtocol.IfNum] = UNDI32Device;
- UNDI32Device->Undi32BaseDevPath = UndiDevicePath;
+ UNDI32Device->NicInfo.Io_Function = PciIoFncs;
+ UNDI32DeviceList[UNDI32Device->NIIProtocol_31.IfNum] = UNDI32Device;
+ UNDI32Device->Undi32BaseDevPath = UndiDevicePath;
Status = AppendMac2DevPath (
&UNDI32Device->Undi32DevPath,
@@ -476,19 +467,6 @@ Returns:
UNDI32Device->Signature = UNDI_DEV_SIGNATURE;
- UNDI32Device->NIIProtocol.Revision = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION;
- UNDI32Device->NIIProtocol.Type = EfiNetworkInterfaceUndi;
- UNDI32Device->NIIProtocol.MajorVer = PXE_ROMID_MAJORVER;
- UNDI32Device->NIIProtocol.MinorVer = PXE_ROMID_MINORVER;
- UNDI32Device->NIIProtocol.ImageSize = 0;
- UNDI32Device->NIIProtocol.ImageAddr = 0;
- UNDI32Device->NIIProtocol.Ipv6Supported = FALSE;
-
- UNDI32Device->NIIProtocol.StringId[0] = 'U';
- UNDI32Device->NIIProtocol.StringId[1] = 'N';
- UNDI32Device->NIIProtocol.StringId[2] = 'D';
- UNDI32Device->NIIProtocol.StringId[3] = 'I';
-
UNDI32Device->NIIProtocol_31.Revision = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION_31;
UNDI32Device->NIIProtocol_31.Type = EfiNetworkInterfaceUndi;
UNDI32Device->NIIProtocol_31.MajorVer = PXE_ROMID_MAJORVER;
@@ -511,8 +489,6 @@ Returns:
&UNDI32Device->DeviceHandle,
&gEfiNetworkInterfaceIdentifierProtocolGuid_31,
&UNDI32Device->NIIProtocol_31,
- &gEfiNetworkInterfaceIdentifierProtocolGuid,
- &UNDI32Device->NIIProtocol,
&gEfiDevicePathProtocolGuid,
UNDI32Device->Undi32DevPath,
NULL
@@ -557,19 +533,16 @@ UndiErrorAllocDataPointer:
&UNDI32Device->DeviceHandle,
&gEfiNetworkInterfaceIdentifierProtocolGuid_31,
&UNDI32Device->NIIProtocol_31,
- &gEfiNetworkInterfaceIdentifierProtocolGuid,
- &UNDI32Device->NIIProtocol,
&gEfiDevicePathProtocolGuid,
UNDI32Device->Undi32DevPath,
NULL
);
UndiErrorDeleteDevicePath:
- UNDI32DeviceList[UNDI32Device->NIIProtocol.IfNum] = NULL;
+ UNDI32DeviceList[UNDI32Device->NIIProtocol_31.IfNum] = NULL;
gBS->FreePool (UNDI32Device->Undi32DevPath);
UndiErrorDeletePxe:
- PxeUpdate (NULL, pxe);
PxeUpdate (NULL, pxe_31);
if (TmpPxePointer != NULL) {
gBS->FreePool (TmpPxePointer);
@@ -673,7 +646,7 @@ Returns:
Status = gBS->OpenProtocol (
ChildHandleBuffer[Index],
- &gEfiNetworkInterfaceIdentifierProtocolGuid,
+ &gEfiNetworkInterfaceIdentifierProtocolGuid_31,
(VOID **) &NIIProtocol,
This->DriverBindingHandle,
Controller,
@@ -707,8 +680,6 @@ Returns:
UNDI32Device->Undi32DevPath,
&gEfiNetworkInterfaceIdentifierProtocolGuid_31,
&UNDI32Device->NIIProtocol_31,
- &gEfiNetworkInterfaceIdentifierProtocolGuid,
- &UNDI32Device->NIIProtocol,
NULL
);
diff --git a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Undi32.h b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Undi32.h
index 12691bb1f0..32f80fa8f2 100644
--- a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Undi32.h
+++ b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Undi32.h
@@ -1,7 +1,7 @@
/*++
-Copyright (c) 2006, Intel Corporation.
+Copyright (c) 2006 - 2007, 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
@@ -61,12 +61,11 @@ Revision History
#define MUST_BE_INITIALIZED 2
#define UNDI_DEV_SIGNATURE EFI_SIGNATURE_32('u','n','d','i')
-#define UNDI_DEV_FROM_THIS(a) CR(a, UNDI32_DEV, NIIProtocol, UNDI_DEV_SIGNATURE)
+#define UNDI_DEV_FROM_THIS(a) CR(a, UNDI32_DEV, NIIProtocol_31, UNDI_DEV_SIGNATURE)
#define UNDI_DEV_FROM_NIC(a) CR(a, UNDI32_DEV, NicInfo, UNDI_DEV_SIGNATURE)
typedef struct {
UINTN Signature;
- EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL NIIProtocol;
EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL NIIProtocol_31;
EFI_HANDLE DeviceHandle;
EFI_DEVICE_PATH_PROTOCOL *Undi32BaseDevPath;
@@ -110,7 +109,6 @@ typedef VOID (*unmap_mem)(UINT64, UINT64, UINT32, UINT32, UINT64);
typedef VOID (*sync_mem)(UINT64, UINT64, UINT32, UINT32, UINT64);
extern UNDI_CALL_TABLE api_table[];
-extern PXE_SW_UNDI *pxe; // !pxe structure
extern PXE_SW_UNDI *pxe_31; // !pxe structure for 3.1 drivers
extern UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
@@ -362,13 +360,12 @@ UNDI_Receive (
);
VOID UNDI_APIEntry_new(UINT64);
-VOID UNDI_APIEntry_old(UINT64);
VOID UNDI_APIEntry_Common(UINT64);
PXE_IPV4 convert_mcip(PXE_MAC_ADDR *);
INT32 validate_mcip (PXE_MAC_ADDR *MCastAddr);
-VOID PxeStructInit (PXE_SW_UNDI *PxePtr, UINTN VersionFlag);
+VOID PxeStructInit (PXE_SW_UNDI *PxePtr);
VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);
#endif
diff --git a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/UndiRuntimeDxe.inf b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/UndiRuntimeDxe.inf
index fc500c6a98..5dc37e1bc5 100644
--- a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/UndiRuntimeDxe.inf
+++ b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/UndiRuntimeDxe.inf
@@ -51,13 +51,12 @@
[Guids]
- gEfiEventExitBootServicesGuid
- gEfiEventVirtualAddressChangeGuid
+ gEfiEventExitBootServicesGuid
+ gEfiEventVirtualAddressChangeGuid
[Protocols]
gEfiNetworkInterfaceIdentifierProtocolGuid_31
- gEfiNetworkInterfaceIdentifierProtocolGuid
- gEfiPciIoProtocolGuid
- gEfiDevicePathProtocolGuid
+ gEfiPciIoProtocolGuid
+ gEfiDevicePathProtocolGuid