diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:09 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | ac0a286f4d747a4c6c603a7b225917293cbe1e9f (patch) | |
tree | 32654f2b35755afc961e2c97296b2dec5762da75 /OvmfPkg/SioBusDxe | |
parent | d1050b9dff1cace252aff86630bfdb59dff5f507 (diff) | |
download | edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.gz edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.bz2 edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.zip |
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>
Diffstat (limited to 'OvmfPkg/SioBusDxe')
-rw-r--r-- | OvmfPkg/SioBusDxe/ComponentName.c | 27 | ||||
-rw-r--r-- | OvmfPkg/SioBusDxe/SioBusDxe.c | 129 | ||||
-rw-r--r-- | OvmfPkg/SioBusDxe/SioBusDxe.h | 45 | ||||
-rw-r--r-- | OvmfPkg/SioBusDxe/SioService.c | 99 | ||||
-rw-r--r-- | OvmfPkg/SioBusDxe/SioService.h | 39 |
5 files changed, 171 insertions, 168 deletions
diff --git a/OvmfPkg/SioBusDxe/ComponentName.c b/OvmfPkg/SioBusDxe/ComponentName.c index 197dc6f746..b7e4ae3898 100644 --- a/OvmfPkg/SioBusDxe/ComponentName.c +++ b/OvmfPkg/SioBusDxe/ComponentName.c @@ -12,9 +12,9 @@ //
// Driver name table
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mSioBusDriverNameTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mSioBusDriverNameTable[] = {
{ "eng;en", L"OVMF Sio Bus Driver" },
- { NULL , NULL }
+ { NULL, NULL }
};
//
@@ -29,13 +29,12 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gSioBusComponentName //
// EFI Component Name 2 Protocol
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gSioBusComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) SioBusComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) SioBusComponentNameGetControllerName,
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gSioBusComponentName2 = {
+ (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)SioBusComponentNameGetDriverName,
+ (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)SioBusComponentNameGetControllerName,
"en"
};
-
/**
Retrieves a Unicode string that is the user readable name of the driver.
@@ -73,9 +72,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gSioBusComponentName2 EFI_STATUS
EFIAPI
SioBusComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
)
{
return LookupUnicodeString2 (
@@ -149,11 +148,11 @@ SioBusComponentNameGetDriverName ( EFI_STATUS
EFIAPI
SioBusComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
)
{
return EFI_UNSUPPORTED;
diff --git a/OvmfPkg/SioBusDxe/SioBusDxe.c b/OvmfPkg/SioBusDxe/SioBusDxe.c index 43a1701afa..bb2c5bf80b 100644 --- a/OvmfPkg/SioBusDxe/SioBusDxe.c +++ b/OvmfPkg/SioBusDxe/SioBusDxe.c @@ -13,7 +13,7 @@ //
// SioBus Driver Binding Protocol
//
-EFI_DRIVER_BINDING_PROTOCOL gSioBusDriverBinding = {
+EFI_DRIVER_BINDING_PROTOCOL gSioBusDriverBinding = {
SioBusDriverBindingSupported,
SioBusDriverBindingStart,
SioBusDriverBindingStop,
@@ -22,7 +22,6 @@ EFI_DRIVER_BINDING_PROTOCOL gSioBusDriverBinding = { NULL
};
-
/**
Tests to see if this driver supports a given controller. If a child device is
provided, it further tests to see if this driver supports creating a handle
@@ -79,18 +78,18 @@ EFI_DRIVER_BINDING_PROTOCOL gSioBusDriverBinding = { EFI_STATUS
EFIAPI
SioBusDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Controller,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
- EFI_STATUS Status;
- EFI_PCI_IO_PROTOCOL *PciIo;
- PCI_TYPE00 Pci;
- UINTN SegmentNumber;
- UINTN BusNumber;
- UINTN DeviceNumber;
- UINTN FunctionNumber;
+ EFI_STATUS Status;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ PCI_TYPE00 Pci;
+ UINTN SegmentNumber;
+ UINTN BusNumber;
+ UINTN DeviceNumber;
+ UINTN FunctionNumber;
//
// Get PciIo protocol instance
@@ -98,21 +97,22 @@ SioBusDriverBindingSupported ( Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- (VOID**)&PciIo,
+ (VOID **)&PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
- if (EFI_ERROR(Status)) {
+ if (EFI_ERROR (Status)) {
return Status;
}
Status = PciIo->Pci.Read (
- PciIo,
- EfiPciIoWidthUint32,
- 0,
- sizeof(Pci) / sizeof(UINT32),
- &Pci);
+ PciIo,
+ EfiPciIoWidthUint32,
+ 0,
+ sizeof (Pci) / sizeof (UINT32),
+ &Pci
+ );
if (!EFI_ERROR (Status)) {
Status = EFI_UNSUPPORTED;
@@ -129,8 +129,9 @@ SioBusDriverBindingSupported ( //
// See if this is an Intel PCI to ISA bridge in Positive Decode Mode
//
- if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE &&
- Pci.Hdr.VendorId == 0x8086) {
+ if ((Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE) &&
+ (Pci.Hdr.VendorId == 0x8086))
+ {
//
// See if this is on Function #0 to avoid false positives on
// PCI_CLASS_BRIDGE_OTHER that has the same value as
@@ -143,7 +144,7 @@ SioBusDriverBindingSupported ( &DeviceNumber,
&FunctionNumber
);
- if (!EFI_ERROR (Status) && FunctionNumber == 0) {
+ if (!EFI_ERROR (Status) && (FunctionNumber == 0)) {
Status = EFI_SUCCESS;
} else {
Status = EFI_UNSUPPORTED;
@@ -212,20 +213,20 @@ SioBusDriverBindingSupported ( EFI_STATUS
EFIAPI
SioBusDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Controller,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
- EFI_STATUS Status;
- EFI_PCI_IO_PROTOCOL *PciIo;
- EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
- UINT64 Supports;
- UINT64 OriginalAttributes;
- UINT64 Attributes;
- BOOLEAN Enabled;
- SIO_BUS_DRIVER_PRIVATE_DATA *Private;
- UINT32 ChildDeviceNumber;
+ EFI_STATUS Status;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
+ UINT64 Supports;
+ UINT64 OriginalAttributes;
+ UINT64 Attributes;
+ BOOLEAN Enabled;
+ SIO_BUS_DRIVER_PRIVATE_DATA *Private;
+ UINT32 ChildDeviceNumber;
Enabled = FALSE;
Supports = 0;
@@ -235,11 +236,11 @@ SioBusDriverBindingStart ( //
// Open the PCI I/O Protocol Interface
//
- PciIo = NULL;
+ PciIo = NULL;
Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- (VOID**) &PciIo,
+ (VOID **)&PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -254,7 +255,7 @@ SioBusDriverBindingStart ( Status = gBS->OpenProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
- (VOID **) &ParentDevicePath,
+ (VOID **)&ParentDevicePath,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -282,11 +283,12 @@ SioBusDriverBindingStart ( goto Done;
}
- Supports &= (UINT64) (EFI_PCI_IO_ATTRIBUTE_ISA_IO |
- EFI_PCI_IO_ATTRIBUTE_ISA_IO_16);
- if (Supports == 0 ||
- Supports == (EFI_PCI_IO_ATTRIBUTE_ISA_IO |
- EFI_PCI_IO_ATTRIBUTE_ISA_IO_16)) {
+ Supports &= (UINT64)(EFI_PCI_IO_ATTRIBUTE_ISA_IO |
+ EFI_PCI_IO_ATTRIBUTE_ISA_IO_16);
+ if ((Supports == 0) ||
+ (Supports == (EFI_PCI_IO_ATTRIBUTE_ISA_IO |
+ EFI_PCI_IO_ATTRIBUTE_ISA_IO_16)))
+ {
Status = EFI_UNSUPPORTED;
goto Done;
}
@@ -324,6 +326,7 @@ SioBusDriverBindingStart ( Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
+
Private->PciIo = PciIo;
Private->OriginalAttributes = OriginalAttributes;
@@ -370,7 +373,7 @@ SioBusDriverBindingStart ( Done:
if (EFI_ERROR (Status)) {
- if (PciIo != NULL && Enabled) {
+ if ((PciIo != NULL) && Enabled) {
PciIo->Attributes (
PciIo,
EfiPciIoAttributeOperationSet,
@@ -445,19 +448,19 @@ Done: EFI_STATUS
EFIAPI
SioBusDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Controller,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE *ChildHandleBuffer
)
{
- EFI_STATUS Status;
- SIO_BUS_DRIVER_PRIVATE_DATA *Private;
- UINTN Index;
- BOOLEAN AllChildrenStopped;
- EFI_SIO_PROTOCOL *Sio;
- SIO_DEV *SioDevice;
- EFI_PCI_IO_PROTOCOL *PciIo;
+ EFI_STATUS Status;
+ SIO_BUS_DRIVER_PRIVATE_DATA *Private;
+ UINTN Index;
+ BOOLEAN AllChildrenStopped;
+ EFI_SIO_PROTOCOL *Sio;
+ SIO_DEV *SioDevice;
+ EFI_PCI_IO_PROTOCOL *PciIo;
if (NumberOfChildren == 0) {
//
@@ -466,7 +469,7 @@ SioBusDriverBindingStop ( Status = gBS->OpenProtocol (
Controller,
&gEfiCallerIdGuid,
- (VOID **) &Private,
+ (VOID **)&Private,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -486,10 +489,10 @@ SioBusDriverBindingStop ( }
gBS->UninstallProtocolInterface (
- Controller,
- &gEfiCallerIdGuid,
- Private
- );
+ Controller,
+ &gEfiCallerIdGuid,
+ Private
+ );
FreePool (Private);
//
@@ -527,7 +530,7 @@ SioBusDriverBindingStop ( Status = gBS->OpenProtocol (
ChildHandleBuffer[Index],
&gEfiSioProtocolGuid,
- (VOID **) &Sio,
+ (VOID **)&Sio,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -564,7 +567,7 @@ SioBusDriverBindingStop ( gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
+ (VOID **)&PciIo,
This->DriverBindingHandle,
ChildHandleBuffer[Index],
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
@@ -597,8 +600,8 @@ SioBusDriverBindingStop ( EFI_STATUS
EFIAPI
SioBusDxeDriverEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
//
diff --git a/OvmfPkg/SioBusDxe/SioBusDxe.h b/OvmfPkg/SioBusDxe/SioBusDxe.h index ae338787e8..0fc4ed8cf7 100644 --- a/OvmfPkg/SioBusDxe/SioBusDxe.h +++ b/OvmfPkg/SioBusDxe/SioBusDxe.h @@ -37,13 +37,11 @@ typedef struct { UINT64 OriginalAttributes;
} SIO_BUS_DRIVER_PRIVATE_DATA;
-
//
// Global Variables
//
-extern EFI_COMPONENT_NAME_PROTOCOL gSioBusComponentName;
-extern EFI_COMPONENT_NAME2_PROTOCOL gSioBusComponentName2;
-
+extern EFI_COMPONENT_NAME_PROTOCOL gSioBusComponentName;
+extern EFI_COMPONENT_NAME2_PROTOCOL gSioBusComponentName2;
//
// EFI Component Name Functions
@@ -86,9 +84,9 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gSioBusComponentName2; EFI_STATUS
EFIAPI
SioBusComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
);
/**
@@ -153,14 +151,13 @@ SioBusComponentNameGetDriverName ( EFI_STATUS
EFIAPI
SioBusComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
);
-
//
// Driver Binding Protocol interfaces
//
@@ -221,9 +218,9 @@ SioBusComponentNameGetControllerName ( EFI_STATUS
EFIAPI
SioBusDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Controller,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
/**
@@ -275,9 +272,9 @@ SioBusDriverBindingSupported ( EFI_STATUS
EFIAPI
SioBusDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Controller,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
/**
@@ -316,10 +313,10 @@ SioBusDriverBindingStart ( EFI_STATUS
EFIAPI
SioBusDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Controller,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE *ChildHandleBuffer
);
-#endif // __SIO_BUS_DXE_H__
+#endif // __SIO_BUS_DXE_H__
diff --git a/OvmfPkg/SioBusDxe/SioService.c b/OvmfPkg/SioBusDxe/SioService.c index ab8fa7676f..66c5a08cf9 100644 --- a/OvmfPkg/SioBusDxe/SioService.c +++ b/OvmfPkg/SioBusDxe/SioService.c @@ -13,7 +13,7 @@ //
// Super I/O Protocol interfaces
//
-EFI_SIO_PROTOCOL mSioInterface = {
+EFI_SIO_PROTOCOL mSioInterface = {
SioRegisterAccess,
SioGetResources,
SioSetResources,
@@ -25,48 +25,54 @@ EFI_SIO_PROTOCOL mSioInterface = { // COM 1 UART Controller
//
GLOBAL_REMOVE_IF_UNREFERENCED
-SIO_RESOURCES_IO mCom1Resources = {
- { { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, 0x3F8, 8 },
- { ACPI_END_TAG_DESCRIPTOR, 0 }
+SIO_RESOURCES_IO mCom1Resources = {
+ {
+ { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, 0x3F8, 8
+ },
+ { ACPI_END_TAG_DESCRIPTOR, 0 }
};
//
// COM 2 UART Controller
//
GLOBAL_REMOVE_IF_UNREFERENCED
-SIO_RESOURCES_IO mCom2Resources = {
- { { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, 0x2F8, 8 },
- { ACPI_END_TAG_DESCRIPTOR, 0 }
+SIO_RESOURCES_IO mCom2Resources = {
+ {
+ { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, 0x2F8, 8
+ },
+ { ACPI_END_TAG_DESCRIPTOR, 0 }
};
//
// PS/2 Keyboard Controller
//
GLOBAL_REMOVE_IF_UNREFERENCED
-SIO_RESOURCES_IO mPs2KeyboardDeviceResources = {
- { { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, 0x60, 5 },
- { ACPI_END_TAG_DESCRIPTOR, 0 }
+SIO_RESOURCES_IO mPs2KeyboardDeviceResources = {
+ {
+ { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, 0x60, 5
+ },
+ { ACPI_END_TAG_DESCRIPTOR, 0 }
};
//
// Table of SIO Controllers
//
GLOBAL_REMOVE_IF_UNREFERENCED
-SIO_DEVICE_INFO mDevicesInfo[] = {
+SIO_DEVICE_INFO mDevicesInfo[] = {
{
EISA_PNP_ID (0x501),
0,
- { (ACPI_SMALL_RESOURCE_HEADER *) &mCom1Resources }
+ { (ACPI_SMALL_RESOURCE_HEADER *)&mCom1Resources }
}, // COM 1 UART Controller
{
EISA_PNP_ID (0x501),
1,
- { (ACPI_SMALL_RESOURCE_HEADER *) &mCom2Resources }
+ { (ACPI_SMALL_RESOURCE_HEADER *)&mCom2Resources }
}, // COM 2 UART Controller
{
- EISA_PNP_ID(0x303),
+ EISA_PNP_ID (0x303),
0,
- { (ACPI_SMALL_RESOURCE_HEADER *) &mPs2KeyboardDeviceResources }
+ { (ACPI_SMALL_RESOURCE_HEADER *)&mPs2KeyboardDeviceResources }
} // PS/2 Keyboard Controller
};
@@ -74,20 +80,19 @@ SIO_DEVICE_INFO mDevicesInfo[] = { // ACPI Device Path Node template
//
GLOBAL_REMOVE_IF_UNREFERENCED
-ACPI_HID_DEVICE_PATH mAcpiDeviceNodeTemplate = {
+ACPI_HID_DEVICE_PATH mAcpiDeviceNodeTemplate = {
{ // Header
ACPI_DEVICE_PATH,
ACPI_DP,
{
- (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)),
- (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8)
+ (UINT8)(sizeof (ACPI_HID_DEVICE_PATH)),
+ (UINT8)((sizeof (ACPI_HID_DEVICE_PATH)) >> 8)
}
},
0x0, // HID
0x0 // UID
};
-
/**
Provides a low level access to the registers for the Super I/O.
@@ -124,11 +129,11 @@ ACPI_HID_DEVICE_PATH mAcpiDeviceNodeTemplate = { EFI_STATUS
EFIAPI
SioRegisterAccess (
- IN CONST EFI_SIO_PROTOCOL *This,
- IN BOOLEAN Write,
- IN BOOLEAN ExitCfgMode,
- IN UINT8 Register,
- IN OUT UINT8 *Value
+ IN CONST EFI_SIO_PROTOCOL *This,
+ IN BOOLEAN Write,
+ IN BOOLEAN ExitCfgMode,
+ IN UINT8 Register,
+ IN OUT UINT8 *Value
)
{
return EFI_SUCCESS;
@@ -156,11 +161,11 @@ SioRegisterAccess ( EFI_STATUS
EFIAPI
SioGetResources (
- IN CONST EFI_SIO_PROTOCOL *This,
- OUT ACPI_RESOURCE_HEADER_PTR *ResourceList
+ IN CONST EFI_SIO_PROTOCOL *This,
+ OUT ACPI_RESOURCE_HEADER_PTR *ResourceList
)
{
- SIO_DEV *SioDevice;
+ SIO_DEV *SioDevice;
if (ResourceList == NULL) {
return EFI_INVALID_PARAMETER;
@@ -189,8 +194,8 @@ SioGetResources ( EFI_STATUS
EFIAPI
SioSetResources (
- IN CONST EFI_SIO_PROTOCOL *This,
- IN ACPI_RESOURCE_HEADER_PTR ResourceList
+ IN CONST EFI_SIO_PROTOCOL *This,
+ IN ACPI_RESOURCE_HEADER_PTR ResourceList
)
{
return EFI_SUCCESS;
@@ -212,8 +217,8 @@ SioSetResources ( EFI_STATUS
EFIAPI
SioPossibleResources (
- IN CONST EFI_SIO_PROTOCOL *This,
- OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection
+ IN CONST EFI_SIO_PROTOCOL *This,
+ OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection
)
{
return EFI_SUCCESS;
@@ -247,9 +252,9 @@ SioPossibleResources ( EFI_STATUS
EFIAPI
SioModify (
- IN CONST EFI_SIO_PROTOCOL *This,
- IN CONST EFI_SIO_REGISTER_MODIFY *Command,
- IN UINTN NumberOfCommands
+ IN CONST EFI_SIO_PROTOCOL *This,
+ IN CONST EFI_SIO_REGISTER_MODIFY *Command,
+ IN UINTN NumberOfCommands
)
{
return EFI_SUCCESS;
@@ -277,8 +282,8 @@ SioCreateChildDevice ( IN UINT32 DeviceIndex
)
{
- EFI_STATUS Status;
- SIO_DEV *SioDevice;
+ EFI_STATUS Status;
+ SIO_DEV *SioDevice;
//
// Initialize the SIO_DEV structure
@@ -288,19 +293,19 @@ SioCreateChildDevice ( return EFI_OUT_OF_RESOURCES;
}
- SioDevice->Signature = SIO_DEV_SIGNATURE;
- SioDevice->Handle = NULL;
- SioDevice->PciIo = PciIo;
+ SioDevice->Signature = SIO_DEV_SIGNATURE;
+ SioDevice->Handle = NULL;
+ SioDevice->PciIo = PciIo;
//
// Construct the child device path
//
mAcpiDeviceNodeTemplate.HID = mDevicesInfo[DeviceIndex].Hid;
mAcpiDeviceNodeTemplate.UID = mDevicesInfo[DeviceIndex].Uid;
- SioDevice->DevicePath = AppendDevicePathNode (
- ParentDevicePath,
- (EFI_DEVICE_PATH_PROTOCOL *) &mAcpiDeviceNodeTemplate
- );
+ SioDevice->DevicePath = AppendDevicePathNode (
+ ParentDevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&mAcpiDeviceNodeTemplate
+ );
if (SioDevice->DevicePath == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Done;
@@ -327,7 +332,7 @@ SioCreateChildDevice ( Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
+ (VOID **)&PciIo,
This->DriverBindingHandle,
SioDevice->Handle,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
@@ -375,9 +380,9 @@ SioCreateAllChildDevices ( IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath
)
{
- UINT32 Index;
- UINT32 ChildDeviceNumber;
- EFI_STATUS Status;
+ UINT32 Index;
+ UINT32 ChildDeviceNumber;
+ EFI_STATUS Status;
ChildDeviceNumber = 0;
diff --git a/OvmfPkg/SioBusDxe/SioService.h b/OvmfPkg/SioBusDxe/SioService.h index 0a180caa82..d30caed9f6 100644 --- a/OvmfPkg/SioBusDxe/SioService.h +++ b/OvmfPkg/SioBusDxe/SioService.h @@ -14,8 +14,8 @@ #pragma pack(1)
typedef struct {
- EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR Io;
- EFI_ACPI_END_TAG_DESCRIPTOR End;
+ EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR Io;
+ EFI_ACPI_END_TAG_DESCRIPTOR End;
} SIO_RESOURCES_IO;
#pragma pack()
@@ -38,9 +38,8 @@ typedef struct { EFI_SIO_PROTOCOL Sio;
UINT32 DeviceIndex;
} SIO_DEV;
-#define SIO_DEV_SIGNATURE SIGNATURE_32 ('S', 'I', 'O', 'D')
-#define SIO_DEV_FROM_SIO(a) CR (a, SIO_DEV, Sio, SIO_DEV_SIGNATURE)
-
+#define SIO_DEV_SIGNATURE SIGNATURE_32 ('S', 'I', 'O', 'D')
+#define SIO_DEV_FROM_SIO(a) CR (a, SIO_DEV, Sio, SIO_DEV_SIGNATURE)
//
// Super I/O Protocol interfaces
@@ -82,11 +81,11 @@ typedef struct { EFI_STATUS
EFIAPI
SioRegisterAccess (
- IN CONST EFI_SIO_PROTOCOL *This,
- IN BOOLEAN Write,
- IN BOOLEAN ExitCfgMode,
- IN UINT8 Register,
- IN OUT UINT8 *Value
+ IN CONST EFI_SIO_PROTOCOL *This,
+ IN BOOLEAN Write,
+ IN BOOLEAN ExitCfgMode,
+ IN UINT8 Register,
+ IN OUT UINT8 *Value
);
/**
@@ -111,8 +110,8 @@ SioRegisterAccess ( EFI_STATUS
EFIAPI
SioGetResources (
- IN CONST EFI_SIO_PROTOCOL *This,
- OUT ACPI_RESOURCE_HEADER_PTR *ResourceList
+ IN CONST EFI_SIO_PROTOCOL *This,
+ OUT ACPI_RESOURCE_HEADER_PTR *ResourceList
);
/**
@@ -130,8 +129,8 @@ SioGetResources ( EFI_STATUS
EFIAPI
SioSetResources (
- IN CONST EFI_SIO_PROTOCOL *This,
- IN ACPI_RESOURCE_HEADER_PTR ResourceList
+ IN CONST EFI_SIO_PROTOCOL *This,
+ IN ACPI_RESOURCE_HEADER_PTR ResourceList
);
/**
@@ -150,8 +149,8 @@ SioSetResources ( EFI_STATUS
EFIAPI
SioPossibleResources (
- IN CONST EFI_SIO_PROTOCOL *This,
- OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection
+ IN CONST EFI_SIO_PROTOCOL *This,
+ OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection
);
/**
@@ -182,9 +181,9 @@ SioPossibleResources ( EFI_STATUS
EFIAPI
SioModify (
- IN CONST EFI_SIO_PROTOCOL *This,
- IN CONST EFI_SIO_REGISTER_MODIFY *Command,
- IN UINTN NumberOfCommands
+ IN CONST EFI_SIO_PROTOCOL *This,
+ IN CONST EFI_SIO_REGISTER_MODIFY *Command,
+ IN UINTN NumberOfCommands
);
//
@@ -211,4 +210,4 @@ SioCreateAllChildDevices ( IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath
);
-#endif // __SIO_SERVICE_H__
+#endif // __SIO_SERVICE_H__
|