Hi, Jeff:
Got it!
Thanks a lot!
For creating IDT in SEC/PEI phase, is it just for source level debug purpose?
Usually, PEI should turn off interrupt, right?

Best wishes,

----- Original Message -----
From: Fan, Jeff [mailto:jeff....@intel.com] 
Sent: 2014年10月27日 15:04
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] question about setuping IDT in UEFI boot procedure

For the case 32bit PEI + 64Bit DXE, we need to load 64bit IDT table to capture 
exceptions happened in long mode because 32bit IDT table cannot work in long 
mode.
For the case 32bit PEI + 32bit DXE, we could use the 32bit IDT table setup in 
SEC/PEI and needn't to load new 32bit IDT table.

-----Original Message-----
From: tiger...@via-alliance.com [mailto:tiger...@via-alliance.com] 
Sent: Monday, October 27, 2014 2:56 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] question about setuping IDT in UEFI boot procedure

Hi, Jeff:
Thanks for your quick reply!
Another question:
1. MdeModulePkg\Core\DxeIplPeim\Ia32\DxeLoadFunc.c will reconstruct IDT before 
handing off to DXE.
   if (FeaturePcdGet(PcdDxeIplSwitchToLongMode))
  {
           Why it need to reconstruct IDT when trying to switch to Long-mode?
  }
  Else
  {
          Why does it not need to reconstruct IDT in this case?
  }

Best wishes,

----- Original Message -----
From: Fan, Jeff [mailto:jeff....@intel.com] 
Sent: 2014年10月27日 14:33
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] question about setuping IDT in UEFI boot procedure

Exaclty.

-----Original Message-----
From: tiger...@via-alliance.com [mailto:tiger...@via-alliance.com] 
Sent: Monday, October 27, 2014 2:17 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] question about setuping IDT in UEFI boot procedure

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

------------------------------------------------------------------------------
_______________________________________________
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

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to