diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-07-15 03:29:12 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-07-15 03:29:12 +0000 |
commit | f9d30595ae2f17d7a8e281b9ef1eb05047155d23 (patch) | |
tree | 88f41d2d52a518dc19575b17f8723ec41cee3917 /UefiCpuPkg/CpuMpPei/CpuMpPei.h | |
parent | 65e79f931f9c1ca72e853ce788e0bcaf0e205c9c (diff) | |
download | edk2-platforms-f9d30595ae2f17d7a8e281b9ef1eb05047155d23.tar.xz |
UefiCpuPkg/CpuMpPei: Load GDT table on BSP
Load new GDT table and update segment accordingly.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17988 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuMpPei/CpuMpPei.h')
-rw-r--r-- | UefiCpuPkg/CpuMpPei/CpuMpPei.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h b/UefiCpuPkg/CpuMpPei/CpuMpPei.h index 00e95cf899..611a296dce 100644 --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h @@ -21,6 +21,36 @@ #include <Library/BaseLib.h> #include <Library/PeimEntryPoint.h> +#pragma pack(1) +typedef union { + struct { + UINT32 LimitLow : 16; + UINT32 BaseLow : 16; + UINT32 BaseMid : 8; + UINT32 Type : 4; + UINT32 System : 1; + UINT32 Dpl : 2; + UINT32 Present : 1; + UINT32 LimitHigh : 4; + UINT32 Software : 1; + UINT32 Reserved : 1; + UINT32 DefaultSize : 1; + UINT32 Granularity : 1; + UINT32 BaseHigh : 8; + } Bits; + UINT64 Uint64; +} IA32_GDT; +#pragma pack() +/** + Assembly code to load GDT table and update segment accordingly. + + @param Gdtr Pointer to GDT descriptor +**/ +VOID +EFIAPI +AsmInitializeGdt ( + IN IA32_DESCRIPTOR *Gdtr + ); #endif |