summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus
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
parentcb38c322f037a9a5d2751a4c7e351b0ee7302e96 (diff)
downloadedk2-platforms-37623a5c029e5415fe24b86bf4f6481f8fdfad94.tar.xz
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')
-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
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c36
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf3
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c27
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c10
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c37
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h4
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf3
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c113
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h1
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf3
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c49
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h43
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf3
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c33
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c8
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c13
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c26
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c26
23 files changed, 393 insertions, 85 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,
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 5ff9b80560..ba1fe8fcc7 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
@@ -122,8 +122,20 @@ EhcReset (
EFI_STATUS Status;
UINT32 DbgCtrlStatus;
+ Ehc = EHC_FROM_THIS (This);
+
+ if (Ehc->DevicePath != NULL) {
+ //
+ // Report Status Code to indicate reset happens
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_USB | EFI_IOB_PC_RESET),
+ Ehc->DevicePath
+ );
+ }
+
OldTpl = gBS->RaiseTPL (EHC_TPL);
- Ehc = EHC_FROM_THIS (This);
switch (Attributes) {
case EFI_USB_HC_RESET_GLOBAL:
@@ -1543,8 +1555,9 @@ EhcGetUsbDebugPortInfo (
**/
USB2_HC_DEV *
EhcCreateUsb2Hc (
- IN EFI_PCI_IO_PROTOCOL *PciIo,
- IN UINT64 OriginalPciAttributes
+ IN EFI_PCI_IO_PROTOCOL *PciIo,
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN UINT64 OriginalPciAttributes
)
{
USB2_HC_DEV *Ehc;
@@ -1578,6 +1591,7 @@ EhcCreateUsb2Hc (
Ehc->Usb2Hc.MinorRevision = 0x0;
Ehc->PciIo = PciIo;
+ Ehc->DevicePath = DevicePath;
Ehc->OriginalPciAttributes = OriginalPciAttributes;
InitializeListHead (&Ehc->AsyncIntTransfers);
@@ -1684,6 +1698,7 @@ EhcDriverBindingStart (
UINTN EhciDeviceNumber;
UINTN EhciFunctionNumber;
UINT32 State;
+ EFI_DEVICE_PATH_PROTOCOL *HcDevicePath;
//
// Open the PciIo Protocol, then enable the USB host controller
@@ -1701,6 +1716,19 @@ EhcDriverBindingStart (
return Status;
}
+ //
+ // Open Device Path Protocol for on USB host controller
+ //
+ HcDevicePath = NULL;
+ Status = gBS->OpenProtocol (
+ Controller,
+ &gEfiDevicePathProtocolGuid,
+ (VOID **) &HcDevicePath,
+ This->DriverBindingHandle,
+ Controller,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
PciAttributesSaved = FALSE;
//
// Save original PCI attributes
@@ -1842,7 +1870,7 @@ EhcDriverBindingStart (
//
// Create then install USB2_HC_PROTOCOL
//
- Ehc = EhcCreateUsb2Hc (PciIo, OriginalPciAttributes);
+ Ehc = EhcCreateUsb2Hc (PciIo, HcDevicePath, OriginalPciAttributes);
if (Ehc == NULL) {
DEBUG ((EFI_D_ERROR, "EhcDriverBindingStart: failed to create USB2_HC\n"));
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
index 42e4a6e6d9..4327f2368a 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
+#include <Library/ReportStatusCodeLib.h>
#include <IndustryStandard/Pci.h>
@@ -115,6 +116,7 @@ struct _USB2_HC_DEV {
EFI_USB2_HC_PROTOCOL Usb2Hc;
EFI_PCI_IO_PROTOCOL *PciIo;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
UINT64 OriginalPciAttributes;
USBHC_MEM_POOL *MemPool;
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
index 0a3830f633..8f6f7d69e6 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
@@ -11,7 +11,7 @@
# This way avoids the control transfer on a shared port between EHCI and companion host
# controller when UHCI gets attached earlier than EHCI and a USB 2.0 device inserts.
#
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2012, 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
@@ -75,6 +75,7 @@
BaseMemoryLib
DebugLib
PcdLib
+ ReportStatusCodeLib
[Guids]
gEfiEventExitBootServicesGuid ## PRODUCES ## Event
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index 517250abe1..5afbb82298 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -8,7 +8,7 @@
PCI Root Bridges. So it means platform needs install PCI Root Bridge IO protocol for each
PCI Root Bus and install PCI Host Bridge Resource Allocation Protocol.
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
@@ -239,7 +239,8 @@ PciBusDriverBindingStart (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
+ EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
//
// Check RemainingDevicePath validation
@@ -286,6 +287,28 @@ PciBusDriverBindingStart (
gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));
//
+ // Open Device Path Protocol for PCI root bridge
+ //
+ Status = gBS->OpenProtocol (
+ Controller,
+ &gEfiDevicePathProtocolGuid,
+ (VOID **) &ParentDevicePath,
+ This->DriverBindingHandle,
+ Controller,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ //
+ // Report Status Code to indicate PCI bus starts
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_PCI | EFI_IOB_PC_INIT),
+ ParentDevicePath
+ );
+
+ //
// Enumerate the entire host bridge
// After enumeration, a database that records all the device information will be created
//
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
index 42065738ed..c6fe51bf58 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
@@ -1,7 +1,7 @@
/** @file
PCI eunmeration implementation on entire PCI bus system for PCI Bus module.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
@@ -2095,6 +2095,14 @@ PciHotPlugRequestNotify (
RootBridgeHandle = Temp->Handle;
if (Operation == EfiPciHotPlugRequestAdd) {
+ //
+ // Report Status Code to indicate hot plug happens
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_PCI | EFI_IOB_PC_HOTPLUG),
+ Temp->DevicePath
+ );
if (NumberOfChildren != NULL) {
*NumberOfChildren = 0;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
index a1b0cbd121..f41c712259 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
@@ -2,7 +2,7 @@
The UHCI driver model and HC protocol routines.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, 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
@@ -53,7 +53,18 @@ Uhci2Reset (
return EFI_UNSUPPORTED;
}
- Uhc = UHC_FROM_USB2_HC_PROTO (This);
+ Uhc = UHC_FROM_USB2_HC_PROTO (This);
+
+ if (Uhc->DevicePath != NULL) {
+ //
+ // Report Status Code to indicate reset happens
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_USB | EFI_IOB_PC_RESET),
+ Uhc->DevicePath
+ );
+ }
OldTpl = gBS->RaiseTPL (UHCI_TPL);
@@ -1425,8 +1436,9 @@ ON_EXIT:
**/
USB_HC_DEV *
UhciAllocateDev (
- IN EFI_PCI_IO_PROTOCOL *PciIo,
- IN UINT64 OriginalPciAttributes
+ IN EFI_PCI_IO_PROTOCOL *PciIo,
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN UINT64 OriginalPciAttributes
)
{
USB_HC_DEV *Uhc;
@@ -1460,6 +1472,7 @@ UhciAllocateDev (
Uhc->Usb2Hc.MinorRevision = 0x1;
Uhc->PciIo = PciIo;
+ Uhc->DevicePath = DevicePath;
Uhc->OriginalPciAttributes = OriginalPciAttributes;
Uhc->MemPool = UsbHcInitMemPool (PciIo, TRUE, 0);
@@ -1622,6 +1635,7 @@ UhciDriverBindingStart (
UINT64 Supports;
UINT64 OriginalPciAttributes;
BOOLEAN PciAttributesSaved;
+ EFI_DEVICE_PATH_PROTOCOL *HcDevicePath;
//
// Open PCIIO, then enable the EHC device and turn off emulation
@@ -1640,6 +1654,19 @@ UhciDriverBindingStart (
return Status;
}
+ //
+ // Open Device Path Protocol for on USB host controller
+ //
+ HcDevicePath = NULL;
+ Status = gBS->OpenProtocol (
+ Controller,
+ &gEfiDevicePathProtocolGuid,
+ (VOID **) &HcDevicePath,
+ This->DriverBindingHandle,
+ Controller,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
PciAttributesSaved = FALSE;
//
// Save original PCI attributes
@@ -1684,7 +1711,7 @@ UhciDriverBindingStart (
goto CLOSE_PCIIO;
}
- Uhc = UhciAllocateDev (PciIo, OriginalPciAttributes);
+ Uhc = UhciAllocateDev (PciIo, HcDevicePath, OriginalPciAttributes);
if (Uhc == NULL) {
Status = EFI_OUT_OF_RESOURCES;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
index 71b7a531a1..64ee600965 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
@@ -2,7 +2,7 @@
The definition for UHCI driver model and HC protocol routines.
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, 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
@@ -33,6 +33,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
+#include <Library/ReportStatusCodeLib.h>
#include <IndustryStandard/Pci.h>
@@ -112,6 +113,7 @@ struct _USB_HC_DEV {
UINT32 Signature;
EFI_USB2_HC_PROTOCOL Usb2Hc;
EFI_PCI_IO_PROTOCOL *PciIo;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
UINT64 OriginalPciAttributes;
//
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
index a9299ad50e..ca813faf26 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
@@ -6,7 +6,7 @@
# It implements the interfaces of monitoring the status of all ports and transferring
# Control, Bulk, Interrupt and Isochronous requests to Usb1.x device
#
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2012, 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
@@ -71,6 +71,7 @@
BaseMemoryLib
DebugLib
PcdLib
+ ReportStatusCodeLib
[Guids]
gEfiEventExitBootServicesGuid ## PRODUCES ## Event
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index 566d3a6bc2..762da3e0a1 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -140,16 +140,27 @@ XhcReset (
)
{
USB_XHCI_INSTANCE *Xhc;
- EFI_STATUS Status;
- EFI_TPL OldTpl;
-
- OldTpl = gBS->RaiseTPL (XHC_TPL);
-
- Xhc = XHC_FROM_THIS (This);
-
- switch (Attributes) {
- case EFI_USB_HC_RESET_GLOBAL:
- //
+ EFI_STATUS Status;
+ EFI_TPL OldTpl;
+
+ Xhc = XHC_FROM_THIS (This);
+
+ if (Xhc->DevicePath != NULL) {
+ //
+ // Report Status Code to indicate reset happens
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_USB | EFI_IOB_PC_RESET),
+ Xhc->DevicePath
+ );
+ }
+
+ OldTpl = gBS->RaiseTPL (XHC_TPL);
+
+ switch (Attributes) {
+ case EFI_USB_HC_RESET_GLOBAL:
+ //
// Flow through, same behavior as Host Controller Reset
//
case EFI_USB_HC_RESET_HOST_CONTROLLER:
@@ -1678,14 +1689,15 @@ ON_EXIT:
@return The allocated and initialized USB_XHCI_INSTANCE structure if created,
otherwise NULL.
-**/
-USB_XHCI_INSTANCE*
-XhcCreateUsbHc (
- IN EFI_PCI_IO_PROTOCOL *PciIo,
- IN UINT64 OriginalPciAttributes
- )
-{
- USB_XHCI_INSTANCE *Xhc;
+**/
+USB_XHCI_INSTANCE*
+XhcCreateUsbHc (
+ IN EFI_PCI_IO_PROTOCOL *PciIo,
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN UINT64 OriginalPciAttributes
+ )
+{
+ USB_XHCI_INSTANCE *Xhc;
EFI_STATUS Status;
UINT32 PageSize;
UINT16 ExtCapReg;
@@ -1698,12 +1710,13 @@ XhcCreateUsbHc (
//
// Initialize private data structure
- //
- Xhc->Signature = XHCI_INSTANCE_SIG;
- Xhc->PciIo = PciIo;
- Xhc->OriginalPciAttributes = OriginalPciAttributes;
- CopyMem (&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL));
-
+ //
+ Xhc->Signature = XHCI_INSTANCE_SIG;
+ Xhc->PciIo = PciIo;
+ Xhc->DevicePath = DevicePath;
+ Xhc->OriginalPciAttributes = OriginalPciAttributes;
+ CopyMem (&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL));
+
InitializeListHead (&Xhc->AsyncIntTransfers);
//
@@ -1827,12 +1840,13 @@ XhcDriverBindingStart (
EFI_STATUS Status;
EFI_PCI_IO_PROTOCOL *PciIo;
UINT64 Supports;
- UINT64 OriginalPciAttributes;
- BOOLEAN PciAttributesSaved;
- USB_XHCI_INSTANCE *Xhc;
-
- //
- // Open the PciIo Protocol, then enable the USB host controller
+ UINT64 OriginalPciAttributes;
+ BOOLEAN PciAttributesSaved;
+ USB_XHCI_INSTANCE *Xhc;
+ EFI_DEVICE_PATH_PROTOCOL *HcDevicePath;
+
+ //
+ // Open the PciIo Protocol, then enable the USB host controller
//
Status = gBS->OpenProtocol (
Controller,
@@ -1844,12 +1858,25 @@ XhcDriverBindingStart (
);
if (EFI_ERROR (Status)) {
- return Status;
- }
-
- PciAttributesSaved = FALSE;
- //
- // Save original PCI attributes
+ return Status;
+ }
+
+ //
+ // Open Device Path Protocol for on USB host controller
+ //
+ HcDevicePath = NULL;
+ Status = gBS->OpenProtocol (
+ Controller,
+ &gEfiDevicePathProtocolGuid,
+ (VOID **) &HcDevicePath,
+ This->DriverBindingHandle,
+ Controller,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+ PciAttributesSaved = FALSE;
+ //
+ // Save original PCI attributes
//
Status = PciIo->Attributes (
PciIo,
@@ -1884,13 +1911,13 @@ XhcDriverBindingStart (
goto CLOSE_PCIIO;
}
- //
- // Create then install USB2_HC_PROTOCOL
- //
- Xhc = XhcCreateUsbHc (PciIo, OriginalPciAttributes);
-
- if (Xhc == NULL) {
- DEBUG ((EFI_D_ERROR, "XhcDriverBindingStart: failed to create USB2_HC\n"));
+ //
+ // Create then install USB2_HC_PROTOCOL
+ //
+ Xhc = XhcCreateUsbHc (PciIo, HcDevicePath, OriginalPciAttributes);
+
+ if (Xhc == NULL) {
+ DEBUG ((EFI_D_ERROR, "XhcDriverBindingStart: failed to create USB2_HC\n"));
return EFI_OUT_OF_RESOURCES;
}
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
index a486413086..ae56b1e6fe 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
@@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Library/DebugLib.h>
+#include <Library/ReportStatusCodeLib.h>
#include <IndustryStandard/Pci.h>
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
index 286f3ac321..84dea07a49 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
@@ -6,7 +6,7 @@
# It implements the interfaces of monitoring the status of all ports and transferring
# Control, Bulk, Interrupt and Isochronous requests to those attached usb LS/FS/HS/SS devices.
#
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2012, 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
@@ -59,6 +59,7 @@
UefiDriverEntryPoint
BaseMemoryLib
DebugLib
+ ReportStatusCodeLib
[Guids]
gEfiEventExitBootServicesGuid ## PRODUCES ## Event
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index 7387a44dbe..a0833cfaf4 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -2,7 +2,7 @@
SCSI Bus driver that layers on every SCSI Pass Thru and
Extended SCSI Pass Thru protocol in the system.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
@@ -342,6 +342,15 @@ SCSIBusDriverBindingStart (
}
//
+ // Report Status Code to indicate SCSI bus starts
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_SCSI | EFI_IOB_PC_INIT),
+ ParentDevicePath
+ );
+
+ //
// To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as
// EFI PassThru Protocol. From priority perspective, ExtPassThru Protocol is firstly
// tried to open on host controller handle. If fails, then PassThru Protocol is tried instead.
@@ -451,6 +460,15 @@ SCSIBusDriverBindingStart (
ScsiBusDev = SCSI_BUS_CONTROLLER_DEVICE_FROM_THIS (BusIdentify);
}
+ //
+ // Report Status Code to indicate detecting devices on bus
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_SCSI | EFI_IOB_PC_DETECT),
+ ParentDevicePath
+ );
+
Lun = 0;
if (RemainingDevicePath == NULL) {
//
@@ -828,6 +846,15 @@ ScsiResetBus (
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
+ //
+ // 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),
+ ScsiIoDevice->ScsiBusDeviceData->DevicePath
+ );
+
if (ScsiIoDevice->ExtScsiSupport){
return ScsiIoDevice->ExtScsiPassThru->ResetChannel (ScsiIoDevice->ExtScsiPassThru);
} else {
@@ -857,6 +884,16 @@ ScsiResetDevice (
UINT8 Target[TARGET_MAX_BYTES];
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
+
+ //
+ // 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),
+ ScsiIoDevice->ScsiBusDeviceData->DevicePath
+ );
+
CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
@@ -1121,6 +1158,7 @@ ScsiScanCreateDevice (
}
ScsiIoDevice->Signature = SCSI_IO_DEV_SIGNATURE;
+ ScsiIoDevice->ScsiBusDeviceData = ScsiBusDev;
CopyMem(&ScsiIoDevice->Pun, TargetId, TARGET_MAX_BYTES);
ScsiIoDevice->Lun = Lun;
@@ -1141,6 +1179,15 @@ ScsiScanCreateDevice (
ScsiIoDevice->ScsiIo.ResetDevice = ScsiResetDevice;
ScsiIoDevice->ScsiIo.ExecuteScsiCommand = ScsiExecuteSCSICommand;
+ //
+ // Report Status Code here since the new SCSI device will be discovered
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_SCSI | EFI_IOB_PC_ENABLE),
+ ScsiBusDev->DevicePath
+ );
+
if (!DiscoverScsiDevice (ScsiIoDevice)) {
Status = EFI_OUT_OF_RESOURCES;
goto ErrorExit;
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h
index 8f86444a4c..ed90a6d458 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h
@@ -1,7 +1,7 @@
/** @file
Header file for SCSI Bus Driver.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
@@ -33,6 +33,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiScsiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DevicePathLib.h>
+#include <Library/ReportStatusCodeLib.h>
#include <IndustryStandard/Scsi.h>
@@ -54,27 +55,10 @@ typedef struct {
VOID *Data2;
} SCSI_EVENT_DATA;
-
-typedef struct {
- UINT32 Signature;
- EFI_HANDLE Handle;
- EFI_SCSI_IO_PROTOCOL ScsiIo;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- BOOLEAN ExtScsiSupport;
- EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru;
- EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru;
- SCSI_TARGET_ID Pun;
- UINT64 Lun;
- UINT8 ScsiDeviceType;
- UINT8 ScsiVersion;
- BOOLEAN RemovableDevice;
-} SCSI_IO_DEV;
-
-#define SCSI_IO_DEV_FROM_THIS(a) CR (a, SCSI_IO_DEV, ScsiIo, SCSI_IO_DEV_SIGNATURE)
-
//
// SCSI Bus Controller device strcuture
//
+#define SCSI_BUS_DEVICE_SIGNATURE SIGNATURE_32 ('s', 'c', 's', 'i')
//
// The ScsiBusProtocol is just used to locate ScsiBusDev
@@ -87,9 +71,6 @@ typedef struct _EFI_SCSI_BUS_PROTOCOL {
UINT64 Reserved;
} EFI_SCSI_BUS_PROTOCOL;
-#define SCSI_BUS_DEVICE_SIGNATURE SIGNATURE_32 ('s', 'c', 's', 'i')
-
-
typedef struct _SCSI_BUS_DEVICE {
UINTN Signature;
EFI_SCSI_BUS_PROTOCOL BusIdentify;
@@ -101,6 +82,24 @@ typedef struct _SCSI_BUS_DEVICE {
#define SCSI_BUS_CONTROLLER_DEVICE_FROM_THIS(a) CR (a, SCSI_BUS_DEVICE, BusIdentify, SCSI_BUS_DEVICE_SIGNATURE)
+typedef struct {
+ UINT32 Signature;
+ EFI_HANDLE Handle;
+ EFI_SCSI_IO_PROTOCOL ScsiIo;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ BOOLEAN ExtScsiSupport;
+ EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru;
+ EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru;
+ SCSI_BUS_DEVICE *ScsiBusDeviceData;
+ SCSI_TARGET_ID Pun;
+ UINT64 Lun;
+ UINT8 ScsiDeviceType;
+ UINT8 ScsiVersion;
+ BOOLEAN RemovableDevice;
+} SCSI_IO_DEV;
+
+#define SCSI_IO_DEV_FROM_THIS(a) CR (a, SCSI_IO_DEV, ScsiIo, SCSI_IO_DEV_SIGNATURE)
+
//
// Global Variables
//
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
index 99abb2f584..73665117f7 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
@@ -4,7 +4,7 @@
# each of them. After this the driver installs the Device Path Protocol and SCSI I/O Protocol on
# these handles.
#
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2012, 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
@@ -55,6 +55,7 @@
UefiDriverEntryPoint
DebugLib
MemoryAllocationLib
+ ReportStatusCodeLib
[Protocols]
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
index e8f9ed5018..873cf2519a 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
@@ -2,7 +2,7 @@
Usb Bus Driver Binding and Bus IO Protocol.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, 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
@@ -1018,7 +1018,16 @@ UsbBusBuildProtocol (
RootIf->Signature = USB_INTERFACE_SIGNATURE;
RootIf->Device = RootHub;
RootIf->DevicePath = UsbBus->DevicePath;
-
+
+ //
+ // Report Status Code here since we will enumerate the USB devices
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_USB | EFI_IOB_PC_DETECT),
+ UsbBus->DevicePath
+ );
+
Status = mUsbRootHubApi.Init (RootIf);
if (EFI_ERROR (Status)) {
@@ -1265,6 +1274,26 @@ UsbBusControllerDriverStart (
{
EFI_USB_BUS_PROTOCOL *UsbBusId;
EFI_STATUS Status;
+ EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
+
+ Status = gBS->OpenProtocol (
+ Controller,
+ &gEfiDevicePathProtocolGuid,
+ (VOID **) &ParentDevicePath,
+ This->DriverBindingHandle,
+ Controller,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ //
+ // Report Status Code here since we will initialize the host controller
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_USB | EFI_IOB_PC_INIT),
+ ParentDevicePath
+ );
//
// Locate the USB bus protocol, if it is found, USB bus
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 908dab18af..74de7d5d50 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -803,6 +803,14 @@ UsbEnumerateNewDev (
goto ON_ERROR;
}
+ //
+ // Report Status Code to indicate USB device has been detected by hotplug
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_IO_BUS_USB | EFI_IOB_PC_HOTPLUG),
+ Bus->DevicePath
+ );
return EFI_SUCCESS;
ON_ERROR:
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
index 5ccc71d24a..fb7558b730 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
@@ -244,12 +244,25 @@ USBKeyboardDriverBindingStart (
if (!Found) {
//
+ // Report Status Code to indicate that there is no USB keyboard
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,
+ (EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED)
+ );
+ //
// No interrupt endpoint found, then return unsupported.
//
Status = EFI_UNSUPPORTED;
goto ErrorExit;
}
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_DETECTED),
+ UsbKeyboardDevice->DevicePath
+ );
+
UsbKeyboardDevice->Signature = USB_KB_DEV_SIGNATURE;
UsbKeyboardDevice->SimpleInput.Reset = USBKeyboardReset;
UsbKeyboardDevice->SimpleInput.ReadKeyStroke = USBKeyboardReadKeyStroke;
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
index 9fc971c4fc..d955b43806 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
@@ -188,6 +188,16 @@ USBMouseAbsolutePointerDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ErrorExit;
}
+
+ //
+ // Report Status Code here since USB mouse will be detected next.
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_PERIPHERAL_MOUSE | EFI_P_PC_PRESENCE_DETECT),
+ UsbMouseDevice->DevicePath
+ );
+
//
// Get interface & endpoint descriptor
//
@@ -221,12 +231,28 @@ USBMouseAbsolutePointerDriverBindingStart (
if (!Found) {
//
+ // Report Status Code to indicate that there is no USB mouse
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,,
+ (EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED)
+ );
+ //
// No interrupt endpoint found, then return unsupported.
//
Status = EFI_UNSUPPORTED;
goto ErrorExit;
}
+ //
+ // Report Status Code here since USB mouse has be detected.
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_PERIPHERAL_MOUSE | EFI_P_PC_DETECTED),
+ UsbMouseDevice->DevicePath
+ );
+
Status = InitializeUsbMouseDevice (UsbMouseAbsolutePointerDevice);
if (EFI_ERROR (Status)) {
//
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
index db5fe8ebfb..0ad5616d96 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
@@ -188,6 +188,16 @@ USBMouseDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ErrorExit;
}
+
+ //
+ // Report Status Code here since USB mouse will be detected next.
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_PERIPHERAL_MOUSE | EFI_P_PC_PRESENCE_DETECT),
+ UsbMouseDevice->DevicePath
+ );
+
//
// Get interface & endpoint descriptor
//
@@ -221,12 +231,28 @@ USBMouseDriverBindingStart (
if (!Found) {
//
+ // Report Status Code to indicate that there is no USB mouse
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,
+ (EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED)
+ );
+ //
// No interrupt endpoint found, then return unsupported.
//
Status = EFI_UNSUPPORTED;
goto ErrorExit;
}
+ //
+ // Report Status Code here since USB mouse has be detected.
+ //
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (
+ EFI_PROGRESS_CODE,
+ (EFI_PERIPHERAL_MOUSE | EFI_P_PC_DETECTED),
+ UsbMouseDevice->DevicePath
+ );
+
Status = InitializeUsbMouseDevice (UsbMouseDevice);
if (EFI_ERROR (Status)) {
//