Hi, Jeff: Thanks for your reply! S3ResumeExecuteBootScript() (in UefiCpuPkg\Universal\Acpi\S3Resume2Pei\S3Resume.c) will call AsmReadIdtr (&PeiS3ResumeState->Idtr) to save IDT. And S3ResumeBootOs()(in UefiCpuPkg\Universal\Acpi\S3Resume2Pei\S3Resume.c) will call AsmWriteIdtr (&PeiS3ResumeState->Idtr) to restore IDT.
Why need to save and restore IDT in S3Resume PEIM? Because of BootScriptExecutorDxe driver will call SetIdtEntry() to change IDT? Best wishes, ----- Original Message ----- From: Fan, Jeff [mailto:jeff....@intel.com] Sent: 2014年10月24日 16:48 To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] question about setuping IDT in UEFI boot procedure On S3 path, S3NvsPageTableAddress () (in UefiCpuPkg/Universal/Acpi/S3Resume.c) will re-create Page Table since we cannot trust the original Page Table saved in ACPINvs memory more. Moreover, we only create page table for < 4G address is due to performance concern. When programming boot script entries, we may access > 4 G MMIO or memory address. Thus, One Page Fault exception handler is required to build Page entry in case > 4G address accessed. Jeff -----Original Message----- From: tiger...@via-alliance.com [mailto:tiger...@via-alliance.com] Sent: Thursday, October 23, 2014 5:55 PM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] question about setuping IDT in UEFI boot procedure Hi, Jeff: MdeModulePkg\Universal\Acpi\BootScriptExecutorDxe\X64\SetIdtEntry.c will hook page fault handler. So, is there any story about adding this hook function? I want to understand why adding this code. Thanks a lot! Best wishes, ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel