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,19 +22,19 @@
|
||||
/// Define table for mapping PCI Segment MMIO physical addresses to virtual addresses at OS runtime
|
||||
///
|
||||
typedef struct {
|
||||
UINTN PhysicalAddress;
|
||||
UINTN VirtualAddress;
|
||||
UINTN PhysicalAddress;
|
||||
UINTN VirtualAddress;
|
||||
} PCI_SEGMENT_RUNTIME_REGISTRATION_TABLE;
|
||||
|
||||
///
|
||||
/// Set Virtual Address Map Event
|
||||
///
|
||||
EFI_EVENT mDxeRuntimePciSegmentLibVirtualNotifyEvent = NULL;
|
||||
EFI_EVENT mDxeRuntimePciSegmentLibVirtualNotifyEvent = NULL;
|
||||
|
||||
///
|
||||
/// The number of PCI devices that have been registered for runtime access.
|
||||
///
|
||||
UINTN mDxeRuntimePciSegmentLibNumberOfRuntimeRanges = 0;
|
||||
UINTN mDxeRuntimePciSegmentLibNumberOfRuntimeRanges = 0;
|
||||
|
||||
///
|
||||
/// The table of PCI devices that have been registered for runtime access.
|
||||
@@ -44,7 +44,7 @@ PCI_SEGMENT_RUNTIME_REGISTRATION_TABLE *mDxeRuntimePciSegmentLibRegistrationTab
|
||||
///
|
||||
/// The table index of the most recent virtual address lookup.
|
||||
///
|
||||
UINTN mDxeRuntimePciSegmentLibLastRuntimeRange = 0;
|
||||
UINTN mDxeRuntimePciSegmentLibLastRuntimeRange = 0;
|
||||
|
||||
/**
|
||||
Convert the physical PCI Express MMIO addresses for all registered PCI devices
|
||||
@@ -60,8 +60,8 @@ DxeRuntimePciSegmentLibVirtualNotify (
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// If there have been no runtime registrations, then just return
|
||||
@@ -75,14 +75,14 @@ DxeRuntimePciSegmentLibVirtualNotify (
|
||||
// virtual addresses.
|
||||
//
|
||||
for (Index = 0; Index < mDxeRuntimePciSegmentLibNumberOfRuntimeRanges; Index++) {
|
||||
Status = EfiConvertPointer (0, (VOID **) &(mDxeRuntimePciSegmentLibRegistrationTable[Index].VirtualAddress));
|
||||
Status = EfiConvertPointer (0, (VOID **)&(mDxeRuntimePciSegmentLibRegistrationTable[Index].VirtualAddress));
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
//
|
||||
// Convert table pointer that is allocated from EfiRuntimeServicesData to a virtual address.
|
||||
//
|
||||
Status = EfiConvertPointer (0, (VOID **) &mDxeRuntimePciSegmentLibRegistrationTable);
|
||||
Status = EfiConvertPointer (0, (VOID **)&mDxeRuntimePciSegmentLibRegistrationTable);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ PciSegmentRegisterForRuntimeAccess (
|
||||
// Convert Address to a ECAM address at the beginning of the PCI Configuration
|
||||
// header for the specified PCI Bus/Dev/Func
|
||||
//
|
||||
Address &= ~(UINTN)EFI_PAGE_MASK;
|
||||
Address &= ~(UINTN)EFI_PAGE_MASK;
|
||||
SegmentInfo = GetPciSegmentInfo (&Count);
|
||||
EcamAddress = PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count);
|
||||
|
||||
@@ -204,9 +204,11 @@ PciSegmentRegisterForRuntimeAccess (
|
||||
if (EfiAtRuntime ()) {
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
ASSERT (EcamAddress < BASE_4GB);
|
||||
}
|
||||
|
||||
Address = (UINTN)EcamAddress;
|
||||
|
||||
//
|
||||
@@ -246,7 +248,8 @@ PciSegmentRegisterForRuntimeAccess (
|
||||
if (NewTable == NULL) {
|
||||
return RETURN_OUT_OF_RESOURCES;
|
||||
}
|
||||
mDxeRuntimePciSegmentLibRegistrationTable = NewTable;
|
||||
|
||||
mDxeRuntimePciSegmentLibRegistrationTable = NewTable;
|
||||
mDxeRuntimePciSegmentLibRegistrationTable[mDxeRuntimePciSegmentLibNumberOfRuntimeRanges].PhysicalAddress = Address;
|
||||
mDxeRuntimePciSegmentLibRegistrationTable[mDxeRuntimePciSegmentLibNumberOfRuntimeRanges].VirtualAddress = Address;
|
||||
mDxeRuntimePciSegmentLibNumberOfRuntimeRanges++;
|
||||
@@ -263,10 +266,11 @@ PciSegmentRegisterForRuntimeAccess (
|
||||
**/
|
||||
UINTN
|
||||
PciSegmentLibVirtualAddress (
|
||||
IN UINTN Address
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
UINTN Index;
|
||||
|
||||
//
|
||||
// If SetVirtualAddressMap() has not been called, then just return the physical address
|
||||
//
|
||||
|
Reference in New Issue
Block a user