public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/PiSmmCore: Pad POOL_HEADER to be 8-byte aligned
@ 2017-04-18  1:56 Hao Wu
  0 siblings, 0 replies; only message in thread
From: Hao Wu @ 2017-04-18  1:56 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Jiewen Yao

According to the PI spec (Vol 4, Section 3.2 SmmAllocatePool()):
The SmmAllocatePool() function ... All allocations are eight-byte aligned.

The commit adds a padding field in structure 'POOL_HEADER' to ensure the
above requirement is met.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
index c12805a2dd..a8aa017add 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
@@ -1200,6 +1200,7 @@ typedef struct {
   UINTN           Size;
   BOOLEAN         Available;
   EFI_MEMORY_TYPE Type;
+  UINT32          Padding;
 } POOL_HEADER;
 
 typedef struct {
-- 
2.12.0.windows.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-18  1:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-18  1:56 [PATCH] MdeModulePkg/PiSmmCore: Pad POOL_HEADER to be 8-byte aligned Hao Wu

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