]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/SnpDxe/transmit.c
Remove gEfiNetworkInterfaceIdentifierProtocolGuid reference from code base. Only...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / SnpDxe / transmit.c
index d113edec962b70087246f27ad86886440d001492..8ee0cad566632a2aeffac06347233d8670be9172 100644 (file)
@@ -52,9 +52,6 @@ pxe_fillheader (
   )\r
 {\r
   PXE_CPB_FILL_HEADER_FRAGMENTED  *cpb;\r
-  EFI_STATUS                      Status;\r
-  struct s_v2p                    *pkt_v2p;\r
-  UINT64                          TempData;\r
 \r
   cpb = snp->cpb;\r
   if (SourceAddrPtr) {\r
@@ -95,35 +92,6 @@ pxe_fillheader (
 \r
   cpb->FragDesc[0].reserved = cpb->FragDesc[1].reserved = 0;\r
 \r
-  if (snp->IsOldUndi) {\r
-    TempData = (UINT64) (UINTN) MacHeaderPtr;\r
-    if (TempData >= FOUR_GIGABYTES) {\r
-      cpb->FragDesc[0].FragAddr = (UINT64) (UINTN) snp->fill_hdr_buf;\r
-      cpb->FragDesc[0].FragLen  = (UINT32) snp->init_info.MediaHeaderLen;\r
-    }\r
-\r
-    TempData = (UINT64) (UINTN) (BufferPtr);\r
-    if (TempData >= FOUR_GIGABYTES) {\r
-      //\r
-      // Let the device just read this buffer\r
-      //\r
-      Status = add_v2p (\r
-                &pkt_v2p,\r
-                EfiPciIoOperationBusMasterRead,\r
-                BufferPtr,\r
-                BufferLength\r
-                );\r
-      if (Status != EFI_SUCCESS) {\r
-        return Status;\r
-      }\r
-      //\r
-      // give the virtual address to UNDI and it will call back on Virt2Phys\r
-      // to get the mapped address, if it needs it\r
-      //\r
-      cpb->FragDesc[1].FragLen = (UINT32) pkt_v2p->bsize;\r
-    }\r
-  }\r
-\r
   snp->cdb.OpCode     = PXE_OPCODE_FILL_HEADER;\r
   snp->cdb.OpFlags    = PXE_OPFLAGS_FILL_HEADER_FRAGMENTED;\r
 \r
@@ -145,24 +113,6 @@ pxe_fillheader (
 \r
   (*snp->issue_undi32_command) ((UINT64) (UINTN) &snp->cdb);\r
 \r
-  if (snp->IsOldUndi) {\r
-    TempData = (UINT64) (UINTN) (BufferPtr);\r
-    if (TempData >= FOUR_GIGABYTES) {\r
-      del_v2p (BufferPtr);\r
-    }\r
-    //\r
-    // if we used the global buffer for header, copy the contents\r
-    //\r
-    TempData = (UINT64) (UINTN) MacHeaderPtr;\r
-    if (TempData >= FOUR_GIGABYTES) {\r
-      CopyMem (\r
-        MacHeaderPtr,\r
-        snp->fill_hdr_buf,\r
-        snp->init_info.MediaHeaderLen\r
-        );\r
-    }\r
-  }\r
-\r
   switch (snp->cdb.StatCode) {\r
   case PXE_STATCODE_SUCCESS:\r
     return EFI_SUCCESS;\r
@@ -211,32 +161,10 @@ pxe_transmit (
 {\r
   PXE_CPB_TRANSMIT  *cpb;\r
   EFI_STATUS        Status;\r
-  struct s_v2p      *v2p;\r
-  UINT64            TempData;\r
 \r
   cpb             = snp->cpb;\r
   cpb->FrameAddr  = (UINT64) (UINTN) BufferPtr;\r
   cpb->DataLen    = (UINT32) BufferLength;\r
-  \r
-  TempData = (UINT64) (UINTN) BufferPtr;\r
-  if (snp->IsOldUndi && (TempData >= FOUR_GIGABYTES)) {\r
-    //\r
-    // we need to create a mapping now and give it to the undi when it calls\r
-    // the Virt2Phys on this address.\r
-    // this is a transmit, just map it for the device to READ\r
-    //\r
-    Status = add_v2p (\r
-              &v2p,\r
-              EfiPciIoOperationBusMasterRead,\r
-              BufferPtr,\r
-              BufferLength\r
-              );\r
-    if (Status != EFI_SUCCESS) {\r
-      return Status;\r
-    }\r
-\r
-    cpb->DataLen = (UINT32) v2p->bsize;\r
-  }\r
 \r
   cpb->MediaheaderLen = 0;\r
   cpb->reserved       = 0;\r