MdePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
1436aea4d5
commit
2f88bd3a12
@@ -22,7 +22,7 @@
|
||||
@param M Additional bits to assert to be zero.
|
||||
|
||||
**/
|
||||
#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A,M) \
|
||||
#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A, M) \
|
||||
ASSERT (((A) & (0xfffffffff0000000ULL | (M))) == 0)
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
@param A The address to convert.
|
||||
**/
|
||||
#define PCI_SEGMENT_TO_PCI_ADDRESS(A) ((UINTN) (UINT32) A)
|
||||
#define PCI_SEGMENT_TO_PCI_ADDRESS(A) ((UINTN) (UINT32) A)
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
@@ -76,7 +76,7 @@ PciSegmentRegisterForRuntimeAccess (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentRead8 (
|
||||
IN UINT64 Address
|
||||
IN UINT64 Address
|
||||
)
|
||||
{
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0);
|
||||
@@ -101,8 +101,8 @@ PciSegmentRead8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentWrite8 (
|
||||
IN UINT64 Address,
|
||||
IN UINT8 Value
|
||||
IN UINT64 Address,
|
||||
IN UINT8 Value
|
||||
)
|
||||
{
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0);
|
||||
@@ -130,11 +130,11 @@ PciSegmentWrite8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentOr8 (
|
||||
IN UINT64 Address,
|
||||
IN UINT8 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINT8 OrData
|
||||
)
|
||||
{
|
||||
return PciWrite8 (PCI_SEGMENT_TO_PCI_ADDRESS (Address), (UINT8) (PciSegmentRead8 (Address) | OrData));
|
||||
return PciWrite8 (PCI_SEGMENT_TO_PCI_ADDRESS (Address), (UINT8)(PciSegmentRead8 (Address) | OrData));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,11 +156,11 @@ PciSegmentOr8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentAnd8 (
|
||||
IN UINT64 Address,
|
||||
IN UINT8 AndData
|
||||
IN UINT64 Address,
|
||||
IN UINT8 AndData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) & AndData));
|
||||
return PciSegmentWrite8 (Address, (UINT8)(PciSegmentRead8 (Address) & AndData));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,12 +186,12 @@ PciSegmentAnd8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentAndThenOr8 (
|
||||
IN UINT64 Address,
|
||||
IN UINT8 AndData,
|
||||
IN UINT8 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINT8 AndData,
|
||||
IN UINT8 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite8 (Address, (UINT8) ((PciSegmentRead8 (Address) & AndData) | OrData));
|
||||
return PciSegmentWrite8 (Address, (UINT8)((PciSegmentRead8 (Address) & AndData) | OrData));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,9 +218,9 @@ PciSegmentAndThenOr8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentBitFieldRead8 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit
|
||||
)
|
||||
{
|
||||
return BitFieldRead8 (PciSegmentRead8 (Address), StartBit, EndBit);
|
||||
@@ -253,10 +253,10 @@ PciSegmentBitFieldRead8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentBitFieldWrite8 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 Value
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 Value
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite8 (
|
||||
@@ -295,10 +295,10 @@ PciSegmentBitFieldWrite8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentBitFieldOr8 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite8 (
|
||||
@@ -337,10 +337,10 @@ PciSegmentBitFieldOr8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentBitFieldAnd8 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 AndData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 AndData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite8 (
|
||||
@@ -382,11 +382,11 @@ PciSegmentBitFieldAnd8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
PciSegmentBitFieldAndThenOr8 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 AndData,
|
||||
IN UINT8 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT8 AndData,
|
||||
IN UINT8 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite8 (
|
||||
@@ -412,7 +412,7 @@ PciSegmentBitFieldAndThenOr8 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentRead16 (
|
||||
IN UINT64 Address
|
||||
IN UINT64 Address
|
||||
)
|
||||
{
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1);
|
||||
@@ -438,8 +438,8 @@ PciSegmentRead16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentWrite16 (
|
||||
IN UINT64 Address,
|
||||
IN UINT16 Value
|
||||
IN UINT64 Address,
|
||||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1);
|
||||
@@ -470,11 +470,11 @@ PciSegmentWrite16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentOr16 (
|
||||
IN UINT64 Address,
|
||||
IN UINT16 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINT16 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) | OrData));
|
||||
return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) | OrData));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -498,11 +498,11 @@ PciSegmentOr16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentAnd16 (
|
||||
IN UINT64 Address,
|
||||
IN UINT16 AndData
|
||||
IN UINT64 Address,
|
||||
IN UINT16 AndData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) & AndData));
|
||||
return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) & AndData));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -529,12 +529,12 @@ PciSegmentAnd16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentAndThenOr16 (
|
||||
IN UINT64 Address,
|
||||
IN UINT16 AndData,
|
||||
IN UINT16 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINT16 AndData,
|
||||
IN UINT16 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite16 (Address, (UINT16) ((PciSegmentRead16 (Address) & AndData) | OrData));
|
||||
return PciSegmentWrite16 (Address, (UINT16)((PciSegmentRead16 (Address) & AndData) | OrData));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -562,9 +562,9 @@ PciSegmentAndThenOr16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentBitFieldRead16 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit
|
||||
)
|
||||
{
|
||||
return BitFieldRead16 (PciSegmentRead16 (Address), StartBit, EndBit);
|
||||
@@ -598,10 +598,10 @@ PciSegmentBitFieldRead16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentBitFieldWrite16 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 Value
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite16 (
|
||||
@@ -641,10 +641,10 @@ PciSegmentBitFieldWrite16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentBitFieldOr16 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite16 (
|
||||
@@ -684,10 +684,10 @@ PciSegmentBitFieldOr16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentBitFieldAnd16 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 AndData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 AndData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite16 (
|
||||
@@ -730,11 +730,11 @@ PciSegmentBitFieldAnd16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
PciSegmentBitFieldAndThenOr16 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 AndData,
|
||||
IN UINT16 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT16 AndData,
|
||||
IN UINT16 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite16 (
|
||||
@@ -760,7 +760,7 @@ PciSegmentBitFieldAndThenOr16 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentRead32 (
|
||||
IN UINT64 Address
|
||||
IN UINT64 Address
|
||||
)
|
||||
{
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3);
|
||||
@@ -786,8 +786,8 @@ PciSegmentRead32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentWrite32 (
|
||||
IN UINT64 Address,
|
||||
IN UINT32 Value
|
||||
IN UINT64 Address,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3);
|
||||
@@ -816,8 +816,8 @@ PciSegmentWrite32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentOr32 (
|
||||
IN UINT64 Address,
|
||||
IN UINT32 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINT32 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) | OrData);
|
||||
@@ -844,8 +844,8 @@ PciSegmentOr32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentAnd32 (
|
||||
IN UINT64 Address,
|
||||
IN UINT32 AndData
|
||||
IN UINT64 Address,
|
||||
IN UINT32 AndData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) & AndData);
|
||||
@@ -875,9 +875,9 @@ PciSegmentAnd32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentAndThenOr32 (
|
||||
IN UINT64 Address,
|
||||
IN UINT32 AndData,
|
||||
IN UINT32 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINT32 AndData,
|
||||
IN UINT32 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite32 (Address, (PciSegmentRead32 (Address) & AndData) | OrData);
|
||||
@@ -908,9 +908,9 @@ PciSegmentAndThenOr32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentBitFieldRead32 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit
|
||||
)
|
||||
{
|
||||
return BitFieldRead32 (PciSegmentRead32 (Address), StartBit, EndBit);
|
||||
@@ -944,10 +944,10 @@ PciSegmentBitFieldRead32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentBitFieldWrite32 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 Value
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite32 (
|
||||
@@ -986,10 +986,10 @@ PciSegmentBitFieldWrite32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentBitFieldOr32 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite32 (
|
||||
@@ -1028,10 +1028,10 @@ PciSegmentBitFieldOr32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentBitFieldAnd32 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 AndData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 AndData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite32 (
|
||||
@@ -1074,11 +1074,11 @@ PciSegmentBitFieldAnd32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
PciSegmentBitFieldAndThenOr32 (
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 AndData,
|
||||
IN UINT32 OrData
|
||||
IN UINT64 Address,
|
||||
IN UINTN StartBit,
|
||||
IN UINTN EndBit,
|
||||
IN UINT32 AndData,
|
||||
IN UINT32 OrData
|
||||
)
|
||||
{
|
||||
return PciSegmentWrite32 (
|
||||
@@ -1113,12 +1113,12 @@ PciSegmentBitFieldAndThenOr32 (
|
||||
UINTN
|
||||
EFIAPI
|
||||
PciSegmentReadBuffer (
|
||||
IN UINT64 StartAddress,
|
||||
IN UINTN Size,
|
||||
OUT VOID *Buffer
|
||||
IN UINT64 StartAddress,
|
||||
IN UINTN Size,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
{
|
||||
UINTN ReturnValue;
|
||||
UINTN ReturnValue;
|
||||
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0);
|
||||
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
|
||||
@@ -1139,19 +1139,19 @@ PciSegmentReadBuffer (
|
||||
// Read a byte if StartAddress is byte aligned
|
||||
//
|
||||
*(volatile UINT8 *)Buffer = PciSegmentRead8 (StartAddress);
|
||||
StartAddress += sizeof (UINT8);
|
||||
Size -= sizeof (UINT8);
|
||||
Buffer = (UINT8*)Buffer + 1;
|
||||
StartAddress += sizeof (UINT8);
|
||||
Size -= sizeof (UINT8);
|
||||
Buffer = (UINT8 *)Buffer + 1;
|
||||
}
|
||||
|
||||
if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {
|
||||
if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) {
|
||||
//
|
||||
// Read a word if StartAddress is word aligned
|
||||
//
|
||||
WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress));
|
||||
StartAddress += sizeof (UINT16);
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16*)Buffer + 1;
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16 *)Buffer + 1;
|
||||
}
|
||||
|
||||
while (Size >= sizeof (UINT32)) {
|
||||
@@ -1160,8 +1160,8 @@ PciSegmentReadBuffer (
|
||||
//
|
||||
WriteUnaligned32 (Buffer, PciSegmentRead32 (StartAddress));
|
||||
StartAddress += sizeof (UINT32);
|
||||
Size -= sizeof (UINT32);
|
||||
Buffer = (UINT32*)Buffer + 1;
|
||||
Size -= sizeof (UINT32);
|
||||
Buffer = (UINT32 *)Buffer + 1;
|
||||
}
|
||||
|
||||
if (Size >= sizeof (UINT16)) {
|
||||
@@ -1170,8 +1170,8 @@ PciSegmentReadBuffer (
|
||||
//
|
||||
WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress));
|
||||
StartAddress += sizeof (UINT16);
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16*)Buffer + 1;
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16 *)Buffer + 1;
|
||||
}
|
||||
|
||||
if (Size >= sizeof (UINT8)) {
|
||||
@@ -1211,12 +1211,12 @@ PciSegmentReadBuffer (
|
||||
UINTN
|
||||
EFIAPI
|
||||
PciSegmentWriteBuffer (
|
||||
IN UINT64 StartAddress,
|
||||
IN UINTN Size,
|
||||
IN VOID *Buffer
|
||||
IN UINT64 StartAddress,
|
||||
IN UINTN Size,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
UINTN ReturnValue;
|
||||
UINTN ReturnValue;
|
||||
|
||||
ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0);
|
||||
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
|
||||
@@ -1236,20 +1236,20 @@ PciSegmentWriteBuffer (
|
||||
//
|
||||
// Write a byte if StartAddress is byte aligned
|
||||
//
|
||||
PciSegmentWrite8 (StartAddress, *(UINT8*) Buffer);
|
||||
PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer);
|
||||
StartAddress += sizeof (UINT8);
|
||||
Size -= sizeof (UINT8);
|
||||
Buffer = (UINT8*) Buffer + 1;
|
||||
Size -= sizeof (UINT8);
|
||||
Buffer = (UINT8 *)Buffer + 1;
|
||||
}
|
||||
|
||||
if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {
|
||||
if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) {
|
||||
//
|
||||
// Write a word if StartAddress is word aligned
|
||||
//
|
||||
PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer));
|
||||
StartAddress += sizeof (UINT16);
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16*) Buffer + 1;
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16 *)Buffer + 1;
|
||||
}
|
||||
|
||||
while (Size >= sizeof (UINT32)) {
|
||||
@@ -1258,8 +1258,8 @@ PciSegmentWriteBuffer (
|
||||
//
|
||||
PciSegmentWrite32 (StartAddress, ReadUnaligned32 (Buffer));
|
||||
StartAddress += sizeof (UINT32);
|
||||
Size -= sizeof (UINT32);
|
||||
Buffer = (UINT32*) Buffer + 1;
|
||||
Size -= sizeof (UINT32);
|
||||
Buffer = (UINT32 *)Buffer + 1;
|
||||
}
|
||||
|
||||
if (Size >= sizeof (UINT16)) {
|
||||
@@ -1268,15 +1268,15 @@ PciSegmentWriteBuffer (
|
||||
//
|
||||
PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer));
|
||||
StartAddress += sizeof (UINT16);
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16*) Buffer + 1;
|
||||
Size -= sizeof (UINT16);
|
||||
Buffer = (UINT16 *)Buffer + 1;
|
||||
}
|
||||
|
||||
if (Size >= sizeof (UINT8)) {
|
||||
//
|
||||
// Write the last remaining byte if exist
|
||||
//
|
||||
PciSegmentWrite8 (StartAddress, *(UINT8*) Buffer);
|
||||
PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer);
|
||||
}
|
||||
|
||||
return ReturnValue;
|
||||
|
Reference in New Issue
Block a user