REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1408
According to the information of the above BZ-1408 and other platform
owners, NVM Express devices are becoming more likely to be a critical
part during the boot process.
This commit will add the calls to 'REPORT_STATUS_CODE' when there is a
failure happens during the NVM Express controller/device initialization
process.
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <brbarkel@microsoft.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
NVM Express specification.\r
\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
NVM Express specification.\r
\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
- Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2013 - 2019, 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
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
#include <Library/MemoryAllocationLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
\r
typedef struct _NVME_CONTROLLER_PRIVATE_DATA NVME_CONTROLLER_PRIVATE_DATA;\r
typedef struct _NVME_DEVICE_PRIVATE_DATA NVME_DEVICE_PRIVATE_DATA;\r
\r
typedef struct _NVME_CONTROLLER_PRIVATE_DATA NVME_CONTROLLER_PRIVATE_DATA;\r
typedef struct _NVME_DEVICE_PRIVATE_DATA NVME_DEVICE_PRIVATE_DATA;\r
# NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows\r
# NVM Express specification.\r
#\r
# NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows\r
# NVM Express specification.\r
#\r
-# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2019, 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
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
UefiBootServicesTableLib\r
UefiLib\r
PrintLib\r
UefiBootServicesTableLib\r
UefiLib\r
PrintLib\r
\r
[Protocols]\r
gEfiPciIoProtocolGuid ## TO_START\r
\r
[Protocols]\r
gEfiPciIoProtocolGuid ## TO_START\r
NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows\r
NVM Express specification.\r
\r
NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows\r
NVM Express specification.\r
\r
- Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2013 - 2019, 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
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
\r
if (Index == 0) {\r
Status = EFI_DEVICE_ERROR;\r
\r
if (Index == 0) {\r
Status = EFI_DEVICE_ERROR;\r
+ REPORT_STATUS_CODE (\r
+ (EFI_ERROR_CODE | EFI_ERROR_MAJOR),\r
+ (EFI_IO_BUS_SCSI | EFI_IOB_EC_INTERFACE_ERROR)\r
+ );\r
}\r
\r
DEBUG ((EFI_D_INFO, "NVMe controller is disabled with status [%r].\n", Status));\r
}\r
\r
DEBUG ((EFI_D_INFO, "NVMe controller is disabled with status [%r].\n", Status));\r
\r
if (Index == 0) {\r
Status = EFI_TIMEOUT;\r
\r
if (Index == 0) {\r
Status = EFI_TIMEOUT;\r
+ REPORT_STATUS_CODE (\r
+ (EFI_ERROR_CODE | EFI_ERROR_MAJOR),\r
+ (EFI_IO_BUS_SCSI | EFI_IOB_EC_INTERFACE_ERROR)\r
+ );\r
}\r
\r
DEBUG ((EFI_D_INFO, "NVMe controller is enabled with status [%r].\n", Status));\r
}\r
\r
DEBUG ((EFI_D_INFO, "NVMe controller is enabled with status [%r].\n", Status));\r