THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- Module Name: PciLib.c\r
-\r
**/\r
\r
+\r
+#include <Base.h>\r
+\r
+\r
+#include <Library/PciLib.h>\r
+#include <Library/PciCf8Lib.h>\r
+\r
/**\r
Reads an 8-bit PCI configuration register.\r
\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to read.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 7, then ASSERT().\r
If EndBit is greater than 7, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to read.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 15, then ASSERT().\r
If EndBit is greater than 15, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to read.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
If Address > 0x0FFFFFFF, then ASSERT().\r
If StartBit is greater than 31, then ASSERT().\r
If EndBit is greater than 31, then ASSERT().\r
- If EndBit is less than or equal to StartBit, then ASSERT().\r
+ If EndBit is less than StartBit, then ASSERT().\r
\r
@param Address PCI configuration register to write.\r
@param StartBit The ordinal of the least significant bit in the bit field.\r
\r
If StartAddress > 0x0FFFFFFF, then ASSERT().\r
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().\r
- If Buffer is NULL, then ASSERT().\r
+ If Size > 0 and Buffer is NULL, then ASSERT().\r
\r
@param StartAddress Starting address that encodes the PCI Bus, Device,\r
Function and Register.\r
\r
If StartAddress > 0x0FFFFFFF, then ASSERT().\r
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().\r
- If Buffer is NULL, then ASSERT().\r
+ If Size > 0 and Buffer is NULL, then ASSERT().\r
\r
@param StartAddress Starting address that encodes the PCI Bus, Device,\r
Function and Register.\r