]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/CpuMpPei/CpuMpPei.h
UefiCpuPkg/CpuMpPei: Initialize FPU per UEFI specification
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / CpuMpPei.h
CommitLineData
65e79f93
JF
1/** @file
2 Definitions to install Multiple Processor PPI.
3
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#ifndef _CPU_MP_PEI_H_
16#define _CPU_MP_PEI_H_
17
18#include <PiPei.h>
19
20
21#include <Library/BaseLib.h>
05e107f8 22#include <Library/HobLib.h>
65e79f93 23#include <Library/PeimEntryPoint.h>
46ba0f63 24#include <Library/UefiCpuLib.h>
65e79f93 25
f9d30595 26#pragma pack(1)
a56f6f45 27
f9d30595
JF
28typedef union {
29 struct {
30 UINT32 LimitLow : 16;
31 UINT32 BaseLow : 16;
32 UINT32 BaseMid : 8;
33 UINT32 Type : 4;
34 UINT32 System : 1;
35 UINT32 Dpl : 2;
36 UINT32 Present : 1;
37 UINT32 LimitHigh : 4;
38 UINT32 Software : 1;
39 UINT32 Reserved : 1;
40 UINT32 DefaultSize : 1;
41 UINT32 Granularity : 1;
42 UINT32 BaseHigh : 8;
43 } Bits;
44 UINT64 Uint64;
45} IA32_GDT;
a56f6f45
JF
46
47//
48// MP CPU exchange information for AP reset code
49//
50typedef struct {
51 UINTN Lock;
52 UINTN StackStart;
53 UINTN StackSize;
54 UINTN CFunction;
55 IA32_DESCRIPTOR GdtrProfile;
56 IA32_DESCRIPTOR IdtrProfile;
57 UINTN BufferStart;
58 UINTN PmodeOffset;
59 UINTN NumApsExecuting;
60 UINTN LmodeOffset;
61 UINTN Cr3;
62} MP_CPU_EXCHANGE_INFO;
63
f9d30595
JF
64#pragma pack()
65/**
66 Assembly code to load GDT table and update segment accordingly.
67
68 @param Gdtr Pointer to GDT descriptor
69**/
70VOID
71EFIAPI
72AsmInitializeGdt (
73 IN IA32_DESCRIPTOR *Gdtr
74 );
65e79f93
JF
75
76
77#endif