]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/PeiServicePointer.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / Ipf / PeiServicePointer.c
1 /*++
2
3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 PeiServicePointer.c
16
17 Abstract:
18
19 --*/
20
21 #include "Tiano.h"
22 #include "PeiApi.h"
23 #include "PeiLib.h"
24
25
26 #if (PI_SPECIFICATION_VERSION >= 0x00010000)
27
28 VOID
29 SetPeiServicesTablePointer (
30 IN EFI_PEI_SERVICES **PeiServices
31 )
32 /*++
33
34 Routine Description:
35
36 Save PeiService pointer so that it can be retrieved anywhere.
37
38 Arguments:
39
40 PeiServices - The direct pointer to PeiServiceTable.
41 PhyscialAddress - The physcial address of variable PeiServices.
42
43 Returns:
44 NONE
45
46 --*/
47
48 {
49 //
50 // For Itanium Processor Family processors, the EFI_PEI_SERVICES**
51 // is stored in kernel register7.
52 //
53 AsmWriteKr7((UINT64)(UINTN)PeiServices);
54 }
55
56
57 EFI_PEI_SERVICES **
58 GetPeiServicesTablePointer (
59 VOID
60 )
61 /*++
62
63 Routine Description:
64
65 Get PeiService pointer.
66
67 Arguments:
68
69 NONE.
70
71 Returns:
72 The direct pointer to PeiServiceTable.
73
74 --*/
75
76 {
77 //
78 // For Itanium Processor Family processors, the EFI_PEI_SERVICES**
79 // is stored in kernel register7.
80 //
81 return (EFI_PEI_SERVICES **)(UINTN)AsmReadKr7();
82 }
83
84 VOID
85 MigrateIdtTable (
86 IN EFI_PEI_SERVICES **PeiServices
87 )
88 /*++
89
90 Routine Description:
91
92 Migrate IDT from temporary memory to real memory where preceded with 4 bytes for
93 storing PeiService pointer.
94
95 Arguments:
96
97 PeiServices - The direct pointer to PeiServiceTable.
98
99 Returns:
100
101 NONE.
102
103 --*/
104 {
105 return;
106 }
107
108 #endif