IntelFrameworkPkg/DxeIoLibCpuIo: Add new Fifo routines in IoLib class
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Leo Duran <leo.duran@amd.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
all source code of this library instance.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
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
|
||||
@@ -35,8 +37,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.
|
||||
@@ -48,16 +52,18 @@
|
||||
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.
|
||||
@@ -70,9 +76,59 @@ IoReadWorker (
|
||||
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
|
||||
);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user