\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
//\r
// Read a byte if StartAddress is byte aligned\r
//\r
*(UINT8*)Buffer = PciCf8Read8 (StartAddress);\r
StartAddress += sizeof (UINT8);\r
//\r
// Read a byte if StartAddress is byte aligned\r
//\r
*(UINT8*)Buffer = PciCf8Read8 (StartAddress);\r
StartAddress += sizeof (UINT8);\r
//\r
// Read a word if StartAddress is word aligned\r
//\r
*(UINT16*)Buffer = PciCf8Read16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
//\r
// Read a word if StartAddress is word aligned\r
//\r
*(UINT16*)Buffer = PciCf8Read16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
//\r
// Read as many double words as possible\r
//\r
*(UINT32*)Buffer = PciCf8Read32 (StartAddress);\r
StartAddress += sizeof (UINT32);\r
//\r
// Read as many double words as possible\r
//\r
*(UINT32*)Buffer = PciCf8Read32 (StartAddress);\r
StartAddress += sizeof (UINT32);\r
//\r
// Read the last remaining word if exist\r
//\r
*(UINT16*)Buffer = PciCf8Read16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
//\r
// Read the last remaining word if exist\r
//\r
*(UINT16*)Buffer = PciCf8Read16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
//\r
// Write a byte if StartAddress is byte aligned\r
//\r
PciCf8Write8 (StartAddress, *(UINT8*)Buffer);\r
StartAddress += sizeof (UINT8);\r
//\r
// Write a byte if StartAddress is byte aligned\r
//\r
PciCf8Write8 (StartAddress, *(UINT8*)Buffer);\r
StartAddress += sizeof (UINT8);\r
//\r
// Write a word if StartAddress is word aligned\r
//\r
PciCf8Write16 (StartAddress, *(UINT16*)Buffer);\r
StartAddress += sizeof (UINT16);\r
//\r
// Write a word if StartAddress is word aligned\r
//\r
PciCf8Write16 (StartAddress, *(UINT16*)Buffer);\r
StartAddress += sizeof (UINT16);\r
//\r
// Write as many double words as possible\r
//\r
PciCf8Write32 (StartAddress, *(UINT32*)Buffer);\r
StartAddress += sizeof (UINT32);\r
//\r
// Write as many double words as possible\r
//\r
PciCf8Write32 (StartAddress, *(UINT32*)Buffer);\r
StartAddress += sizeof (UINT32);\r
//\r
// Write the last remaining word if exist\r
//\r
PciCf8Write16 (StartAddress, *(UINT16*)Buffer);\r
StartAddress += sizeof (UINT16);\r
//\r
// Write the last remaining word if exist\r
//\r
PciCf8Write16 (StartAddress, *(UINT16*)Buffer);\r
StartAddress += sizeof (UINT16);\r
//\r
// Write the last remaining byte if exist\r
//\r
PciCf8Write8 (StartAddress, *(UINT8*)Buffer);\r
}\r
\r
//\r
// Write the last remaining byte if exist\r
//\r
PciCf8Write8 (StartAddress, *(UINT8*)Buffer);\r
}\r
\r