VirtualBox

Ignore:
Timestamp:
Mar 12, 2019 12:40:12 PM (6 years ago)
Author:
vboxsync
Message:

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

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

Legend:

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

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

    r58466 r77662  
    22  Produces the CPU I/O 2 Protocol.
    33
    4 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
     4Copyright (c) 2009 - 2017, 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
     
    140142  // Check to see if Address is aligned
    141143  //
    142   if ((Address & (UINT64)(mInStride[Width] - 1)) != 0) {
     144  if ((Address & ((UINT64)mInStride[Width] - 1)) != 0) {
    143145    return EFI_UNSUPPORTED;
    144146  }
     
    411413  OutStride = mOutStride[Width];
    412414  OperationWidth = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
     415
     416  //
     417  // Fifo operations supported for (mInStride[Width] == 0)
     418  //
     419  if (InStride == 0) {
     420    switch (OperationWidth) {
     421    case EfiCpuIoWidthUint8:
     422      IoReadFifo8 ((UINTN)Address, Count, Buffer);
     423      return EFI_SUCCESS;
     424    case EfiCpuIoWidthUint16:
     425      IoReadFifo16 ((UINTN)Address, Count, Buffer);
     426      return EFI_SUCCESS;
     427    case EfiCpuIoWidthUint32:
     428      IoReadFifo32 ((UINTN)Address, Count, Buffer);
     429      return EFI_SUCCESS;
     430    default:
     431      //
     432      // The CpuIoCheckParameter call above will ensure that this
     433      // path is not taken.
     434      //
     435      ASSERT (FALSE);
     436      break;
     437    }
     438  }
     439
    413440  for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {
    414441    if (OperationWidth == EfiCpuIoWidthUint8) {
     
    493520  OutStride = mOutStride[Width];
    494521  OperationWidth = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
     522
     523  //
     524  // Fifo operations supported for (mInStride[Width] == 0)
     525  //
     526  if (InStride == 0) {
     527    switch (OperationWidth) {
     528    case EfiCpuIoWidthUint8:
     529      IoWriteFifo8 ((UINTN)Address, Count, Buffer);
     530      return EFI_SUCCESS;
     531    case EfiCpuIoWidthUint16:
     532      IoWriteFifo16 ((UINTN)Address, Count, Buffer);
     533      return EFI_SUCCESS;
     534    case EfiCpuIoWidthUint32:
     535      IoWriteFifo32 ((UINTN)Address, Count, Buffer);
     536      return EFI_SUCCESS;
     537    default:
     538      //
     539      // The CpuIoCheckParameter call above will ensure that this
     540      // path is not taken.
     541      //
     542      ASSERT (FALSE);
     543      break;
     544    }
     545  }
     546
    495547  for (Uint8Buffer = (UINT8 *)Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {
    496548    if (OperationWidth == EfiCpuIoWidthUint8) {
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

    r58466 r77662  
    22#  Produces the CPU I/O 2 Protocol by using the services of the I/O Library.
    33#
    4 # Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
     4# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
     5# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
     6#
    57# This program and the accompanying materials
    68# are licensed and made available under the terms and conditions of the BSD License
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.uni

    r58464 r77662  
    1 // /** @file
     1// /** @file
    22// Produces the CPU I/O 2 Protocol by using the services of the I/O Library.
    33//
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/CpuIo2Dxe/CpuIo2DxeExtra.uni

    r58464 r77662  
    1 // /** @file
     1// /** @file
    22// CpuIo2Dxe Localized Strings and Content
    33//
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