EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Defines | Functions

UnixPkg/CpuRuntimeDxe/CpuIo.c File Reference

#include <FrameworkDxe.h>
#include <Protocol/Cpu.h>
#include <Protocol/DataHub.h>
#include <Guid/DataHubRecords.h>
#include <Protocol/CpuIo2.h>
#include <Protocol/FrameworkHii.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <CpuDriver.h>

Go to the source code of this file.

Defines

#define IA32_MAX_IO_ADDRESS   0xFFFF
#define IA32_MAX_MEM_ADDRESS   0xFFFFFFFF

Functions

EFI_STATUS CpuIoCheckAddressRange (IN EFI_CPU_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer, IN UINT64 Limit)
EFI_STATUS EFIAPI CpuMemoryServiceRead (IN EFI_CPU_IO2_PROTOCOL *This, IN EFI_CPU_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI CpuMemoryServiceWrite (IN EFI_CPU_IO2_PROTOCOL *This, IN EFI_CPU_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI CpuIoServiceRead (IN EFI_CPU_IO2_PROTOCOL *This, IN EFI_CPU_IO_PROTOCOL_WIDTH Width, IN UINT64 UserAddress, IN UINTN Count, IN OUT VOID *UserBuffer)
EFI_STATUS EFIAPI CpuIoServiceWrite (IN EFI_CPU_IO2_PROTOCOL *This, IN EFI_CPU_IO_PROTOCOL_WIDTH Width, IN UINT64 UserAddress, IN UINTN Count, IN OUT VOID *UserBuffer)

Define Documentation

#define IA32_MAX_IO_ADDRESS   0xFFFF

Definition at line 42 of file CpuIo.c.

#define IA32_MAX_MEM_ADDRESS   0xFFFFFFFF

Definition at line 43 of file CpuIo.c.


Function Documentation

EFI_STATUS CpuIoCheckAddressRange ( IN EFI_CPU_IO_PROTOCOL_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN VOID *  Buffer,
IN UINT64  Limit 
)
EFI_STATUS EFIAPI CpuIoServiceRead ( IN EFI_CPU_IO2_PROTOCOL This,
IN EFI_CPU_IO_PROTOCOL_WIDTH  Width,
IN UINT64  UserAddress,
IN UINTN  Count,
IN OUT VOID *  UserBuffer 
)

Enables a driver to read registers in the PI CPU I/O space.

Parameters:
[in]ThisA pointer to the EFI_CPU_IO2_PROTOCOL instance.
[in]WidthSignifies the width of the I/O operation.
[in]AddressThe base address of the I/O operation. The caller is responsible for aligning the Address if required.
[in]CountThe number of I/O operations to perform. The number of bytes moved is Width size * Count, starting at Address.
[in,out]BufferThe destination buffer to store the results.
Return values:
EFI_SUCCESSThe data was read from or written to the EFI system.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system. Or Buffer is NULL.
EFI_UNSUPPORTEDThe Buffer is not aligned for the given Width. Or,The address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 165 of file CpuIo.c.

EFI_STATUS EFIAPI CpuIoServiceWrite ( IN EFI_CPU_IO2_PROTOCOL This,
IN EFI_CPU_IO_PROTOCOL_WIDTH  Width,
IN UINT64  UserAddress,
IN UINTN  Count,
IN OUT VOID *  UserBuffer 
)

Enables a driver to write registers in the PI CPU I/O space.

Parameters:
[in]ThisA pointer to the EFI_CPU_IO2_PROTOCOL instance.
[in]WidthSignifies the width of the I/O operation.
[in]AddressThe base address of the I/O operation. The caller is responsible for aligning the Address if required.
[in]CountThe number of I/O operations to perform. The number of bytes moved is Width size * Count, starting at Address.
[in,out]BufferThe source buffer from which to write data.
Return values:
EFI_SUCCESSThe data was read from or written to the EFI system.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system. Or Buffer is NULL.
EFI_UNSUPPORTEDThe Buffer is not aligned for the given Width. Or,The address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 226 of file CpuIo.c.

EFI_STATUS EFIAPI CpuMemoryServiceRead ( IN EFI_CPU_IO2_PROTOCOL This,
IN EFI_CPU_IO_PROTOCOL_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN OUT VOID *  Buffer 
)

Enables a driver to read memory-mapped registers in the PI System memory space.

Parameters:
[in]ThisA pointer to the EFI_CPU_IO2_PROTOCOL instance.
[in]WidthSignifies the width of the memory operation.
[in]AddressThe base address of the memory operation.
[in]CountThe number of memory operations to perform. The number of bytes moved is Width size * Count, starting at Address.
[in,out]BufferThe destination buffer to store the results.
Return values:
EFI_SUCCESSThe data was read from or written to the EFI system.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system. Or Buffer is NULL.
EFI_UNSUPPORTEDThe Buffer is not aligned for the given Width. Or,The address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 56 of file CpuIo.c.

EFI_STATUS EFIAPI CpuMemoryServiceWrite ( IN EFI_CPU_IO2_PROTOCOL This,
IN EFI_CPU_IO_PROTOCOL_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN OUT VOID *  Buffer 
)

Enables a driver to write memory-mapped registers in the PI System memory space.

Parameters:
[in]ThisA pointer to the EFI_CPU_IO2_PROTOCOL instance.
[in]WidthSignifies the width of the memory operation.
[in]AddressThe base address of the memory operation.
[in]CountThe number of memory operations to perform. The number of bytes moved is Width size * Count, starting at Address.
[in,out]BufferThe source buffer from which to write data.
Return values:
EFI_SUCCESSThe data was read from or written to the EFI system.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system. Or Buffer is NULL.
EFI_UNSUPPORTEDThe Buffer is not aligned for the given Width. Or,The address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 111 of file CpuIo.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines