> On Mar 31, 2015, at 9:45 PM, Zeng, Star <star.z...@intel.com> wrote:
> 
> Before the event callback, all the drivers(include SMM drivers) share the 
> same DXE SCRIPT_TABLE_PRIVATE_DATA instance, that means the instance pointed 
> by mS3BootScriptTablePtr.
> After the event callback, all the SMM drivers share the same SMM 
> SCRIPT_TABLE_PRIVATE_DATA instance, that means the instance pointed by 
> mS3BootScriptTableSmmPtr, and mS3BootScriptTablePtr also updated to equal to 
> mS3BootScriptTableSmmPtr (in S3BootScriptSmmEventCallBack()).
>  

Star,

Thanks, that explains it. Prior to the event every one is using the same 
pointer. After lockdown the SMM get a new one. I confirmed that pattern with 
the debugger. 

Thanks,

Andrew Fish

> And you may see the below code logic in S3BootScriptGetEntryAddAddress(), 
> that is to say only SMM driver is allowed to write boot script after the 
> event callback.
> -------------------
>   if (mS3BootScriptTablePtr->AtRuntime) {
>     //
>     // We need check InSmm when AtRuntime, because after SmmReadyToLock, only 
> SMM driver is allowed to write boot script.
>     //
>     if (!mS3BootScriptTablePtr->InSmm) {
>       //
>       // Add DEBUG ERROR, so that we can find it at boot time.
>       // Do not use ASSERT, because we may have test invoke this interface.
>       //
>       DEBUG ((EFI_D_ERROR, "FATAL ERROR: Set boot script after 
> ReadyToLock!!!\n"));
>       return NULL;
> }
> -------------------
>  
> Thanks,
> Star

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to