59 IN BOOLEAN MmioOperation,
73 return EFI_INVALID_PARAMETER;
79 if ((UINT32)Width > SMM_IO_UINT64) {
80 return EFI_INVALID_PARAMETER;
86 if (!MmioOperation && (Width == SMM_IO_UINT64)) {
87 return EFI_INVALID_PARAMETER;
105 Limit = (MmioOperation ?
MAX_ADDRESS : MAX_IO_PORT_ADDRESS);
107 if (Address > Limit) {
108 return EFI_UNSUPPORTED;
112 if (MaxCount < (Count - 1)) {
113 return EFI_UNSUPPORTED;
116 if (Address >
LShiftU64 (MaxCount - Count + 1, Width)) {
117 return EFI_UNSUPPORTED;
124 if ((Address & ((UINT64)mStride[Width] - 1)) != 0) {
125 return EFI_UNSUPPORTED;
169 if (EFI_ERROR (Status)) {
176 Stride = mStride[Width];
177 for (Uint8Buffer = Buffer; Count > 0; Address += Stride, Uint8Buffer += Stride, Count--) {
180 }
else if (Width == SMM_IO_UINT16) {
182 }
else if (Width == SMM_IO_UINT32) {
184 }
else if (Width == SMM_IO_UINT64) {
230 if (EFI_ERROR (Status)) {
237 Stride = mStride[Width];
238 for (Uint8Buffer = Buffer; Count > 0; Address += Stride, Uint8Buffer += Stride, Count--) {
241 }
else if (Width == SMM_IO_UINT16) {
243 }
else if (Width == SMM_IO_UINT32) {
245 }
else if (Width == SMM_IO_UINT64) {
291 if (EFI_ERROR (Status)) {
298 Stride = mStride[Width];
299 for (Uint8Buffer = Buffer; Count > 0; Address += Stride, Uint8Buffer += Stride, Count--) {
302 }
else if (Width == SMM_IO_UINT16) {
304 }
else if (Width == SMM_IO_UINT32) {
353 if (EFI_ERROR (Status)) {
360 Stride = mStride[Width];
361 for (Uint8Buffer = (UINT8 *)Buffer; Count > 0; Address += Stride, Uint8Buffer += Stride, Count--) {
364 }
else if (Width == SMM_IO_UINT16) {
366 }
else if (Width == SMM_IO_UINT32) {
391 CopyMem (&gMmst->
MmIo, &mSmmCpuIo2, sizeof (mSmmCpuIo2));
398 &gEfiSmmCpuIo2ProtocolGuid,
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_STATUS EFIAPI CpuMemoryServiceRead(IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This, IN EFI_SMM_IO_WIDTH Width, IN UINT64 Address, IN UINTN Count, OUT VOID *Buffer)
EFI_STATUS EFIAPI CpuIoServiceWrite(IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This, IN EFI_SMM_IO_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
EFI_STATUS EFIAPI CpuIoServiceRead(IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This, IN EFI_SMM_IO_WIDTH Width, IN UINT64 Address, IN UINTN Count, OUT VOID *Buffer)
EFI_STATUS CpuIoCheckParameter(IN BOOLEAN MmioOperation, IN EFI_SMM_IO_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
EFI_STATUS EFIAPI CpuMemoryServiceWrite(IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This, IN EFI_SMM_IO_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
EFI_STATUS CommonCpuIo2Initialize(VOID)
UINT8 EFIAPI IoWrite8(IN UINTN Port, IN UINT8 Value)
UINT64 EFIAPI MmioWrite64(IN UINTN Address, IN UINT64 Value)
UINT64 EFIAPI MmioRead64(IN UINTN Address)
UINT16 EFIAPI MmioRead16(IN UINTN Address)
UINT8 EFIAPI MmioRead8(IN UINTN Address)
UINT8 EFIAPI MmioWrite8(IN UINTN Address, IN UINT8 Value)
UINT8 EFIAPI IoRead8(IN UINTN Port)
UINT32 EFIAPI MmioRead32(IN UINTN Address)
UINT16 EFIAPI IoRead16(IN UINTN Port)
UINT16 EFIAPI MmioWrite16(IN UINTN Address, IN UINT16 Value)
UINT32 EFIAPI IoRead32(IN UINTN Port)
UINT32 EFIAPI IoWrite32(IN UINTN Port, IN UINT32 Value)
UINT16 EFIAPI IoWrite16(IN UINTN Port, IN UINT16 Value)
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
#define ASSERT_EFI_ERROR(StatusParameter)
EFI_INSTALL_PROTOCOL_INTERFACE MmInstallProtocolInterface
EFI_MM_CPU_IO_PROTOCOL MmIo