X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FDeviceIo.h;h=0bc4394904750d14c878b21a7ff9ff93ad29694c;hp=643c810a3483c3abe24d5d8c8b5352216815d7d8;hb=4ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086;hpb=0647c9adf92c6a8712091607a73b2768327a865d;ds=sidebyside diff --git a/MdePkg/Include/Protocol/DeviceIo.h b/MdePkg/Include/Protocol/DeviceIo.h index 643c810a34..0bc4394904 100644 --- a/MdePkg/Include/Protocol/DeviceIo.h +++ b/MdePkg/Include/Protocol/DeviceIo.h @@ -1,10 +1,10 @@ /** @file - Device IO protocol as defined in the EFI 1.0 specification. + Device IO protocol as defined in the EFI 1.10 specification. Device IO is used to abstract hardware access to devices. It includes memory mapped IO, IO, PCI Config space, and DMA. - Copyright (c) 2006, Intel Corporation + Copyright (c) 2006 - 2008, 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 @@ -13,8 +13,6 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - Module Name: DeviceIo.h - **/ #ifndef __DEVICE_IO_H__ @@ -27,6 +25,16 @@ typedef struct _EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_PROTOCOL; +// +// Protocol GUID name defined in EFI1.1. +// +#define DEVICE_IO_PROTOCOL EFI_DEVICE_IO_PROTOCOL_GUID + +// +// Protocol defined in EFI1.1. +// +typedef EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_INTERFACE; + typedef enum { IO_UINT8, IO_UINT16, @@ -55,7 +63,7 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI *EFI_DEVICE_IO) ( +(EFIAPI *EFI_DEVICE_IO)( IN EFI_DEVICE_IO_PROTOCOL *This, IN EFI_IO_WIDTH Width, IN UINT64 Address, @@ -84,7 +92,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_PCI_DEVICE_PATH) ( +(EFIAPI *EFI_PCI_DEVICE_PATH)( IN EFI_DEVICE_IO_PROTOCOL *This, IN UINT64 PciAddress, IN OUT EFI_DEVICE_PATH_PROTOCOL **PciDevicePath @@ -116,7 +124,7 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI *EFI_IO_MAP) ( +(EFIAPI *EFI_IO_MAP)( IN EFI_DEVICE_IO_PROTOCOL *This, IN EFI_IO_OPERATION_TYPE Operation, IN EFI_PHYSICAL_ADDRESS *HostAddress, @@ -137,7 +145,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_IO_UNMAP) ( +(EFIAPI *EFI_IO_UNMAP)( IN EFI_DEVICE_IO_PROTOCOL *This, IN VOID *Mapping ); @@ -161,7 +169,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_IO_ALLOCATE_BUFFER) ( +(EFIAPI *EFI_IO_ALLOCATE_BUFFER)( IN EFI_DEVICE_IO_PROTOCOL *This, IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, @@ -180,7 +188,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_IO_FLUSH) ( +(EFIAPI *EFI_IO_FLUSH)( IN EFI_DEVICE_IO_PROTOCOL *This ); @@ -199,12 +207,46 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_IO_FREE_BUFFER) ( +(EFIAPI *EFI_IO_FREE_BUFFER)( IN EFI_DEVICE_IO_PROTOCOL *This, IN UINTN Pages, 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. + + @param Mem + Allows reads and writes to memory mapped I/O space. + + @param Io + Allows reads and writes to I/O space. + + @param Pci + Allows reads and writes to PCI configuration space. + + @param Map + Provides the device specific addresses needed to access system memory for DMA. + + @param PciDevicePath + Provides an EFI Device Path for a PCI device with the given PCI + configuration space address. + + @param Unmap + Releases any resources allocated by Map(). + + @param AllocateBuffer + Allocates pages that are suitable for a common buffer mapping. + + @param Flush + Flushes any posted write data to the device. + + @param FreeBuffer + Free pages that were allocated with AllocateBuffer(). + +**/ struct _EFI_DEVICE_IO_PROTOCOL { EFI_IO_ACCESS Mem; EFI_IO_ACCESS Io;