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