Hi, experts: I am confused by some codes in InitInterruptDescriptorTable() function (in UefiCpuPkg/CpuDxe/CpuDxe.c).
...... if ((OldIdtPtr.Base != 0) && ((OldIdtPtr.Limit & 7) == 7)) { // Based on my understanding, because DxeIpl has created IDT when switching from P-Mode to Long-Mode. // So, should execute below code. OldIdt = (IA32_IDT_GATE_DESCRIPTOR*) OldIdtPtr.Base; OldIdtSize = (OldIdtPtr.Limit + 1) / sizeof (IA32_IDT_GATE_DESCRIPTOR); ...... } else { OldIdt = NULL; OldIdtSize = 0; } ...... // Based on my understanding, When come here, index = OldIdtSize = 32, so CpuRegisterInterruptHandler() could not be run. for (Index = OldIdtSize; Index < 32; Index++) { Status = CpuRegisterInterruptHandler (&gCpu, Index, CommonExceptionHandler); ASSERT_EFI_ERROR (Status); } My question is: Because DxeIpl has created IDT, and OldIdtSize = 32, so CpuRegisterInterruptHandler() could not be run, right? Best wishes,
------------------------------------------------------------------------------
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel