From 994df20926ead14441c732b8dbe84e9fef78d4f5 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 30 Jan 2018 14:31:23 +0100 Subject: UefiCpuPkg/PiSmmCpuDxeSmm: update comments in IA32 SmmStartup() The gSmmCr3, gSmmCr4, gSmmCr0 and gSmmJmpAddr global variables are used for patching assembly instructions, thus we can't yet remove the DB encodings for those instructions. At least we should add the intended meanings in comments. This patch only changes comments. Cc: Eric Dong Cc: Jian J Wang Cc: Jiewen Yao Cc: Paolo Bonzini Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Paolo Bonzini Reviewed-by: Ruiyu Ni [lersek@redhat.com: adapt commit msg to ongoing PatchAssembly discussion] --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'UefiCpuPkg') diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm index e96dd8d239..08534dba64 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm @@ -47,12 +47,12 @@ ASM_PFX(SmmStartup): cpuid DB 0x66 mov ebx, edx ; rdmsr will change edx. keep it in ebx. - DB 0x66, 0xb8 + DB 0x66, 0xb8 ; mov eax, imm32 ASM_PFX(gSmmCr3): DD 0 mov cr3, eax DB 0x67, 0x66 lgdt [cs:ebp + (ASM_PFX(gcSmiInitGdtr) - ASM_PFX(SmmStartup))] - DB 0x66, 0xb8 + DB 0x66, 0xb8 ; mov eax, imm32 ASM_PFX(gSmmCr4): DD 0 mov cr4, eax DB 0x66 @@ -64,11 +64,11 @@ ASM_PFX(gSmmCr4): DD 0 or ah, BIT3 ; set NXE bit wrmsr .1: - DB 0x66, 0xb8 + DB 0x66, 0xb8 ; mov eax, imm32 ASM_PFX(gSmmCr0): DD 0 DB 0xbf, PROTECT_MODE_DS, 0 ; mov di, PROTECT_MODE_DS mov cr0, eax - DB 0x66, 0xea ; jmp far [ptr48] + DB 0x66, 0xea ; jmp far [ptr48] ASM_PFX(gSmmJmpAddr): DD @32bit DW PROTECT_MODE_CS -- cgit v1.2.3