\r
TcgDxePassThroughToTpm() will receive untrusted input and do basic validation.\r
\r
-Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2016, 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
\r
#include "TpmComm.h"\r
\r
-#define EFI_TCG_LOG_AREA_SIZE 0x10000\r
-\r
#define TCG_DXE_DATA_FROM_THIS(this) \\r
BASE_CR (this, TCG_DXE_DATA, TcgProtocol)\r
\r
Status = gBS->AllocatePages (\r
AllocateMaxAddress,\r
EfiACPIMemoryNVS,\r
- EFI_SIZE_TO_PAGES (EFI_TCG_LOG_AREA_SIZE),\r
+ EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcgLogAreaMinLen)),\r
&Lasa\r
);\r
if (EFI_ERROR (Status)) {\r
// To initialize them as 0xFF is recommended \r
// because the OS can know the last entry for that.\r
//\r
- SetMem ((VOID *)(UINTN)mTcgClientAcpiTemplate.Lasa, EFI_TCG_LOG_AREA_SIZE, 0xFF);\r
- mTcgClientAcpiTemplate.Laml = EFI_TCG_LOG_AREA_SIZE;\r
+ SetMem ((VOID *)(UINTN)mTcgClientAcpiTemplate.Lasa, PcdGet32 (PcdTcgLogAreaMinLen), 0xFF);\r
+ mTcgClientAcpiTemplate.Laml = PcdGet32 (PcdTcgLogAreaMinLen);\r
\r
} else {\r
Lasa = mTcgServerAcpiTemplate.Lasa;\r
Status = gBS->AllocatePages (\r
AllocateMaxAddress,\r
EfiACPIMemoryNVS,\r
- EFI_SIZE_TO_PAGES (EFI_TCG_LOG_AREA_SIZE),\r
+ EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcgLogAreaMinLen)),\r
&Lasa\r
);\r
if (EFI_ERROR (Status)) {\r
// To initialize them as 0xFF is recommended \r
// because the OS can know the last entry for that.\r
//\r
- SetMem ((VOID *)(UINTN)mTcgServerAcpiTemplate.Lasa, EFI_TCG_LOG_AREA_SIZE, 0xFF);\r
- mTcgServerAcpiTemplate.Laml = EFI_TCG_LOG_AREA_SIZE;\r
+ SetMem ((VOID *)(UINTN)mTcgServerAcpiTemplate.Lasa, PcdGet32 (PcdTcgLogAreaMinLen), 0xFF);\r
+ mTcgServerAcpiTemplate.Laml = PcdGet32 (PcdTcgLogAreaMinLen);\r
}\r
\r
GuidHob.Raw = GetHobList ();\r
EFI_CALLING_EFI_APPLICATION\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%s not Measured. Error!\n", EFI_CALLING_EFI_APPLICATION));\r
+ DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_CALLING_EFI_APPLICATION));\r
}\r
\r
//\r
EFI_RETURNING_FROM_EFI_APPLICATOIN\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%s not Measured. Error!\n", EFI_RETURNING_FROM_EFI_APPLICATOIN));\r
+ DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_RETURNING_FROM_EFI_APPLICATOIN));\r
}\r
}\r
\r
EFI_EXIT_BOOT_SERVICES_INVOCATION\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%s not Measured. Error!\n", EFI_EXIT_BOOT_SERVICES_INVOCATION));\r
+ DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVICES_INVOCATION));\r
}\r
\r
//\r
EFI_EXIT_BOOT_SERVICES_SUCCEEDED\r
);\r
if (EFI_ERROR (Status)){\r
- DEBUG ((EFI_D_ERROR, "%s not Measured. Error!\n", EFI_EXIT_BOOT_SERVICES_SUCCEEDED));\r
+ DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVICES_SUCCEEDED));\r
}\r
}\r
\r
EFI_EXIT_BOOT_SERVICES_FAILED\r
);\r
if (EFI_ERROR (Status)){\r
- DEBUG ((EFI_D_ERROR, "%s not Measured. Error!\n", EFI_EXIT_BOOT_SERVICES_FAILED));\r
+ DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVICES_FAILED));\r
}\r
}\r
\r