From e70330e0e3db43d25ac7e445d293f69c20042e28 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Tue, 18 Nov 2008 09:50:35 +0000 Subject: Bug Fix: Define CPU_STACK_ALIGNMENT for each ARCH. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6596 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h | 5 +++++ .../Library/EdkIIGlueLib/Include/Ia32/EdkIIGlueProcessorBind.h | 5 +++++ .../Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h | 5 +++++ .../Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h | 6 ++++++ 4 files changed, 21 insertions(+) (limited to 'EdkCompatibilityPkg') diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h index a96b57f68e..52343e5d66 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h @@ -38,4 +38,9 @@ Abstract: #define MDE_CPU_EBC #endif +/// +/// The stack alignment required for EBC +/// +#define CPU_STACK_ALIGNMENT sizeof(UINTN) + #endif diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ia32/EdkIIGlueProcessorBind.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ia32/EdkIIGlueProcessorBind.h index b6f55b70bf..3e301aca04 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ia32/EdkIIGlueProcessorBind.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ia32/EdkIIGlueProcessorBind.h @@ -38,4 +38,9 @@ Abstract: #define MDE_CPU_IA32 #endif +/// +/// The stack alignment required for IA-32 +/// +#define CPU_STACK_ALIGNMENT sizeof(UINTN) + #endif diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h index a37be76663..beb31c689a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h @@ -64,5 +64,10 @@ typedef struct { #define EFI_EXTENDED_SAL_RESET_SERVICES_PROTOCOL_GUID_LO 0x46f58ce17d019990 #define EFI_EXTENDED_SAL_RESET_SERVICES_PROTOCOL_GUID_HI 0xa06a6798513c76a7 +// +// Per the Itanium Software Conventions and Runtime Architecture Guide, +// section 3.3.4, IPF stack must always be 16-byte aligned. +// +#define CPU_STACK_ALIGNMENT 16 #endif diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h index 7d58bd3e80..e362db86f5 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h @@ -38,4 +38,10 @@ Abstract: #define MDE_CPU_X64 #endif +// +// The stack alignment required for X64 +// +#define CPU_STACK_ALIGNMENT 16 + + #endif -- cgit v1.2.3