From: Laszlo Ersek <lersek@redhat.com>
To: edk2-devel-01 <edk2-devel@lists.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Jordan Justen <jordan.l.justen@intel.com>
Subject: [PATCH 2/5] OvmfPkg/PlatformBootManagerLib: wrap overlong lines in "BdsPlatform.c"
Date: Thu, 15 Mar 2018 20:02:55 +0100 [thread overview]
Message-ID: <20180315190258.6580-3-lersek@redhat.com> (raw)
In-Reply-To: <20180315190258.6580-1-lersek@redhat.com>
No functional changes.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 79 +++++++++++++-------
1 file changed, 51 insertions(+), 28 deletions(-)
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 5ef0e828900d..99b7db7cc05a 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -1,17 +1,17 @@
/** @file
Platform BDS customizations.
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "BdsPlatform.h"
#include <Guid/XenInfo.h>
#include <Guid/RootBridgesConnectedEventGroup.h>
@@ -387,13 +387,14 @@ Returns:
Status = gBS->InstallProtocolInterface (&Handle,
&gEfiDxeSmmReadyToLockProtocolGuid, EFI_NATIVE_INTERFACE,
NULL);
ASSERT_EFI_ERROR (Status);
//
- // Dispatch deferred images after EndOfDxe event and ReadyToLock installation.
+ // Dispatch deferred images after EndOfDxe event and ReadyToLock
+ // installation.
//
EfiBootManagerDispatchDeferredImages ();
PlatformInitializeConsole (gPlatformConsole);
PcdStatus = PcdSet16S (PcdPlatformBootTimeOut,
GetFrontPageTimeoutFromQemu ());
@@ -467,25 +468,29 @@ Returns:
}
TempDevicePath = DevicePath;
//
// Register Keyboard
//
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gPnpPs2KeyboardDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gPnpPs2KeyboardDeviceNode);
EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);
//
// Register COM1
//
DevicePath = TempDevicePath;
gPnp16550ComPortDeviceNode.UID = 0;
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gPnp16550ComPortDeviceNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gPnp16550ComPortDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
//
// Print Device Path
//
DevPathStr = ConvertDevicePathToText (DevicePath, FALSE, FALSE);
if (DevPathStr != NULL) {
@@ -506,15 +511,18 @@ Returns:
//
// Register COM2
//
DevicePath = TempDevicePath;
gPnp16550ComPortDeviceNode.UID = 1;
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gPnp16550ComPortDeviceNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gPnp16550ComPortDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
//
// Print Device Path
//
DevPathStr = ConvertDevicePathToText (DevicePath, FALSE, FALSE);
if (DevPathStr != NULL) {
@@ -585,13 +593,14 @@ GetGopDevicePath (
);
if (!EFI_ERROR (Status)) {
//
// Add all the child handles as possible Console Device
//
for (Index = 0; Index < GopHandleCount; Index++) {
- Status = gBS->HandleProtocol (GopHandleBuffer[Index], &gEfiDevicePathProtocolGuid, (VOID*)&TempDevicePath);
+ Status = gBS->HandleProtocol (GopHandleBuffer[Index],
+ &gEfiDevicePathProtocolGuid, (VOID*)&TempDevicePath);
if (EFI_ERROR (Status)) {
continue;
}
if (CompareMem (
PciDevicePath,
TempDevicePath,
@@ -604,14 +613,14 @@ GetGopDevicePath (
// In future, we could select all child handles to be console device
//
*GopDevicePath = TempDevicePath;
//
- // Delete the PCI device's path that added by GetPlugInPciVgaDevicePath()
- // Add the integrity GOP device path.
+ // Delete the PCI device's path that added by
+ // GetPlugInPciVgaDevicePath(). Add the integrity GOP device path.
//
EfiBootManagerUpdateConsoleVariable (ConOutDev, NULL, PciDevicePath);
EfiBootManagerUpdateConsoleVariable (ConOutDev, TempDevicePath, NULL);
}
}
gBS->FreePool (GopHandleBuffer);
@@ -697,14 +706,16 @@ Returns:
(VOID*)&DevicePath
);
if (EFI_ERROR (Status)) {
return Status;
}
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
+ DevicePath = AppendDevicePathNode (DevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);
EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);
return EFI_SUCCESS;
@@ -814,13 +825,14 @@ VisitAllPciInstances (
ConOut, ConIn, ErrOut.
@param[in] Handle - Handle of PCI device instance
@param[in] PciIo - PCI IO protocol instance
@param[in] Pci - PCI Header register block
- @retval EFI_SUCCESS - PCI Device check and Console variable update successfully.
+ @retval EFI_SUCCESS - PCI Device check and Console variable update
+ successfully.
@retval EFI_STATUS - PCI Device check or Console variable update fail.
**/
EFI_STATUS
EFIAPI
DetectAndPreparePlatformPciDevicePath (
@@ -888,13 +900,14 @@ DetectAndPreparePlatformPciDevicePath (
/**
Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut
@param[in] DetectVgaOnly - Only detect VGA device if it's TRUE.
- @retval EFI_SUCCESS - PCI Device check and Console variable update successfully.
+ @retval EFI_SUCCESS - PCI Device check and Console variable update
+ successfully.
@retval EFI_STATUS - PCI Device check or Console variable update fail.
**/
EFI_STATUS
DetectAndPreparePlatformPciDevicePaths (
BOOLEAN DetectVgaOnly
@@ -925,18 +938,20 @@ Arguments:
EFI_DEVICE_PATH_PROTOCOL *VarConout;
EFI_DEVICE_PATH_PROTOCOL *VarConin;
//
// Connect RootBridge
//
- GetEfiGlobalVariable2 (EFI_CON_OUT_VARIABLE_NAME, (VOID **) &VarConout, NULL);
+ GetEfiGlobalVariable2 (EFI_CON_OUT_VARIABLE_NAME, (VOID **) &VarConout,
+ NULL);
GetEfiGlobalVariable2 (EFI_CON_IN_VARIABLE_NAME, (VOID **) &VarConin, NULL);
if (VarConout == NULL || VarConin == NULL) {
//
- // Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut
+ // Do platform specific PCI Device check and add them to ConOut, ConIn,
+ // ErrOut
//
DetectAndPreparePlatformPciDevicePaths (FALSE);
//
// Have chance to connect the platform default console,
// the platform default console is the minimum device group
@@ -944,19 +959,22 @@ Arguments:
//
for (Index = 0; PlatformConsole[Index].DevicePath != NULL; ++Index) {
//
// Update the console variable with the connect type
//
if ((PlatformConsole[Index].ConnectType & CONSOLE_IN) == CONSOLE_IN) {
- EfiBootManagerUpdateConsoleVariable (ConIn, PlatformConsole[Index].DevicePath, NULL);
+ EfiBootManagerUpdateConsoleVariable (ConIn,
+ PlatformConsole[Index].DevicePath, NULL);
}
if ((PlatformConsole[Index].ConnectType & CONSOLE_OUT) == CONSOLE_OUT) {
- EfiBootManagerUpdateConsoleVariable (ConOut, PlatformConsole[Index].DevicePath, NULL);
+ EfiBootManagerUpdateConsoleVariable (ConOut,
+ PlatformConsole[Index].DevicePath, NULL);
}
if ((PlatformConsole[Index].ConnectType & STD_ERROR) == STD_ERROR) {
- EfiBootManagerUpdateConsoleVariable (ErrOut, PlatformConsole[Index].DevicePath, NULL);
+ EfiBootManagerUpdateConsoleVariable (ErrOut,
+ PlatformConsole[Index].DevicePath, NULL);
}
}
} else {
//
// Only detect VGA device and add them to ConOut
//
@@ -1234,13 +1252,16 @@ ConnectRecursivelyIfPciMassStorage (
//
DevPathStr = ConvertDevicePathToText (DevicePath, FALSE, FALSE);
if (DevPathStr != NULL) {
DEBUG((
EFI_D_INFO,
"Found %s device: %s\n",
- IS_CLASS1 (PciHeader, PCI_CLASS_MASS_STORAGE) ? L"Mass Storage" : L"Xen",
+ (IS_CLASS1 (PciHeader, PCI_CLASS_MASS_STORAGE) ?
+ L"Mass Storage" :
+ L"Xen"
+ ),
DevPathStr
));
FreePool(DevPathStr);
}
Status = gBS->ConnectController (Handle, NULL, NULL, TRUE);
@@ -1528,13 +1549,14 @@ NotifyDevPath (
continue;
}
//
// Get the DevicePath protocol on that handle
//
- Status = gBS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (VOID **)&DevPathNode);
+ Status = gBS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid,
+ (VOID **)&DevPathNode);
ASSERT_EFI_ERROR (Status);
while (!IsDevicePathEnd (DevPathNode)) {
//
// Find the handler to dump this device path node
//
@@ -1578,13 +1600,14 @@ InstallDevicePathCallback (
NULL,
&mEfiDevPathNotifyReg
);
}
/**
- This function is called each second during the boot manager waits the timeout.
+ This function is called each second during the boot manager waits the
+ timeout.
@param TimeoutRemain The remaining timeout.
**/
VOID
EFIAPI
PlatformBootManagerWaitCallback (
--
2.14.1.3.gb7cf6e02401b
next prev parent reply other threads:[~2018-03-15 18:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 19:02 [PATCH 0/5] ArmVirtPkg, OvmfPkg: improve firmware duration of direct kernel boot Laszlo Ersek
2018-03-15 19:02 ` [PATCH 1/5] ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot devices" Laszlo Ersek
2018-03-16 9:58 ` Ard Biesheuvel
2018-03-16 13:40 ` Laszlo Ersek
2018-03-16 13:45 ` Ard Biesheuvel
2018-03-16 14:06 ` Laszlo Ersek
2018-03-15 19:02 ` Laszlo Ersek [this message]
2018-03-15 19:02 ` [PATCH 3/5] OvmfPkg/PlatformBootManagerLib: rejuvenate old-style function comments Laszlo Ersek
2018-03-15 19:02 ` [PATCH 4/5] OvmfPkg/PlatformBootManagerLib: hoist PciAcpiInitialization() Laszlo Ersek
2018-03-16 15:27 ` Gabriel L. Somlo
2018-03-15 19:02 ` [PATCH 5/5] OvmfPkg/PlatformBootManagerLib: process "-kernel" before boot devices Laszlo Ersek
2018-03-16 8:57 ` [PATCH 0/5] ArmVirtPkg, OvmfPkg: improve firmware duration of direct kernel boot Richard W.M. Jones
2018-03-16 9:59 ` Richard W.M. Jones
2018-03-16 14:02 ` Laszlo Ersek
2018-03-16 14:47 ` Richard W.M. Jones
2018-03-16 17:46 ` Laszlo Ersek
2018-03-16 14:08 ` Ard Biesheuvel
2018-03-16 15:29 ` Gabriel L. Somlo
2018-03-16 17:49 ` Laszlo Ersek
2018-03-16 19:02 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180315190258.6580-3-lersek@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox