summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Ata
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-30 04:23:40 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-30 04:23:40 +0000
commit37623a5c029e5415fe24b86bf4f6481f8fdfad94 (patch)
tree925965b7341d07571b8bb22d51cacd39262ac0b7 /MdeModulePkg/Bus/Ata
parentcb38c322f037a9a5d2751a4c7e351b0ee7302e96 (diff)
downloadedk2-37623a5c029e5415fe24b86bf4f6481f8fdfad94.tar.gz
edk2-37623a5c029e5415fe24b86bf4f6481f8fdfad94.tar.bz2
edk2-37623a5c029e5415fe24b86bf4f6481f8fdfad94.zip
Add missing status code in several modules.
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> Reviewed-by: Gao Liming <liming.gao@intel.com> Reviewed-by: Tian Feng <feng.tian@intel.com> Reviewed-by: Fan Jeff <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13890 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Ata')
-rw-r--r--MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c27
-rw-r--r--MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h1
-rw-r--r--MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf1
-rw-r--r--MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c9
4 files changed, 38 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c
index 51687fe0d3..11e90f97a9 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c
@@ -295,6 +295,15 @@ RegisterAtaDevice (
InitializeListHead (&AtaDevice->AtaSubTaskList);
//
+ // Report Status Code to indicate the ATA device will be enabled
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_ENABLE),
+ AtaBusDriverData->ParentDevicePath
+ );
+
+ //
// Try to identify the ATA device via the ATA pass through command.
//
Status = DiscoverAtaDevice (AtaDevice);
@@ -719,6 +728,15 @@ AtaBusDriverBindingStart (
return Status;
}
+ //
+ // Report Status Code to indicate ATA bus starts
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_INIT),
+ ParentDevicePath
+ );
+
Status = gBS->OpenProtocol (
Controller,
&gEfiAtaPassThruProtocolGuid,
@@ -771,6 +789,15 @@ AtaBusDriverBindingStart (
}
}
+ //
+ // Report Status Code to indicate detecting devices on bus
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_DETECT),
+ ParentDevicePath
+ );
+
if (RemainingDevicePath == NULL) {
Port = 0xFFFF;
while (TRUE) {
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h
index d6b0ff8f08..4d3d9d54c7 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h
@@ -38,6 +38,7 @@
#include <Library/DevicePathLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/TimerLib.h>
+#include <Library/ReportStatusCodeLib.h>
#include <IndustryStandard/Atapi.h>
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
index 82f99e5493..bcd96deef0 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
@@ -56,6 +56,7 @@
UefiDriverEntryPoint
DebugLib
TimerLib
+ ReportStatusCodeLib
[Guids]
gEfiDiskInfoIdeInterfaceGuid # CONSUMES ## GUID
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
index b50792438b..5e5cab6575 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
@@ -185,6 +185,15 @@ ResetAtaDevice (
AtaPassThru = AtaDevice->AtaBusDriverData->AtaPassThru;
+ //
+ // Report Status Code to indicate reset happens
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_RESET),
+ AtaDevice->AtaBusDriverData->ParentDevicePath
+ );
+
return AtaPassThru->ResetDevice (
AtaPassThru,
AtaDevice->Port,