VirtualBox

Ignore:
Timestamp:
Mar 12, 2019 12:40:12 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129295
Message:

EFI: First step in UDK2018 merge. Does not build yet.

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/CpuIoPei/CpuIoPei.c

    r58466 r77662  
    33
    44Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
     5Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
     6
    57This program and the accompanying materials
    68are licensed and made available under the terms and conditions of the BSD License
     
    376378  OutStride = mOutStride[Width];
    377379  OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);
     380
     381  //
     382  // Fifo operations supported for (mInStride[Width] == 0)
     383  //
     384  if (InStride == 0) {
     385    switch (OperationWidth) {
     386    case EfiPeiCpuIoWidthUint8:
     387      IoReadFifo8 ((UINTN)Address, Count, Buffer);
     388      return EFI_SUCCESS;
     389    case EfiPeiCpuIoWidthUint16:
     390      IoReadFifo16 ((UINTN)Address, Count, Buffer);
     391      return EFI_SUCCESS;
     392    case EfiPeiCpuIoWidthUint32:
     393      IoReadFifo32 ((UINTN)Address, Count, Buffer);
     394      return EFI_SUCCESS;
     395    default:
     396      //
     397      // The CpuIoCheckParameter call above will ensure that this
     398      // path is not taken.
     399      //
     400      ASSERT (FALSE);
     401      break;
     402    }
     403  }
     404
    378405  Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);
    379406  for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {
     
    448475  OutStride = mOutStride[Width];
    449476  OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);
     477
     478  //
     479  // Fifo operations supported for (mInStride[Width] == 0)
     480  //
     481  if (InStride == 0) {
     482    switch (OperationWidth) {
     483    case EfiPeiCpuIoWidthUint8:
     484      IoWriteFifo8 ((UINTN)Address, Count, Buffer);
     485      return EFI_SUCCESS;
     486    case EfiPeiCpuIoWidthUint16:
     487      IoWriteFifo16 ((UINTN)Address, Count, Buffer);
     488      return EFI_SUCCESS;
     489    case EfiPeiCpuIoWidthUint32:
     490      IoWriteFifo32 ((UINTN)Address, Count, Buffer);
     491      return EFI_SUCCESS;
     492    default:
     493      //
     494      // The CpuIoCheckParameter call above will ensure that this
     495      // path is not taken.
     496      //
     497      ASSERT (FALSE);
     498      break;
     499    }
     500  }
     501
    450502  Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);
    451503  for (Uint8Buffer = (UINT8 *)Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette