OvmfPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the OvmfPkg 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: Andrew Fish <afish@apple.com>
This commit is contained in:
committed by
mergify[bot]
parent
d1050b9dff
commit
ac0a286f4d
@@ -9,7 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
#include "LegacyBiosInterface.h"
|
||||
|
||||
BOOLEAN mIdeDataBuiltFlag = FALSE;
|
||||
BOOLEAN mIdeDataBuiltFlag = FALSE;
|
||||
|
||||
/**
|
||||
Collect IDE Inquiry data from the IDE disks
|
||||
@@ -23,9 +23,9 @@ BOOLEAN mIdeDataBuiltFlag = FALSE;
|
||||
**/
|
||||
EFI_STATUS
|
||||
LegacyBiosBuildIdeData (
|
||||
IN LEGACY_BIOS_INSTANCE *Private,
|
||||
IN HDD_INFO **HddInfo,
|
||||
IN UINT16 Flag
|
||||
IN LEGACY_BIOS_INSTANCE *Private,
|
||||
IN HDD_INFO **HddInfo,
|
||||
IN UINT16 Flag
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -60,14 +60,14 @@ LegacyBiosBuildIdeData (
|
||||
//
|
||||
PciDevicePath = NULL;
|
||||
LocalHddInfo = *HddInfo;
|
||||
Status = Private->LegacyBiosPlatform->GetPlatformHandle (
|
||||
Private->LegacyBiosPlatform,
|
||||
EfiGetPlatformIdeHandle,
|
||||
0,
|
||||
&HandleBuffer,
|
||||
&HandleCount,
|
||||
(VOID *) &LocalHddInfo
|
||||
);
|
||||
Status = Private->LegacyBiosPlatform->GetPlatformHandle (
|
||||
Private->LegacyBiosPlatform,
|
||||
EfiGetPlatformIdeHandle,
|
||||
0,
|
||||
&HandleBuffer,
|
||||
&HandleCount,
|
||||
(VOID *)&LocalHddInfo
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
IdeController = HandleBuffer[0];
|
||||
//
|
||||
@@ -75,10 +75,10 @@ LegacyBiosBuildIdeData (
|
||||
//
|
||||
if (Flag != 0) {
|
||||
gBS->DisconnectController (
|
||||
IdeController,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
IdeController,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
gBS->ConnectController (IdeController, NULL, NULL, FALSE);
|
||||
@@ -88,13 +88,13 @@ LegacyBiosBuildIdeData (
|
||||
// And GetIdeHandle will switch to Legacy mode, if required.
|
||||
//
|
||||
Private->LegacyBiosPlatform->GetPlatformHandle (
|
||||
Private->LegacyBiosPlatform,
|
||||
EfiGetPlatformIdeHandle,
|
||||
0,
|
||||
&HandleBuffer,
|
||||
&HandleCount,
|
||||
(VOID *) &LocalHddInfo
|
||||
);
|
||||
Private->LegacyBiosPlatform,
|
||||
EfiGetPlatformIdeHandle,
|
||||
0,
|
||||
&HandleBuffer,
|
||||
&HandleCount,
|
||||
(VOID *)&LocalHddInfo
|
||||
);
|
||||
}
|
||||
|
||||
mIdeDataBuiltFlag = TRUE;
|
||||
@@ -103,19 +103,19 @@ LegacyBiosBuildIdeData (
|
||||
// Get Identity command from all drives
|
||||
//
|
||||
gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiDiskInfoProtocolGuid,
|
||||
NULL,
|
||||
&HandleCount,
|
||||
&HandleBuffer
|
||||
);
|
||||
ByProtocol,
|
||||
&gEfiDiskInfoProtocolGuid,
|
||||
NULL,
|
||||
&HandleCount,
|
||||
&HandleBuffer
|
||||
);
|
||||
|
||||
Private->IdeDriveCount = (UINT8) HandleCount;
|
||||
Private->IdeDriveCount = (UINT8)HandleCount;
|
||||
for (Index = 0; Index < HandleCount; Index++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
HandleBuffer[Index],
|
||||
&gEfiDiskInfoProtocolGuid,
|
||||
(VOID **) &DiskInfo
|
||||
(VOID **)&DiskInfo
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
@@ -126,7 +126,7 @@ LegacyBiosBuildIdeData (
|
||||
Status = gBS->HandleProtocol (
|
||||
HandleBuffer[Index],
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID *) &DevicePath
|
||||
(VOID *)&DevicePath
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
@@ -134,12 +134,14 @@ LegacyBiosBuildIdeData (
|
||||
while (!IsDevicePathEnd (DevicePathNode)) {
|
||||
TempDevicePathNode = NextDevicePathNode (DevicePathNode);
|
||||
if ((DevicePathType (DevicePathNode) == HARDWARE_DEVICE_PATH) &&
|
||||
( DevicePathSubType (DevicePathNode) == HW_PCI_DP) &&
|
||||
( DevicePathType(TempDevicePathNode) == MESSAGING_DEVICE_PATH) &&
|
||||
( DevicePathSubType(TempDevicePathNode) == MSG_ATAPI_DP) ) {
|
||||
PciDevicePath = (PCI_DEVICE_PATH *) DevicePathNode;
|
||||
(DevicePathSubType (DevicePathNode) == HW_PCI_DP) &&
|
||||
(DevicePathType (TempDevicePathNode) == MESSAGING_DEVICE_PATH) &&
|
||||
(DevicePathSubType (TempDevicePathNode) == MSG_ATAPI_DP))
|
||||
{
|
||||
PciDevicePath = (PCI_DEVICE_PATH *)DevicePathNode;
|
||||
break;
|
||||
}
|
||||
|
||||
DevicePathNode = NextDevicePathNode (DevicePathNode);
|
||||
}
|
||||
|
||||
@@ -161,7 +163,8 @@ LegacyBiosBuildIdeData (
|
||||
for (PciIndex = 0; PciIndex < 8; PciIndex++) {
|
||||
if ((PciDevicePath->Device == LocalHddInfo[PciIndex].Device) &&
|
||||
(PciDevicePath->Function == LocalHddInfo[PciIndex].Function)
|
||||
) {
|
||||
)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -186,15 +189,15 @@ LegacyBiosBuildIdeData (
|
||||
|
||||
InquiryData = NULL;
|
||||
InquiryDataSize = 0;
|
||||
Status = DiskInfo->Inquiry (
|
||||
DiskInfo,
|
||||
NULL,
|
||||
&InquiryDataSize
|
||||
);
|
||||
Status = DiskInfo->Inquiry (
|
||||
DiskInfo,
|
||||
NULL,
|
||||
&InquiryDataSize
|
||||
);
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
InquiryData = (UINT8 *) AllocatePool (
|
||||
InquiryDataSize
|
||||
);
|
||||
InquiryData = (UINT8 *)AllocatePool (
|
||||
InquiryDataSize
|
||||
);
|
||||
if (InquiryData != NULL) {
|
||||
Status = DiskInfo->Inquiry (
|
||||
DiskInfo,
|
||||
@@ -227,6 +230,7 @@ LegacyBiosBuildIdeData (
|
||||
LocalHddInfo[PciIndex + IdeChannel].Status |= HDD_SLAVE_ATAPI_ZIPDISK;
|
||||
}
|
||||
}
|
||||
|
||||
FreePool (InquiryData);
|
||||
} else {
|
||||
if (IdeDevice == 0) {
|
||||
@@ -246,7 +250,6 @@ LegacyBiosBuildIdeData (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
If the IDE channel is in compatibility (legacy) mode, remove all
|
||||
PCI I/O BAR addresses from the controller.
|
||||
@@ -257,13 +260,13 @@ LegacyBiosBuildIdeData (
|
||||
**/
|
||||
VOID
|
||||
InitLegacyIdeController (
|
||||
IN EFI_HANDLE IdeController
|
||||
IN EFI_HANDLE IdeController
|
||||
)
|
||||
{
|
||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||
UINT32 IOBarClear;
|
||||
EFI_STATUS Status;
|
||||
PCI_TYPE00 PciData;
|
||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||
UINT32 IOBarClear;
|
||||
EFI_STATUS Status;
|
||||
PCI_TYPE00 PciData;
|
||||
|
||||
//
|
||||
// If the IDE channel is in compatibility (legacy) mode, remove all
|
||||
@@ -277,20 +280,21 @@ InitLegacyIdeController (
|
||||
(VOID **)&PciIo
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0, sizeof (PciData), &PciData);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Check whether this is IDE
|
||||
//
|
||||
if ((PciData.Hdr.ClassCode[2] != PCI_CLASS_MASS_STORAGE) ||
|
||||
(PciData.Hdr.ClassCode[1] != PCI_CLASS_MASS_STORAGE_IDE)) {
|
||||
return ;
|
||||
(PciData.Hdr.ClassCode[1] != PCI_CLASS_MASS_STORAGE_IDE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -301,10 +305,11 @@ InitLegacyIdeController (
|
||||
PciIo->Pci.Write (PciIo, EfiPciIoWidthUint32, 0x10, 1, &IOBarClear);
|
||||
PciIo->Pci.Write (PciIo, EfiPciIoWidthUint32, 0x14, 1, &IOBarClear);
|
||||
}
|
||||
|
||||
if ((PciData.Hdr.ClassCode[0] & IDE_PI_REGISTER_SNE) == 0) {
|
||||
PciIo->Pci.Write (PciIo, EfiPciIoWidthUint32, 0x18, 1, &IOBarClear);
|
||||
PciIo->Pci.Write (PciIo, EfiPciIoWidthUint32, 0x1C, 1, &IOBarClear);
|
||||
}
|
||||
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user