]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/PiSmmCore/Handle.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / Handle.c
index 7625c386921ca987fb3a51dc41f6b2096c118eaf..f8dbe4644929561b406c1829cb15228168d0601a 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   SMM handle & protocol handling.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation.  All rights reserved.<BR>\r
-  This program and the accompanying materials are licensed and made available \r
-  under the terms and conditions of the BSD License which accompanies this \r
-  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
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -287,11 +281,12 @@ SmmInstallProtocolInterfaceNotify (
     // in the system\r
     //\r
     InsertTailList (&gHandleList, &Handle->AllHandles);\r
-  }\r
-\r
-  Status = SmmValidateHandle (Handle);\r
-  if (EFI_ERROR (Status)) {\r
-    goto Done;\r
+  } else {\r
+    Status = SmmValidateHandle (Handle);\r
+    if (EFI_ERROR (Status)) {\r
+      DEBUG((DEBUG_ERROR, "SmmInstallProtocolInterface: input handle at 0x%x is invalid\n", Handle));\r
+      goto Done;\r
+    }\r
   }\r
 \r
   //\r
@@ -340,6 +335,7 @@ Done:
     if (Prot != NULL) {\r
       FreePool (Prot);\r
     }\r
+    DEBUG((DEBUG_ERROR, "SmmInstallProtocolInterface: %g %p failed with %r\n", Protocol, Interface, Status));\r
   }\r
   return Status;\r
 }\r