/** @file\r
PCI Segment Library implementation using PCI CFG2 PPI.\r
\r
- Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are\r
licensed and made available under the terms and conditions of\r
the BSD License which accompanies this distribution. The full\r
\r
This internal function retrieves PCI CFG2 PPI from PPI database.\r
\r
- @param Address The address that encodes the PCI Segment, Bus, Device, Function and Register.\r
+ @param Address The address that encodes the PCI Segment, Bus, Device, \r
+ Function and Register.\r
\r
@return The pointer to PCI CFG2 PPI.\r
\r
\r
@param Address The address that encodes the PCI Bus, Device, Function and\r
Register.\r
- @param Width Width of data to read\r
+ @param Width The width of data to read\r
\r
@return The value read from the PCI configuration register.\r
\r
\r
@param Address The address that encodes the PCI Bus, Device, Function and\r
Register.\r
- @param Width Width of data to write\r
+ @param Width The width of data to write\r
@param Data The value to write.\r
\r
@return The value written to the PCI configuration register.\r
\r
If any reserved bits in Address are set, then ASSERT().\r
\r
- @param Address The address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
+ @param Address The address that encodes the PCI Segment, Bus, Device, Function, \r
+ and Register.\r
\r
@return The 8-bit PCI configuration register specified by Address.\r
\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address is not aligned on a 16-bit boundary, then ASSERT().\r
\r
@param Address The address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
- @param AndData The value to AND with the PCI configuration register.\r
+ @param AndData The value to AND with the PCI configuration register.\r
@param OrData The value to OR with the PCI configuration register.\r
\r
@return The value written to the PCI configuration register.\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If any reserved bits in Address are set, then ASSERT().\r
If Address is not aligned on a 32-bit boundary, then ASSERT().\r
\r
- @param Address The address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
+ @param Address The address that encodes the PCI Segment, Bus, Device, Function, \r
+ and Register.\r
\r
@return The 32-bit PCI configuration register specified by Address.\r
\r
If any reserved bits in Address are set, then ASSERT().\r
If Address is not aligned on a 32-bit boundary, then ASSERT().\r
\r
- @param Address The address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
+ @param Address The address that encodes the PCI Segment, Bus, Device, \r
+ Function, and Register.\r
@param Value The value to write.\r
\r
@return The parameter of Value.\r
If any reserved bits in Address are set, then ASSERT().\r
If Address is not aligned on a 32-bit boundary, then ASSERT().\r
\r
- @param Address The address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
+ @param Address The address that encodes the PCI Segment, Bus, Device, Function, \r
+ and Register.\r
@param AndData The value to AND with the PCI configuration register.\r
\r
@return The value written to the PCI configuration register.\r
If any reserved bits in Address are set, then ASSERT().\r
If Address is not aligned on a 32-bit boundary, then ASSERT().\r
\r
- @param Address The address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
+ @param Address The address that encodes the PCI Segment, Bus, Device, Function,\r
+ and Register.\r
@param AndData The value to AND with the PCI configuration register.\r
@param OrData The value to OR with the PCI configuration register.\r
\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
- \r
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
If EndBit is less than StartBit, then ASSERT().\r
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().\r
\r
@param Address The PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
If Size > 0 and Buffer is NULL, then ASSERT().\r
\r
- @param StartAddress The starting address that encodes the PCI Segment, Bus, Device,\r
- Function and Register.\r
+ @param StartAddress The starting address that encodes the PCI Segment, Bus, \r
+ Device, Function and Register.\r
@param Size The size in bytes of the transfer.\r
@param Buffer The pointer to a buffer receiving the data read.\r
\r
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
If Size > 0 and Buffer is NULL, then ASSERT().\r
\r
- @param StartAddress The starting address that encodes the PCI Segment, Bus, Device,\r
- Function and Register.\r
+ @param StartAddress The starting address that encodes the PCI Segment, Bus, \r
+ Device, Function and Register.\r
@param Size The size in bytes of the transfer.\r
@param Buffer The pointer to a buffer containing the data to write.\r
\r