From 6d98a371593cbeee89001182a50f144f074893e2 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Mon, 11 Jul 2016 19:52:00 +0800 Subject: UefiCpuPkg/CpuMpPei: Remove un-used variables and functions Cc: Feng Tian Cc: Michael Kinney Cc: Giri Mudusuru Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Giri P Mudusuru --- UefiCpuPkg/CpuMpPei/X64/MpEqu.inc | 5 ----- UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm | 26 -------------------------- UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm | 27 --------------------------- 3 files changed, 58 deletions(-) (limited to 'UefiCpuPkg/CpuMpPei/X64') diff --git a/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc b/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc index 30c7f6110b..07caf3b991 100644 --- a/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc +++ b/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc @@ -18,11 +18,6 @@ ; ;------------------------------------------------------------------------------- -PROTECT_MODE_CS equ 10h -PROTECT_MODE_DS equ 18h -LONG_MODE_CS equ 38h -LONG_MODE_DS equ 30h - VacantFlag equ 00h NotVacantFlag equ 0ffh diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm index f018c3bb09..03e00924fb 100644 --- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm +++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm @@ -288,30 +288,4 @@ OtherLoaded: ret AsmExchangeRole ENDP -AsmInitializeGdt PROC - push rbp - mov rbp, rsp - - lgdt fword PTR [rcx] ; update the GDTR - - sub rsp, 0x10 - lea rax, SetCodeSelectorFarJump - mov [rsp], rax - mov rdx, LONG_MODE_CS - mov [rsp + 4], dx ; get new CS - jmp fword ptr [rsp] -SetCodeSelectorFarJump: - add rsp, 0x10 - - mov rax, LONG_MODE_DS ; get new DS - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - - pop rbp - ret -AsmInitializeGdt ENDP - END diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm index 99cbee296b..e0a98647df 100644 --- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm +++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm @@ -280,30 +280,3 @@ OtherLoaded: pop rax ret - -global ASM_PFX(AsmInitializeGdt) -ASM_PFX(AsmInitializeGdt): - push rbp - mov rbp, rsp - - lgdt [rcx] ; update the GDTR - - sub rsp, 0x10 - mov rax, ASM_PFX(SetCodeSelectorFarJump) - mov [rsp], rax - mov rdx, LONG_MODE_CS - mov [rsp + 4], dx ; get new CS - jmp far dword [rsp] ; far jump with new CS -ASM_PFX(SetCodeSelectorFarJump): - add rsp, 0x10 - - mov rax, LONG_MODE_DS ; get new DS - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - - pop rbp - - ret -- cgit v1.2.3