4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync I/O Library. The implementations are based on EFI_PEI_SERVICE->CpuIo interface.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync are licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync which accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads an 8-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function must guarantee that all I/O read and write operations are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 8-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->IoRead8 (PeiServices, CpuIo, (UINT64) Port);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes an 8-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 8-bit I/O port specified by Port with the value specified by Value
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and returns Value. This function must guarantee that all I/O read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 8-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value written the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CpuIo->IoWrite8 (PeiServices, CpuIo, (UINT64) Port, Value);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads a 16-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function must guarantee that all I/O read and write operations are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 16-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Port is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Port is aligned on a 16-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->IoRead16 (PeiServices, CpuIo, (UINT64) Port);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes a 16-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 16-bit I/O port specified by Port with the value specified by Value
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and returns Value. This function must guarantee that all I/O read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 16-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Port is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value written the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Port is aligned on a 16-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CpuIo->IoWrite16 (PeiServices, CpuIo, (UINT64) Port, Value);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads a 32-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function must guarantee that all I/O read and write operations are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 32-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Port is not aligned on a 32-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Port is aligned on a 32-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->IoRead32 (PeiServices, CpuIo, (UINT64) Port);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes a 32-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 32-bit I/O port specified by Port with the value specified by Value
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and returns Value. This function must guarantee that all I/O read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 32-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Port is not aligned on a 32-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value written the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Port is aligned on a 32-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CpuIo->IoWrite32 (PeiServices, CpuIo, (UINT64) Port, Value);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads a 64-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function must guarantee that all I/O read and write operations are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 64-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Port is not aligned on a 64-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Port is aligned on a 64-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->IoRead64 (PeiServices, CpuIo, (UINT64) Port);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes a 64-bit I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 64-bit I/O port specified by Port with the value specified by Value
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and returns Value. This function must guarantee that all I/O read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 64-bit I/O port operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Port is not aligned on a 64-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Port The I/O port to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value written the I/O port.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Port is aligned on a 64-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CpuIo->IoWrite64 (PeiServices, CpuIo, (UINT64) Port, Value);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads an 8-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync returned. This function must guarantee that all MMIO read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 8-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->MemRead8 (PeiServices, CpuIo, (UINT64) Address);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes an 8-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 8-bit MMIO register specified by Address with the value specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by Value and returns Value. This function must guarantee that all MMIO read
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and write operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 8-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CpuIo->MemWrite8 (PeiServices, CpuIo, (UINT64) Address, Value);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads a 16-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync returned. This function must guarantee that all MMIO read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 16-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Address is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Address is aligned on a 16-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->MemRead16 (PeiServices, CpuIo, (UINT64) Address);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes a 16-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 16-bit MMIO register specified by Address with the value specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by Value and returns Value. This function must guarantee that all MMIO read
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and write operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 16-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Address is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Address is aligned on a 16-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CpuIo->MemWrite16 (PeiServices, CpuIo, (UINT64) Address, Value);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads a 32-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync returned. This function must guarantee that all MMIO read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 32-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Address is not aligned on a 32-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Address is aligned on a 32-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->MemRead32 (PeiServices, CpuIo, (UINT64) Address);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes a 32-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 32-bit MMIO register specified by Address with the value specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by Value and returns Value. This function must guarantee that all MMIO read
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and write operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 32-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Address is not aligned on a 32-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Address is aligned on a 32-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CpuIo->MemWrite32 (PeiServices, CpuIo, (UINT64) Address, Value);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads a 64-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync returned. This function must guarantee that all MMIO read and write
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 64-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Address is not aligned on a 64-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The value read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Address is aligned on a 64-bit boundary.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64) Address);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes a 64-bit MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Writes the 64-bit MMIO register specified by Address with the value specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by Value and returns Value. This function must guarantee that all MMIO read
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and write operations are serialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If 64-bit MMIO register operations are not supported, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Address is not aligned on a 64-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Address The MMIO register to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to write to the MMIO register.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure Address is aligned on a 64-bit boundary.