X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UefiCpuPkg%2FPiSmmCpuDxeSmm%2FIa32%2FSmiEntry.S;h=fbaa0725f0bc8baf3633fc2bc2e36ac6be66f9ee;hp=6fcf41a677d6adef13b4247179b663a4d3aac2a9;hb=f45f2d4ad4d803eb33c608bca8242992f1841fec;hpb=0b256fb1dd7ca267d6e448768e519f54f97f347a diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S index 6fcf41a677..fbaa0725f0 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S @@ -24,7 +24,6 @@ ASM_GLOBAL ASM_PFX(gcSmiHandlerSize) ASM_GLOBAL ASM_PFX(gSmiCr3) ASM_GLOBAL ASM_PFX(gSmiStack) ASM_GLOBAL ASM_PFX(gSmbase) -ASM_GLOBAL ASM_PFX(FeaturePcdGet (PcdCpuSmmDebug)) ASM_GLOBAL ASM_PFX(FeaturePcdGet (PcdCpuSmmStackGuard)) ASM_GLOBAL ASM_PFX(gSmiHandlerIdtr) @@ -148,43 +147,22 @@ L5: # jmp _SmiHandler # instruction is not needed _SmiHandler: - cmpb $0, ASM_PFX(FeaturePcdGet (PcdCpuSmmDebug)) - jz L3 - -L6: - call L1 -L1: - popl %ebp - movl $0x80000001, %eax - cpuid - btl $29, %edx # check cpuid to identify X64 or IA32 - leal (0x7fc8 - (L1 - _SmiEntryPoint))(%ebp), %edi - leal 4(%edi), %esi - jnc L2 - addl $4, %esi -L2: - movl (%esi), %ecx - movl (%edi), %edx -L7: - movl %ecx, %dr6 - movl %edx, %dr7 # restore DR6 & DR7 before running C code -L3: - - pushl (%esp) + movl (%esp), %ebx + pushl %ebx + movl $ASM_PFX(CpuSmmDebugEntry), %eax + call *%eax + popl %ecx + + pushl %ebx movl $ASM_PFX(SmiRendezvous), %eax call *%eax popl %ecx - - cmpb $0, ASM_PFX(FeaturePcdGet (PcdCpuSmmDebug)) - jz L4 - - movl %dr6, %ecx - movl %dr7, %edx - movl %ecx, (%esi) - movl %edx, (%edi) -L4: + pushl %ebx + movl $ASM_PFX(CpuSmmDebugExit), %eax + call *%eax + popl %ecx rsm