-/**\r
- Read a slice from PCI config space at the given offset, then advance the\r
- offset.\r
-\r
- @param [in] PciIo The EFI_PCI_IO_PROTOCOL instance that represents the\r
- device.\r
-\r
- @param [in,out] Offset On input, the offset in PCI config space to start\r
- reading from. On output, the offset of the first byte\r
- that was not read. On error, Offset is not modified.\r
-\r
- @param [in] Size The number of bytes to read.\r
-\r
- @param [out] Buffer On output, the bytes read from PCI config space are\r
- stored in this object.\r
-\r
- @retval EFI_SUCCESS Size bytes have been transferred from PCI config space\r
- (from Offset) to Buffer, and Offset has been incremented\r
- by Size.\r
-\r
- @return Error codes from PciIo->Pci.Read().\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-ReadConfigSpace (\r
- IN EFI_PCI_IO_PROTOCOL *PciIo,\r
- IN OUT UINT32 *Offset,\r
- IN UINTN Size,\r
- OUT VOID *Buffer\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, *Offset, Size, Buffer);\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
- *Offset += (UINT32)Size;\r
- return EFI_SUCCESS;\r
-}\r
-\r
-\r