]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg:/Tcg2Dxe: remove 4G limitation
authorJiewen Yao <jiewen.yao@intel.com>
Mon, 12 Dec 2016 06:35:05 +0000 (14:35 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Tue, 13 Dec 2016 06:31:23 +0000 (14:31 +0800)
Tcg2Dxe allocates event log below 4G. It is unnecessary.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c

index 9e8dfae6cc66af3fa2dece5615bc24e288a36cbe..cf2fe4e508fd3fc69fe94b965d2baf552081eb98 100644 (file)
@@ -1394,9 +1394,8 @@ SetupEventLog (
   for (Index = 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]); Index++) {\r
     if ((mTcgDxeData.BsCap.SupportedEventLogs & mTcg2EventInfo[Index].LogFormat) != 0) {\r
       mTcgDxeData.EventLogAreaStruct[Index].EventLogFormat = mTcg2EventInfo[Index].LogFormat;\r
-      Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);\r
       Status = gBS->AllocatePages (\r
-                      AllocateMaxAddress,\r
+                      AllocateAnyPages,\r
                       EfiBootServicesData,\r
                       EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcgLogAreaMinLen)),\r
                       &Lasa\r
@@ -1496,9 +1495,8 @@ SetupEventLog (
   for (Index = 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]); Index++) {\r
     if ((mTcgDxeData.BsCap.SupportedEventLogs & mTcg2EventInfo[Index].LogFormat) != 0) {\r
       if (mTcg2EventInfo[Index].LogFormat == EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {\r
-        Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);\r
         Status = gBS->AllocatePages (\r
-                        AllocateMaxAddress,\r
+                        AllocateAnyPages,\r
                         EfiACPIMemoryNVS,\r
                         EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcg2FinalLogAreaLen)),\r
                         &Lasa\r