public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg:/Tcg2Dxe: remove 4G limitation
@ 2016-12-12  6:35 Jiewen Yao
  2016-12-12  6:53 ` Zeng, Star
  0 siblings, 1 reply; 6+ messages in thread
From: Jiewen Yao @ 2016-12-12  6:35 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chao Zhang, Star Zeng

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>
---
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index 9e8dfae..ca28301 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1396,7 +1396,7 @@ SetupEventLog (
       mTcgDxeData.EventLogAreaStruct[Index].EventLogFormat = mTcg2EventInfo[Index].LogFormat;
       Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);
       Status = gBS->AllocatePages (
-                      AllocateMaxAddress,
+                      AllocateAnyPages,
                       EfiBootServicesData,
                       EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcgLogAreaMinLen)),
                       &Lasa
@@ -1498,7 +1498,7 @@ SetupEventLog (
       if (mTcg2EventInfo[Index].LogFormat == EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
         Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);
         Status = gBS->AllocatePages (
-                        AllocateMaxAddress,
+                        AllocateAnyPages,
                         EfiACPIMemoryNVS,
                         EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcg2FinalLogAreaLen)),
                         &Lasa
-- 
2.7.4.windows.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] SecurityPkg:/Tcg2Dxe: remove 4G limitation
@ 2016-12-12  7:02 Jiewen Yao
  2016-12-13  1:16 ` Zhang, Chao B
  0 siblings, 1 reply; 6+ messages in thread
From: Jiewen Yao @ 2016-12-12  7:02 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chao Zhang, Star Zeng

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>
---
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index 9e8dfae..cf2fe4e 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1394,9 +1394,8 @@ SetupEventLog (
   for (Index = 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]); Index++) {
     if ((mTcgDxeData.BsCap.SupportedEventLogs & mTcg2EventInfo[Index].LogFormat) != 0) {
       mTcgDxeData.EventLogAreaStruct[Index].EventLogFormat = mTcg2EventInfo[Index].LogFormat;
-      Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);
       Status = gBS->AllocatePages (
-                      AllocateMaxAddress,
+                      AllocateAnyPages,
                       EfiBootServicesData,
                       EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcgLogAreaMinLen)),
                       &Lasa
@@ -1496,9 +1495,8 @@ SetupEventLog (
   for (Index = 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]); Index++) {
     if ((mTcgDxeData.BsCap.SupportedEventLogs & mTcg2EventInfo[Index].LogFormat) != 0) {
       if (mTcg2EventInfo[Index].LogFormat == EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
-        Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);
         Status = gBS->AllocatePages (
-                        AllocateMaxAddress,
+                        AllocateAnyPages,
                         EfiACPIMemoryNVS,
                         EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcg2FinalLogAreaLen)),
                         &Lasa
-- 
2.7.4.windows.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-12-13  1:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12  6:35 [PATCH] SecurityPkg:/Tcg2Dxe: remove 4G limitation Jiewen Yao
2016-12-12  6:53 ` Zeng, Star
2016-12-12  6:55   ` Yao, Jiewen
2016-12-12  6:56     ` Zeng, Star
  -- strict thread matches above, loose matches on Subject: below --
2016-12-12  7:02 Jiewen Yao
2016-12-13  1:16 ` Zhang, Chao B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox