]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeiServicesTablePointerLibKr1/PeiServicesTablePointer.c
3 Copyright (c) 2006 Intel Corporation. All rights reserved
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
15 PeiServicesTablePointer.c
19 PEI Services Table Pointer Library.
25 Reads the current value of Kr1.
27 @return The current value of Kr1.
37 Writes the current value of Kr1.
39 @param Value The 64-bit value to write to Kr1.
49 The function returns the pointer to PeiServices.
51 The function returns the pointer to PeiServices.
52 It will ASSERT() if the pointer to PeiServices is NULL.
54 @retval The pointer to PeiServices.
59 GetPeiServicesTablePointer (
63 EFI_PEI_SERVICES
**PeiServices
;
65 PeiServices
= (EFI_PEI_SERVICES
**)(UINTN
)AsmReadKr1 ();
66 ASSERT (PeiServices
!= NULL
);
71 The constructor function caches the pointer to PEI services.
73 The constructor function caches the pointer to PEI services.
74 It will always return EFI_SUCCESS.
76 @param FfsHeader Pointer to FFS header the loaded driver.
77 @param PeiServices Pointer to the PEI services.
79 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
84 PeiServicesTablePointerLibConstructor (
85 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
86 IN EFI_PEI_SERVICES
**PeiServices
89 AsmWriteKr1 ((UINT64
)(UINTN
)PeiServices
);