27#define ASSERT_INVALID_PCI_ADDRESS(A, M) \
28 ASSERT (((A) & (~0xfffffff | (M))) == 0)
37#define PCI_TO_PCICFG2_ADDRESS(A) \
38 ((((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32)))
63 UINT64 PciCfg2Address;
67 ASSERT (PciCfg2Ppi !=
NULL);
106 UINT64 PciCfg2Address;
110 ASSERT (PciCfg2Ppi !=
NULL);
1256 ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
1262 ASSERT (Buffer !=
NULL);
1269 if ((StartAddress & BIT0) != 0) {
1273 *(
volatile UINT8 *)Buffer =
PciRead8 (StartAddress);
1274 StartAddress +=
sizeof (UINT8);
1275 Size -=
sizeof (UINT8);
1276 Buffer = (UINT8 *)Buffer + 1;
1279 if ((Size >=
sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) {
1284 StartAddress +=
sizeof (UINT16);
1285 Size -=
sizeof (UINT16);
1286 Buffer = (UINT16 *)Buffer + 1;
1289 while (Size >=
sizeof (UINT32)) {
1294 StartAddress +=
sizeof (UINT32);
1295 Size -=
sizeof (UINT32);
1296 Buffer = (UINT32 *)Buffer + 1;
1299 if (Size >=
sizeof (UINT16)) {
1304 StartAddress +=
sizeof (UINT16);
1305 Size -=
sizeof (UINT16);
1306 Buffer = (UINT16 *)Buffer + 1;
1309 if (Size >=
sizeof (UINT8)) {
1313 *(
volatile UINT8 *)Buffer =
PciRead8 (StartAddress);
1354 ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
1360 ASSERT (Buffer !=
NULL);
1367 if ((StartAddress & BIT0) != 0) {
1371 PciWrite8 (StartAddress, *(UINT8 *)Buffer);
1372 StartAddress +=
sizeof (UINT8);
1373 Size -=
sizeof (UINT8);
1374 Buffer = (UINT8 *)Buffer + 1;
1377 if ((Size >=
sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) {
1382 StartAddress +=
sizeof (UINT16);
1383 Size -=
sizeof (UINT16);
1384 Buffer = (UINT16 *)Buffer + 1;
1387 while (Size >=
sizeof (UINT32)) {
1392 StartAddress +=
sizeof (UINT32);
1393 Size -=
sizeof (UINT32);
1394 Buffer = (UINT32 *)Buffer + 1;
1397 if (Size >=
sizeof (UINT16)) {
1402 StartAddress +=
sizeof (UINT16);
1403 Size -=
sizeof (UINT16);
1404 Buffer = (UINT16 *)Buffer + 1;
1407 if (Size >=
sizeof (UINT8)) {
1411 PciWrite8 (StartAddress, *(UINT8 *)Buffer);
CONST EFI_PEI_SERVICES **EFIAPI GetPeiServicesTablePointer(VOID)
UINT32 EFIAPI BitFieldAnd32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData)
UINT16 EFIAPI BitFieldAnd16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData)
UINT8 EFIAPI BitFieldAndThenOr8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData)
UINT32 EFIAPI BitFieldAndThenOr32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData)
UINT32 EFIAPI BitFieldWrite32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
UINT16 EFIAPI BitFieldAndThenOr16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData)
UINT32 EFIAPI BitFieldOr32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData)
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
UINT8 EFIAPI BitFieldWrite8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
UINT8 EFIAPI BitFieldRead8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit)
UINT8 EFIAPI BitFieldAnd8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData)
UINT32 EFIAPI WriteUnaligned32(OUT UINT32 *Buffer, IN UINT32 Value)
UINT16 EFIAPI BitFieldWrite16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value)
UINT16 EFIAPI WriteUnaligned16(OUT UINT16 *Buffer, IN UINT16 Value)
UINT16 EFIAPI BitFieldOr16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData)
UINT16 EFIAPI BitFieldRead16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit)
UINT8 EFIAPI BitFieldOr8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData)
UINT32 EFIAPI BitFieldRead32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit)
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
#define RETURN_UNSUPPORTED
#define ASSERT_EFI_ERROR(StatusParameter)
UINT16 EFIAPI PciBitFieldOr16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData)
UINTN EFIAPI PciWriteBuffer(IN UINTN StartAddress, IN UINTN Size, IN VOID *Buffer)
UINT32 EFIAPI PciBitFieldWrite32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
UINT32 EFIAPI PciAndThenOr32(IN UINTN Address, IN UINT32 AndData, IN UINT32 OrData)
UINT32 EFIAPI PciBitFieldOr32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData)
UINT32 EFIAPI PciRead32(IN UINTN Address)
UINT32 EFIAPI PciOr32(IN UINTN Address, IN UINT32 OrData)
UINT8 EFIAPI PciBitFieldWrite8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
RETURN_STATUS EFIAPI PciRegisterForRuntimeAccess(IN UINTN Address)
UINT8 EFIAPI PciRead8(IN UINTN Address)
UINT8 EFIAPI PciAnd8(IN UINTN Address, IN UINT8 AndData)
UINT8 EFIAPI PciOr8(IN UINTN Address, IN UINT8 OrData)
UINT16 EFIAPI PciAnd16(IN UINTN Address, IN UINT16 AndData)
UINT32 EFIAPI PciWrite32(IN UINTN Address, IN UINT32 Value)
UINT16 EFIAPI PciOr16(IN UINTN Address, IN UINT16 OrData)
UINT16 EFIAPI PciBitFieldAnd16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData)
UINT32 EFIAPI PciBitFieldAnd32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData)
UINT32 EFIAPI PciBitFieldRead32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
UINT16 EFIAPI PciBitFieldAndThenOr16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData)
UINT8 EFIAPI PciAndThenOr8(IN UINTN Address, IN UINT8 AndData, IN UINT8 OrData)
UINT8 EFIAPI PciWrite8(IN UINTN Address, IN UINT8 Value)
UINT16 EFIAPI PciWrite16(IN UINTN Address, IN UINT16 Value)
UINT16 EFIAPI PciBitFieldRead16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
UINT16 EFIAPI PciBitFieldWrite16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value)
UINT8 EFIAPI PciBitFieldAnd8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData)
UINT8 EFIAPI PciBitFieldAndThenOr8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData)
UINT8 EFIAPI PciBitFieldOr8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData)
UINT32 EFIAPI PciAnd32(IN UINTN Address, IN UINT32 AndData)
UINT32 EFIAPI PciBitFieldAndThenOr32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData)
UINT8 EFIAPI PciBitFieldRead8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
UINT16 EFIAPI PciAndThenOr16(IN UINTN Address, IN UINT16 AndData, IN UINT16 OrData)
UINTN EFIAPI PciReadBuffer(IN UINTN StartAddress, IN UINTN Size, OUT VOID *Buffer)
UINT16 EFIAPI PciRead16(IN UINTN Address)
#define PCI_TO_PCICFG2_ADDRESS(A)
UINT32 PeiPciLibPciCfg2ReadWorker(IN UINTN Address, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width)
#define ASSERT_INVALID_PCI_ADDRESS(A, M)
UINT32 PeiPciLibPciCfg2WriteWorker(IN UINTN Address, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT32 Data)
EFI_PEI_PCI_CFG_PPI_WIDTH
@ EfiPeiPciCfgWidthUint16
@ EfiPeiPciCfgWidthUint32