]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add an ASSERT to make sure this thunk module can only be used together with a PI...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 02:54:40 +0000 (02:54 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 02:54:40 +0000 (02:54 +0000)
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

EdkCompatibilityPkg/Compatibility/FvFileLoaderToLoadFileThunk/FvFileLoaderToLoadFileThunk.c
EdkCompatibilityPkg/Compatibility/ReadOnlyVariable2ToReadOnlyVariableThunk/ReadOnlyVariable2ToReadOnlyVariableThunk.c

index 5f09a8d21bd2c4104ab6c5dded9b77fc3009ad45..70bc333d5d9f758205d8f4f9757c1b98df0e942b 100644 (file)
@@ -78,6 +78,12 @@ InitPeim (
   IN CONST EFI_PEI_SERVICES  **PeiServices\r
   )\r
 {\r
+  //\r
+  // This thunk module can only be used together with a PI PEI core, as we \r
+  // assume PeiServices Pointer Table can be located in a standard way defined\r
+  // in PI spec.\r
+  //\r
+  ASSERT ((*PeiServices)->Hdr.Revision >= 0x00010000);\r
   return (*PeiServices)->InstallPpi (PeiServices, &mPpiFrameworkLoadFile);\r
 }\r
 \r
index 756787e27b1258f7b9c0a046783e118194d00aef..7e2ca126d1dcdc50d0a35307ea6bb974b5997fb9 100644 (file)
@@ -101,6 +101,12 @@ Returns:
 {\r
   VOID        *Interface;\r
   EFI_STATUS  Status;\r
+  //\r
+  // This thunk module can only be used together with a PI PEI core, as we \r
+  // assume PeiServices Pointer Table can be located in a standard way defined\r
+  // in PI spec.\r
+  //\r
+  ASSERT ((*PeiServices)->Hdr.Revision >= 0x00010000);\r
 \r
   //\r
   // Make sure ReadOnlyVariable2ToReadOnlyVariable module is not present. If so, the call chain will form a\r