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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user