]>
Commit | Line | Data |
---|---|---|
0530bfe3 | 1 | /** @file\r |
2 | PEI Services Table Pointer Library.\r | |
3 | \r | |
4 | This library is used for PEIM which does executed from flash device directly but\r | |
5 | executed in memory.\r | |
6 | \r | |
7 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
8 | Copyright (c) 2011 Hewlett-Packard Corporation. All rights reserved.<BR>\r | |
9 | This program and the accompanying materials\r | |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php.\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #include <PiPei.h>\r | |
20 | #include <Library/PeiServicesTablePointerLib.h>\r | |
21 | #include <Library/ArmLib.h>\r | |
22 | #include <Library/DebugLib.h>\r | |
23 | \r | |
24 | /**\r | |
25 | Caches a pointer PEI Services Table. \r | |
26 | \r | |
27 | Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer \r | |
28 | in a platform specific manner.\r | |
29 | \r | |
30 | If PeiServicesTablePointer is NULL, then ASSERT().\r | |
31 | \r | |
32 | @param PeiServicesTablePointer The address of PeiServices pointer.\r | |
33 | **/\r | |
34 | VOID\r | |
35 | EFIAPI\r | |
36 | SetPeiServicesTablePointer (\r | |
37 | IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer\r | |
38 | )\r | |
39 | {\r | |
40 | ArmWriteTpidrurw((UINTN)PeiServicesTablePointer);\r | |
41 | }\r | |
42 | \r | |
43 | /**\r | |
44 | Retrieves the cached value of the PEI Services Table pointer.\r | |
45 | \r | |
46 | Returns the cached value of the PEI Services Table pointer in a CPU specific manner \r | |
47 | as specified in the CPU binding section of the Platform Initialization Pre-EFI \r | |
48 | Initialization Core Interface Specification.\r | |
49 | \r | |
50 | If the cached PEI Services Table pointer is NULL, then ASSERT().\r | |
51 | \r | |
52 | @return The pointer to PeiServices.\r | |
53 | \r | |
54 | **/\r | |
55 | CONST EFI_PEI_SERVICES **\r | |
56 | EFIAPI\r | |
57 | GetPeiServicesTablePointer (\r | |
58 | VOID\r | |
59 | )\r | |
60 | {\r | |
61 | return (CONST EFI_PEI_SERVICES **)ArmReadTpidrurw();\r | |
62 | }\r |