]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/PeiServicesTablePointerLib.h
1. Add new API MigratePeiServicesTablePointer() in PeiServicesTablePointerLib class.
[mirror_edk2.git] / MdePkg / Include / Library / PeiServicesTablePointerLib.h
CommitLineData
fb3df220 1/** @file\r
50a64e5b 2 Provides a service to retrieve a pointer to the PEI Services Table.\r
fb3df220 3\r
ffdb421c 4Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
9df063a0 5This program and the accompanying materials\r
50a64e5b 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
fb3df220 9\r
50a64e5b 10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
fb3df220 12\r
fb3df220 13**/\r
14\r
15#ifndef __PEI_SERVICES_TABLE_POINTER_LIB_H__\r
16#define __PEI_SERVICES_TABLE_POINTER_LIB_H__\r
17\r
18/**\r
4b8157f9 19 Retrieves the cached value of the PEI Services Table pointer.\r
fb3df220 20\r
4b8157f9 21 Returns the cached value of the PEI Services Table pointer in a CPU specific manner \r
22 as specified in the CPU binding section of the Platform Initialization Pre-EFI \r
23 Initialization Core Interface Specification.\r
24 \r
25 If the cached PEI Services Table pointer is NULL, then ASSERT().\r
fb3df220 26\r
4ef55dfc 27 @return The pointer to PeiServices.\r
fb3df220 28\r
29**/\r
5240b97c 30CONST EFI_PEI_SERVICES **\r
fb3df220 31EFIAPI\r
32GetPeiServicesTablePointer (\r
33 VOID\r
34 );\r
35\r
81c7803c 36/**\r
4b8157f9 37 Caches a pointer PEI Services Table. \r
38 \r
39 Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer \r
40 in a CPU specific manner as specified in the CPU binding section of the Platform Initialization \r
41 Pre-EFI Initialization Core Interface Specification. \r
42 \r
43 If PeiServicesTablePointer is NULL, then ASSERT().\r
81c7803c 44 \r
01aef47b 45 @param PeiServicesTablePointer The address of PeiServices pointer.\r
81c7803c 46**/\r
b0d803fe 47VOID\r
48EFIAPI\r
49SetPeiServicesTablePointer (\r
a86fda43 50 IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer\r
b0d803fe 51 );\r
52\r
ffdb421c
LG
53/**\r
54 Perform CPU specific actions required to migrate the PEI Services Table \r
55 pointer from temporary RAM to permanent RAM.\r
56\r
57 For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes \r
58 immediately preceding the Interrupt Descriptor Table (IDT) in memory.\r
59 For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes \r
60 immediately preceding the Interrupt Descriptor Table (IDT) in memory.\r
61 For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in\r
62 a dedicated CPU register. This means that there is no memory storage \r
63 associated with storing the PEI Services Table pointer, so no additional \r
64 migration actions are required for Itanium or ARM CPUs.\r
65\r
66**/\r
67VOID\r
68EFIAPI\r
69MigratePeiServicesTablePointer (\r
70 );\r
71\r
fb3df220 72#endif\r
73\r