Lines Matching defs:StartAddress

1212   Reads the range of PCI configuration registers specified by StartAddress and
1216 from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
1220 If StartAddress > 0x0FFFFFFF, then ASSERT().
1221 If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
1224 @param StartAddress The starting address that encodes the PCI Bus, Device,
1229 @return Size read data from StartAddress.
1235 IN UINTN StartAddress,
1242 ASSERT_INVALID_PCI_ADDRESS (StartAddress);
1243 ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
1256 if ((StartAddress & 1) != 0) {
1258 // Read a byte if StartAddress is byte aligned
1260 *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress);
1261 StartAddress += sizeof (UINT8);
1266 if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {
1268 // Read a word if StartAddress is word aligned
1270 WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress));
1272 StartAddress += sizeof (UINT16);
1281 WriteUnaligned32 ((UINT32 *) Buffer, (UINT32) PciExpressRead32 (StartAddress));
1283 StartAddress += sizeof (UINT32);
1292 WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress));
1293 StartAddress += sizeof (UINT16);
1302 *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress);
1312 Writes the range of PCI configuration registers specified by StartAddress and
1316 write from StartAdress to StartAddress + Size. Due to alignment restrictions,
1320 If StartAddress > 0x0FFFFFFF, then ASSERT().
1321 If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
1324 @param StartAddress The starting address that encodes the PCI Bus, Device,
1329 @return Size written to StartAddress.
1335 IN UINTN StartAddress,
1342 ASSERT_INVALID_PCI_ADDRESS (StartAddress);
1343 ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
1356 if ((StartAddress & 1) != 0) {
1358 // Write a byte if StartAddress is byte aligned
1360 PciExpressWrite8 (StartAddress, *(UINT8*)Buffer);
1361 StartAddress += sizeof (UINT8);
1366 if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {
1368 // Write a word if StartAddress is word aligned
1370 PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer));
1371 StartAddress += sizeof (UINT16);
1380 PciExpressWrite32 (StartAddress, ReadUnaligned32 ((UINT32*)Buffer));
1381 StartAddress += sizeof (UINT32);
1390 PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer));
1391 StartAddress += sizeof (UINT16);
1400 PciExpressWrite8 (StartAddress, *(UINT8*)Buffer);