Add measure to GPT boot table.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7846
6f19259b-4bc3-4df7-8a09-
765794883524
\r
if (gRT->Hdr.Revision < 0x20000) {\r
return ((FRAMEWORK_EFI_RUNTIME_SERVICES*)gRT)->ReportStatusCode;\r
\r
if (gRT->Hdr.Revision < 0x20000) {\r
return ((FRAMEWORK_EFI_RUNTIME_SERVICES*)gRT)->ReportStatusCode;\r
- } else if (gBS != NULL) {\r
+ } else if (gBS != NULL && gBS->LocateProtocol != NULL) {\r
Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**)&StatusCodeProtocol);\r
if (!EFI_ERROR (Status) && StatusCodeProtocol != NULL) {\r
return StatusCodeProtocol->ReportStatusCode;\r
Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**)&StatusCodeProtocol);\r
if (!EFI_ERROR (Status) && StatusCodeProtocol != NULL) {\r
return StatusCodeProtocol->ReportStatusCode;\r
ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));\r
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
\r
ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));\r
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
\r
+ if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) {\r
return EFI_UNSUPPORTED;\r
}\r
\r
return EFI_UNSUPPORTED;\r
}\r
\r
EFI_DEVICE_PATH_PROTOCOL *WorkingDevicePath;\r
EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save;\r
LIST_ENTRY TempBootLists;\r
EFI_DEVICE_PATH_PROTOCOL *WorkingDevicePath;\r
EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save;\r
LIST_ENTRY TempBootLists;\r
+ EFI_SECURITY_ARCH_PROTOCOL *SecurityProtocol;\r
\r
//\r
// Record the performance data for End of BDS\r
\r
//\r
// Record the performance data for End of BDS\r
DevicePath = Option->DevicePath;\r
}\r
\r
DevicePath = Option->DevicePath;\r
}\r
\r
+ //\r
+ // Measure GPT Table by SAP protocol.\r
+ //\r
+ Status = gBS->LocateProtocol (\r
+ &gEfiSecurityArchProtocolGuid,\r
+ NULL,\r
+ &SecurityProtocol\r
+ );\r
+ if (!EFI_ERROR (Status)) {\r
+ Status = SecurityProtocol->FileAuthenticationState (SecurityProtocol, 0, DevicePath);\r
+ }\r
+\r
DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));\r
\r
Status = gBS->LoadImage (\r
DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));\r
\r
Status = gBS->LoadImage (\r
gEfiConsoleControlProtocolGuid # PROTOCOL CONSUMES\r
gEfiOEMBadgingProtocolGuid # PROTOCOL CONSUMES\r
gEfiHiiFontProtocolGuid # PROTOCOL CONSUMES\r
gEfiConsoleControlProtocolGuid # PROTOCOL CONSUMES\r
gEfiOEMBadgingProtocolGuid # PROTOCOL CONSUMES\r
gEfiHiiFontProtocolGuid # PROTOCOL CONSUMES\r
+ gEfiSecurityArchProtocolGuid\r
\r
[FeaturePcd.common]\r
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport\r
\r
[FeaturePcd.common]\r
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport\r
#include <Protocol/UgaDraw.h>\r
#include <Protocol/HiiFont.h>\r
#include <Protocol/HiiImage.h>\r
#include <Protocol/UgaDraw.h>\r
#include <Protocol/HiiFont.h>\r
#include <Protocol/HiiImage.h>\r
+#include <Protocol/Security.h>\r
\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r
\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r