2 PEI Services Table Pointer Library implementation for IPF that uses Kernel
3 Register 7 to store the pointer.
5 Copyright (c) 2006 - 2008, Intel Corporation.<BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/BaseLib.h>
18 #include <Library/DebugLib.h>
21 The function returns the pointer to PeiServices.
23 The function returns the pointer to PeiServices.
24 It will ASSERT() if the pointer to PeiServices is NULL.
26 @return The pointer to PeiServices.
29 CONST EFI_PEI_SERVICES
**
31 GetPeiServicesTablePointer (
35 CONST EFI_PEI_SERVICES
**PeiServices
;
37 PeiServices
= (CONST EFI_PEI_SERVICES
**)(UINTN
)AsmReadKr7 ();
38 ASSERT (PeiServices
!= NULL
);
43 The function set the pointer of PEI services in KR7 register
44 according to PI specification.
46 @param PeiServicesTablePointer The address of PeiServices pointer.
50 SetPeiServicesTablePointer (
51 IN CONST EFI_PEI_SERVICES
** PeiServicesTablePointer
54 AsmWriteKr7 ((UINT64
)(UINTN
)PeiServicesTablePointer
);