]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add more status code in drivers.
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 May 2011 06:29:30 +0000 (06:29 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 May 2011 06:29:30 +0000 (06:29 +0000)
Signed-off-by: li-elvin
Reviewed-by: jyao1
Reviewed-by: lgao4
Reviewed-by: erictian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11706 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
MdeModulePkg/Core/DxeIplPeim/DxeLoad.c

index 7acd96fa5026e87459d927c2e7aa1457d411f8a3..a36d03e827a9512e6c658214cdd8950505b5c65a 100644 (file)
@@ -2309,6 +2309,7 @@ AhciModeInitialization (
           Status = AhciIdentify (PciIo, AhciRegisters, Port, 0, &Buffer);\r
 \r
           if (EFI_ERROR (Status)) {\r
+            REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_DETECTED));\r
             continue;\r
           }\r
 \r
@@ -2388,6 +2389,9 @@ AhciModeInitialization (
         // Found a ATA or ATAPI device, add it into the device list.\r
         //\r
         CreateNewDeviceInfo (Instance, Port, 0, DeviceType, &Buffer);\r
+        if (DeviceType == EfiIdeHarddisk) {\r
+          REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_PC_ENABLE));\r
+        }\r
       }\r
     }\r
   }\r
index be73bd95f3f8fe009b4c967de7c9e87dc81ffcec..1d7d8ac341045da780c6af5e7ea83503d0512367 100644 (file)
@@ -4,7 +4,7 @@
 #  This driver installs AtaPassThru and ExtScsiPassThru protocol in each ide/sata controller\r
 #  to access to all attached Ata/Atapi devices.\r
 #\r
-#  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -57,6 +57,7 @@
   UefiDriverEntryPoint\r
   DebugLib\r
   TimerLib\r
+  ReportStatusCodeLib\r
 \r
 [Guids]\r
 \r
index 1a4ac45bc1dc89c4a18391549b487a6f8b3e88eb..af1e5aeb525bd2ef5b95935560ef880e71849c2d 100644 (file)
@@ -2641,6 +2641,8 @@ DetectAndConfigIdeDevice (
       // if identifying ata device is failure, then try to send identify packet cmd.\r
       //\r
       if (EFI_ERROR (Status)) {\r
+        REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_DETECTED));\r
+\r
         DeviceType = EfiIdeCdrom;\r
         Status     = AtaIdentifyPacket (Instance, IdeChannel, IdeDevice, &Buffer, NULL);\r
       }\r
@@ -2772,6 +2774,10 @@ DetectAndConfigIdeDevice (
     if (EFI_ERROR (Status)) {\r
       continue;\r
     }\r
+\r
+    if (DeviceType == EfiIdeHarddisk) {\r
+      REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_PC_ENABLE));\r
+    }\r
   }\r
   return EFI_SUCCESS;\r
 }\r
index 35da41b3e39eab379ee04067e40e7bc0cb3e75a3..64aa9d954592ef429106a35de7bca99b63a4deca 100644 (file)
@@ -2,7 +2,7 @@
 \r
     Usb Bus Driver Binding and Bus IO Protocol.\r
 \r
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -1279,6 +1279,7 @@ UsbBusControllerDriverStart (
     //\r
     // If first start, build the bus execute environment and install bus protocol\r
     //\r
+    REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_IO_BUS_USB | EFI_P_PC_ENABLE));\r
     Status = UsbBusBuildProtocol (This, Controller, RemainingDevicePath);\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
index 5d5535185ca54c70740307cd96e5bf7ed17b06c6..c41c1272fc840a58c47cb596d618553f7744495e 100644 (file)
@@ -2,7 +2,7 @@
 \r
     Usb Bus Driver Binding and Bus IO Protocol.\r
 \r
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiLib.h>\r
 #include <Library/DevicePathLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
 \r
 \r
 #include <IndustryStandard/Usb.h>\r
index 318522452437dd2dabb50d28c6cafce73e3b94ce..4e1fc858b8757b59e0049dc385f5f79ece19febb 100644 (file)
@@ -4,7 +4,7 @@
 #\r
 #  Usb Bus Dxe driver is used to enumerate and manage all attached usb devices.\r
 #  \r
-#  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -61,6 +61,7 @@
   UefiDriverEntryPoint\r
   BaseMemoryLib\r
   DebugLib\r
+  ReportStatusCodeLib\r
 \r
 \r
 [Protocols]\r
index 1fabb53839880a53dc97362339beab7a7cd10a7a..e6836596d8c2a8b83af42e56304f327dd5ba1517 100644 (file)
@@ -2,7 +2,7 @@
   Last PEIM.\r
   Responsibility of this module is to load the DXE Core from a Firmware Volume.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 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
@@ -318,6 +318,9 @@ DxeIplFindDxeCore (
     // If some error occurs here, then we cannot find any firmware\r
     // volume that may contain DxeCore.\r
     //\r
+    if (EFI_ERROR (Status)) {\r
+      REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_CORE_EC_DXE_CORRUPT));\r
+    }\r
     ASSERT_EFI_ERROR (Status);\r
     \r
     //\r