X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FDeviceIo.h;h=99763d2bd773fe9a4ee600b29762ec4f59ed3afa;hp=6ae0c23884e988a68c6e1a488f8a020551c4fafd;hb=344d057a2b539cf34420e2afad2351b45c65178e;hpb=3354353d4d82fb12c073564ab41099ca75d02839 diff --git a/MdePkg/Include/Protocol/DeviceIo.h b/MdePkg/Include/Protocol/DeviceIo.h index 6ae0c23884..99763d2bd7 100644 --- a/MdePkg/Include/Protocol/DeviceIo.h +++ b/MdePkg/Include/Protocol/DeviceIo.h @@ -4,8 +4,8 @@ Device IO is used to abstract hardware access to devices. It includes memory mapped IO, IO, PCI Config space, and DMA. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2009, 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 http://opensource.org/licenses/bsd-license.php @@ -35,15 +35,22 @@ typedef struct _EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_PROTOCOL; /// typedef EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_INTERFACE; +/// +/// Device IO Access Width +/// typedef enum { - IO_UINT8, - IO_UINT16, - IO_UINT32, - IO_UINT64, - MMIO_COPY_UINT8, - MMIO_COPY_UINT16, - MMIO_COPY_UINT32, - MMIO_COPY_UINT64 + IO_UINT8 = 0, + IO_UINT16 = 1, + IO_UINT32 = 2, + IO_UINT64 = 3, + // + // Below enumerations are added in "Extensible Firmware Interface Specification, + // Version 1.10, Specification Update, Version 001". + // + MMIO_COPY_UINT8 = 4, + MMIO_COPY_UINT16 = 5, + MMIO_COPY_UINT32 = 6, + MMIO_COPY_UINT64 = 7 } EFI_IO_WIDTH; /** @@ -54,7 +61,10 @@ typedef enum { @param Address The base address of the I/O operations. @param Count The number of I/O operations to perform. @param Buffer For read operations, the destination buffer to store the results. For write - operations, the source buffer to write data from. + operations, the source buffer to write data from. If + Width is MMIO_COPY_UINT8, MMIO_COPY_UINT16, + MMIO_COPY_UINT32, or MMIO_COPY_UINT64, then + Buffer is interpreted as a base address of an I/O operation such as Address. @retval EFI_SUCCESS The data was read from or written to the device. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @@ -99,8 +109,22 @@ EFI_STATUS ); typedef enum { + /// + /// A read operation from system memory by a bus master. + /// EfiBusMasterRead, + + /// + /// A write operation to system memory by a bus master. + /// EfiBusMasterWrite, + + /// + /// Provides both read and write access to system memory + /// by both the processor and a bus master. The buffer is + /// coherent from both the processor's and the bus master's + /// point of view. + /// EfiBusMasterCommonBuffer } EFI_IO_OPERATION_TYPE; @@ -110,7 +134,8 @@ typedef enum { @param This A pointer to the EFI_DEVICE_IO_INTERFACE instance. @param Operation Indicates if the bus master is going to read or write to system memory. @param HostAddress The system memory address to map to the device. - @param NumberOfBytes On input the number of bytes to map. + @param NumberOfBytes On input, the number of bytes to map. + On output, the number of bytes that were mapped. @param DeviceAddress The resulting map address for the bus master device to use to access the hosts HostAddress. @param Mapping A resulting value to pass to Unmap(). @@ -213,11 +238,10 @@ EFI_STATUS IN EFI_PHYSICAL_ADDRESS HostAddress ); -/** - @par Protocol Description: - This protocol provides the basic Memory, I/O, and PCI interfaces that - are used to abstract accesses to devices. -**/ +/// +/// This protocol provides the basic Memory, I/O, and PCI interfaces that +/// are used to abstract accesses to devices. +/// struct _EFI_DEVICE_IO_PROTOCOL { /// /// Allows reads and writes to memory mapped I/O space.