\r
#include <IndustryStandard/Acpi.h> // EFI_ACPI_DESCRIPTION_HEADER\r
#include <IndustryStandard/QemuLoader.h> // QEMU_LOADER_FNAME_SIZE\r
+#include <IndustryStandard/UefiTcgPlatform.h>\r
#include <Library/BaseLib.h> // AsciiStrCmp()\r
#include <Library/BaseMemoryLib.h> // CopyMem()\r
#include <Library/DebugLib.h> // DEBUG()\r
#include <Library/QemuFwCfgLib.h> // QemuFwCfgFindFile()\r
#include <Library/QemuFwCfgS3Lib.h> // QemuFwCfgS3Enabled()\r
#include <Library/UefiBootServicesTableLib.h> // gBS\r
+#include <Library/TpmMeasurementLib.h>\r
\r
#include "AcpiPlatform.h"\r
\r
(UINT64)Blob->Size,\r
(UINT64)(UINTN)Blob->Base\r
));\r
+\r
+ //\r
+ // Measure the data which is downloaded from QEMU.\r
+ // It has to be done before it is consumed. Because the data will\r
+ // be updated in the following operations.\r
+ //\r
+ TpmMeasureAndLogData (\r
+ 1,\r
+ EV_PLATFORM_CONFIG_FLAGS,\r
+ EV_POSTCODE_INFO_ACPI_DATA,\r
+ ACPI_DATA_LEN,\r
+ (VOID *)(UINTN)Blob->Base,\r
+ Blob->Size\r
+ );\r
+\r
return EFI_SUCCESS;\r
\r
FreeBlob:\r
QemuFwCfgSelectItem (FwCfgItem);\r
QemuFwCfgReadBytes (FwCfgSize, LoaderStart);\r
RestorePciDecoding (OriginalPciAttributes, OriginalPciAttributesCount);\r
+\r
+ //\r
+ // Measure the "etc/table-loader" which is downloaded from QEMU.\r
+ // It has to be done before it is consumed. Because it would be\r
+ // updated in the following operations.\r
+ //\r
+ TpmMeasureAndLogData (\r
+ 1,\r
+ EV_PLATFORM_CONFIG_FLAGS,\r
+ EV_POSTCODE_INFO_ACPI_DATA,\r
+ ACPI_DATA_LEN,\r
+ (VOID *)(UINTN)LoaderStart,\r
+ FwCfgSize\r
+ );\r
+\r
LoaderEnd = LoaderStart + FwCfgSize / sizeof *LoaderEntry;\r
\r
AllocationsRestrictedTo32Bit = NULL;\r