summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-24 02:54:40 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-24 02:54:40 +0000
commit9d5eaca403dce9a45565ec3bf490d75d643c15b5 (patch)
tree80302df69a704888e24e9763452859161b8f9c35 /EdkCompatibilityPkg
parentdc8d93ca0c9a798fe4e23f68b5b5adc032bf5509 (diff)
downloadedk2-9d5eaca403dce9a45565ec3bf490d75d643c15b5.zip
edk2-9d5eaca403dce9a45565ec3bf490d75d643c15b5.tar.gz
edk2-9d5eaca403dce9a45565ec3bf490d75d643c15b5.tar.bz2
Add an ASSERT to make sure this thunk module can only be used together with a PI PEI core, as we
assume PeiServices Pointer Table can be located in a standard way defined in PI spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5955 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Compatibility/FvFileLoaderToLoadFileThunk/FvFileLoaderToLoadFileThunk.c6
-rw-r--r--EdkCompatibilityPkg/Compatibility/ReadOnlyVariable2ToReadOnlyVariableThunk/ReadOnlyVariable2ToReadOnlyVariableThunk.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FvFileLoaderToLoadFileThunk/FvFileLoaderToLoadFileThunk.c b/EdkCompatibilityPkg/Compatibility/FvFileLoaderToLoadFileThunk/FvFileLoaderToLoadFileThunk.c
index 5f09a8d..70bc333 100644
--- a/EdkCompatibilityPkg/Compatibility/FvFileLoaderToLoadFileThunk/FvFileLoaderToLoadFileThunk.c
+++ b/EdkCompatibilityPkg/Compatibility/FvFileLoaderToLoadFileThunk/FvFileLoaderToLoadFileThunk.c
@@ -78,6 +78,12 @@ InitPeim (
IN CONST EFI_PEI_SERVICES **PeiServices
)
{
+ //
+ // This thunk module can only be used together with a PI PEI core, as we
+ // assume PeiServices Pointer Table can be located in a standard way defined
+ // in PI spec.
+ //
+ ASSERT ((*PeiServices)->Hdr.Revision >= 0x00010000);
return (*PeiServices)->InstallPpi (PeiServices, &mPpiFrameworkLoadFile);
}
diff --git a/EdkCompatibilityPkg/Compatibility/ReadOnlyVariable2ToReadOnlyVariableThunk/ReadOnlyVariable2ToReadOnlyVariableThunk.c b/EdkCompatibilityPkg/Compatibility/ReadOnlyVariable2ToReadOnlyVariableThunk/ReadOnlyVariable2ToReadOnlyVariableThunk.c
index 756787e..7e2ca12 100644
--- a/EdkCompatibilityPkg/Compatibility/ReadOnlyVariable2ToReadOnlyVariableThunk/ReadOnlyVariable2ToReadOnlyVariableThunk.c
+++ b/EdkCompatibilityPkg/Compatibility/ReadOnlyVariable2ToReadOnlyVariableThunk/ReadOnlyVariable2ToReadOnlyVariableThunk.c
@@ -101,6 +101,12 @@ Returns:
{
VOID *Interface;
EFI_STATUS Status;
+ //
+ // This thunk module can only be used together with a PI PEI core, as we
+ // assume PeiServices Pointer Table can be located in a standard way defined
+ // in PI spec.
+ //
+ ASSERT ((*PeiServices)->Hdr.Revision >= 0x00010000);
//
// Make sure ReadOnlyVariable2ToReadOnlyVariable module is not present. If so, the call chain will form a