]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/BaseLib: Add stack switch related definitions for IA32
authorJian J Wang <jian.j.wang@intel.com>
Thu, 7 Dec 2017 12:14:35 +0000 (20:14 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 8 Dec 2017 06:38:48 +0000 (14:38 +0800)
commit364a54742f569b7221f0022594ef3d8384a8517c
tree58b6696056d1673888c563a55cc5ed1a4b188917
parent408b8330499825e7bce0c78aa63a45709ea015e1
MdePkg/BaseLib: Add stack switch related definitions for IA32

The new definitions include two structures

  IA32_TASK_STATE_SEGMENT
  IA32_TSS_DESCRIPTOR

two macros

  IA32_GDT_TYPE_TSS
  IA32_GDT_ALIGNMENT

and one API

  VOID
  EFIAPI
  AsmWriteTr (
    IN UINT16 Selector
    );

They're needed to setup task gate and interrupt stack table for stack switch.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com>
Reviewed-by: Jiewen.yao@intel.com
MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseLib/BaseLib.inf
MdePkg/Library/BaseLib/Ia32/WriteTr.nasm [new file with mode: 0644]
MdePkg/Library/BaseLib/X64/WriteTr.nasm [new file with mode: 0644]