REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1273
Current code only uses DEBUG() for VTd error.
This patch updates to also report status code for VTd error.
Test done:
Created case that has VTd error and confirmed the error
status code could be reported as expected.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
#include <Library/CacheMaintenanceLib.h>\r
#include <Library/PerformanceLib.h>\r
#include <Library/PrintLib.h>\r
#include <Library/CacheMaintenanceLib.h>\r
#include <Library/PerformanceLib.h>\r
#include <Library/PrintLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
\r
#include <Guid/EventGroup.h>\r
#include <Guid/Acpi.h>\r
\r
#include <Guid/EventGroup.h>\r
#include <Guid/Acpi.h>\r
CacheMaintenanceLib\r
PerformanceLib\r
PrintLib\r
CacheMaintenanceLib\r
PerformanceLib\r
PrintLib\r
\r
[Guids]\r
gEfiEventExitBootServicesGuid ## CONSUMES ## Event\r
\r
[Guids]\r
gEfiEventExitBootServicesGuid ## CONSUMES ## Event\r
\r
[Pcd]\r
gIntelSiliconPkgTokenSpaceGuid.PcdVTdPolicyPropertyMask ## CONSUMES\r
\r
[Pcd]\r
gIntelSiliconPkgTokenSpaceGuid.PcdVTdPolicyPropertyMask ## CONSUMES\r
+ gIntelSiliconPkgTokenSpaceGuid.PcdErrorCodeVTdError ## CONSUMES\r
\r
[Depex]\r
gEfiPciRootBridgeIoProtocolGuid\r
\r
[Depex]\r
gEfiPciRootBridgeIoProtocolGuid\r
+ REPORT_STATUS_CODE (EFI_ERROR_CODE, PcdGet32 (PcdErrorCodeVTdError));\r
DEBUG((DEBUG_INFO, "\n#### ERROR ####\n"));\r
DumpVtdRegs (Num);\r
DEBUG((DEBUG_INFO, "#### ERROR ####\n\n"));\r
DEBUG((DEBUG_INFO, "\n#### ERROR ####\n"));\r
DumpVtdRegs (Num);\r
DEBUG((DEBUG_INFO, "#### ERROR ####\n\n"));\r
[Protocols]\r
gEdkiiPlatformVTdPolicyProtocolGuid = { 0x3d17e448, 0x466, 0x4e20, { 0x99, 0x9f, 0xb2, 0xe1, 0x34, 0x88, 0xee, 0x22 }}\r
\r
[Protocols]\r
gEdkiiPlatformVTdPolicyProtocolGuid = { 0x3d17e448, 0x466, 0x4e20, { 0x99, 0x9f, 0xb2, 0xe1, 0x34, 0x88, 0xee, 0x22 }}\r
\r
+[PcdsFixedAtBuild, PcdsPatchableInModule]\r
+ ## Error code for VTd error.<BR><BR>\r
+ # EDKII_ERROR_CODE_VTD_ERROR = (EFI_IO_BUS_UNSPECIFIED | (EFI_OEM_SPECIFIC | 0x00000000)) = 0x02008000<BR>\r
+ # @Prompt Error code for VTd error.\r
+ gIntelSiliconPkgTokenSpaceGuid.PcdErrorCodeVTdError|0x02008000|UINT32|0x00000005\r
+\r
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]\r
## This is the GUID of the FFS which contains the Graphics Video BIOS Table (VBT)\r
# The VBT content is stored as a RAW section which is consumed by GOP PEI/UEFI driver.\r
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]\r
## This is the GUID of the FFS which contains the Graphics Video BIOS Table (VBT)\r
# The VBT content is stored as a RAW section which is consumed by GOP PEI/UEFI driver.\r