]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/SataControllerDxe/SataController.c
OvmfPkg/Csm/LegacyBiosDxe: Fix Legacy16GetTableAddress call for E820 data
[mirror_edk2.git] / OvmfPkg / SataControllerDxe / SataController.c
index 1f84ad034e5b01fda596d7138a6c826c5b361841..8d6a6bbb22860d40b15c2560b0470da9317c66a9 100644 (file)
@@ -2,13 +2,7 @@
   This driver module produces IDE_CONTROLLER_INIT protocol for Sata Controllers.\r
 \r
   Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -388,6 +382,7 @@ SataControllerStart (
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   )\r
 {\r
+  UINTN                             BailLogMask;\r
   EFI_STATUS                        Status;\r
   EFI_PCI_IO_PROTOCOL               *PciIo;\r
   UINT64                            OriginalPciAttributes;\r
@@ -398,6 +393,7 @@ SataControllerStart (
 \r
   DEBUG ((EFI_D_INFO, "SataControllerStart START\n"));\r
 \r
+  BailLogMask = DEBUG_ERROR;\r
   SataPrivateData = NULL;\r
 \r
   //\r
@@ -412,6 +408,14 @@ SataControllerStart (
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
                   );\r
   if (EFI_ERROR (Status)) {\r
+    if (Status == EFI_ALREADY_STARTED) {\r
+      //\r
+      // This is an expected condition for OpenProtocol() / BY_DRIVER, in a\r
+      // DriverBindingStart() member function; degrade the log mask to\r
+      // DEBUG_INFO.\r
+      //\r
+      BailLogMask = DEBUG_INFO;\r
+    }\r
     goto Bail;\r
   }\r
 \r
@@ -542,7 +546,8 @@ ClosePciIo:
          );\r
 \r
 Bail:\r
-  DEBUG ((EFI_D_ERROR, "SataControllerStart error return status = %r\n", Status));\r
+  DEBUG ((BailLogMask, "SataControllerStart error return status = %r\n",\r
+    Status));\r
   return Status;\r
 }\r
 \r