If StartAddress > 0x0FFFFFFF, then ASSERT().\r
If the register specified by StartAddress >= 0x100, then ASSERT().\r
If ((StartAddress & 0xFFF) + Size) > 0x100, 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
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
- ASSERT (Buffer != NULL);\r
+ ASSERT ((Buffer != NULL) || (Size == 0));\r
\r
EndAddress = StartAddress + Size;\r
\r
- if (StartAddress < EndAddress && (StartAddress & 1)) {\r
+ if ((StartAddress < EndAddress) && ((StartAddress & 1) != 0)) {\r
//\r
// Read a byte if StartAddress is byte aligned\r
//\r
Buffer = (UINT8*)Buffer + 1;\r
}\r
\r
- if (StartAddress < EndAddress && (StartAddress & 2)) {\r
+ if ((StartAddress < EndAddress) && ((StartAddress & 2) != 0)) {\r
//\r
// Read a word if StartAddress is word aligned\r
//\r
Buffer = (UINT16*)Buffer + 1;\r
}\r
\r
- while (EndAddress - StartAddress >= 4) {\r
+ while ((EndAddress - StartAddress) >= 4) {\r
//\r
// Read as many double words as possible\r
//\r
Buffer = (UINT16*)Buffer + 1;\r
}\r
\r
- if (EndAddress & 1) {\r
+ if ((EndAddress & 1) != 0) {\r
//\r
// Read the last remaining byte if exist\r
//\r
If StartAddress > 0x0FFFFFFF, then ASSERT().\r
If the register specified by StartAddress >= 0x100, then ASSERT().\r
If ((StartAddress & 0xFFF) + Size) > 0x100, 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
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
- ASSERT (Buffer != NULL);\r
+ ASSERT ((Buffer != NULL) || (Size == 0));\r
\r
EndAddress = StartAddress + Size;\r
\r
Buffer = (UINT8*)Buffer + 1;\r
}\r
\r
- if (StartAddress < EndAddress && (StartAddress & 2)) {\r
+ if ((StartAddress < EndAddress) && ((StartAddress & 2) != 0)) {\r
//\r
// Write a word if StartAddress is word aligned\r
//\r
Buffer = (UINT16*)Buffer + 1;\r
}\r
\r
- while (EndAddress - StartAddress >= 4) {\r
+ while ((EndAddress - StartAddress) >= 4) {\r
//\r
// Write as many double words as possible\r
//\r
Buffer = (UINT32*)Buffer + 1;\r
}\r
\r
- if (EndAddress & 2) {\r
+ if ((EndAddress & 2) != 0) {\r
//\r
// Write the last remaining word if exist\r
//\r
Buffer = (UINT16*)Buffer + 1;\r
}\r
\r
- if (EndAddress & 1) {\r
+ if ((EndAddress & 1) != 0) {\r
//\r
// Write the last remaining byte if exist\r
//\r