Eliminate EFI_IMAGE_MACHINE_TYPE_SUPPORTED.

Move Gdt initialization from InitializeMpServiceData() to CPU Arch specific function.
We create SmmFuncsArch.c for hold CPU specific function, so that
EFI_IMAGE_MACHINE_TYPE_SUPPORTED(EFI_IMAGE_MACHINE_X64) can be removed.

For IA32 version, we always allocate new page for GDT entry, for easy maintenance.
For X64 version, we fixed TssBase in GDT entry to make sure TSS data is correct.
Remove TSS fixup for GDT in ASM file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Fan, Jeff" <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18937 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Yao, Jiewen
2015-11-25 04:23:01 +00:00
committed by jyao1
parent 02f02b16e2
commit fe5f194943
7 changed files with 186 additions and 96 deletions

View File

@@ -124,14 +124,6 @@ gSmiCr3 DD ?
sgdt fword ptr [rsp]
mov eax, [rsp + 2] ; eax = GDT base
add esp, 8
mov edx, eax
add edx, GDT_SIZE
mov [rax + TSS_SEGMENT + 2], dl
mov [rax + TSS_SEGMENT + 3], dh
DB 0c1h, 0eah, 10h ; shr edx, 16
mov [rax + TSS_SEGMENT + 4], dl
mov [rax + TSS_SEGMENT + 7], dh
mov edx, eax
mov dl, 89h
mov [rax + TSS_SEGMENT + 5], dl ; clear busy flag
mov eax, TSS_SEGMENT