X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=IntelFrameworkPkg%2FLibrary%2FDxeIoLibCpuIo%2FDxeCpuIoLibInternal.h;h=dd4a5413baf4e6b704918d3f4fccc803f822d039;hb=aa7fc1c11c3d57d82842dbede50d064639671a98;hp=23ce633b1d4b744fe0cfbfe517345440a771d97f;hpb=7459094d5f6904a0c8445d97519f4a99b654ef43;p=mirror_edk2.git diff --git a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeCpuIoLibInternal.h b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeCpuIoLibInternal.h index 23ce633b1d..dd4a5413ba 100644 --- a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeCpuIoLibInternal.h +++ b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeCpuIoLibInternal.h @@ -1,17 +1,13 @@ /** @file Internal include file of DXE CPU IO Library. It includes all necessary protocol/library class's header file - for implementation of IoLib library instance. It is included + for implementation of IoLib library instance. It is included all source code of this library instance. - - Copyright (c) 2006, 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 - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2017, AMD Incorporated. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent Module Name: DxeCpuIoLibInternal.h @@ -23,10 +19,7 @@ #include - #include -#include - #include #include @@ -38,8 +31,10 @@ Reads registers in the EFI CPU I/O space. Reads the I/O port specified by Port with registers width specified by Width. - The read value is returned. If such operations are not supported, then ASSERT(). + The read value is returned. + This function must guarantee that all I/O read and write operations are serialized. + If such operations are not supported, then ASSERT(). @param Port The base address of the I/O operation. The caller is responsible for aligning the Address if required. @@ -51,31 +46,83 @@ UINT64 EFIAPI IoReadWorker ( - IN UINTN Port, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width + IN UINTN Port, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width ); /** Writes registers in the EFI CPU I/O space. Writes the I/O port specified by Port with registers width and value specified by Width - and Data respectively. Data is returned. If such operations are not supported, then ASSERT(). + and Data respectively. Data is returned. + This function must guarantee that all I/O read and write operations are serialized. + If such operations are not supported, then ASSERT(). @param Port The base address of the I/O operation. The caller is responsible for aligning the Address if required. @param Width The width of the I/O operation. @param Data The value to write to the I/O port. - @return The paramter of Data. + @return The parameter of Data. **/ UINT64 EFIAPI IoWriteWorker ( - IN UINTN Port, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 Data + IN UINTN Port, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 Data + ); + +/** + Reads registers in the EFI CPU I/O space. + + Reads the I/O port specified by Port with registers width specified by Width. + The port is read Count times, and the read data is stored in the provided Buffer. + + This function must guarantee that all I/O read and write operations are serialized. + If such operations are not supported, then ASSERT(). + + @param Port The base address of the I/O operation. + The caller is responsible for aligning the Address if required. + @param Width The width of the I/O operation. + @param Count The number of times to read I/O port. + @param Buffer The buffer to store the read data into. + +**/ +VOID +EFIAPI +IoReadFifoWorker ( + IN UINTN Port, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINTN Count, + IN VOID *Buffer + ); + +/** + Writes registers in the EFI CPU I/O space. + + Writes the I/O port specified by Port with registers width specified by Width. + The port is written Count times, and the write data is retrieved from the provided Buffer. + + This function must guarantee that all I/O read and write operations are serialized. + If such operations are not supported, then ASSERT(). + + @param Port The base address of the I/O operation. + The caller is responsible for aligning the Address if required. + @param Width The width of the I/O operation. + @param Count The number of times to write I/O port. + @param Buffer The buffer to store the read data into. + +**/ +VOID +EFIAPI +IoWriteFifoWorker ( + IN UINTN Port, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINTN Count, + IN VOID *Buffer ); /** @@ -110,7 +157,7 @@ MmioReadWorker ( The caller is responsible for aligning the Address if required. @param Width The width of the I/O operation. @param Data The value to write to the I/O port. - + @return Data read from registers in the EFI system memory space. **/