]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
4c9b3d354142903d463d27328d5f6bd62e8b30f3
[mirror_edk2.git] / MdePkg / Library / PeiServicesTablePointerLibIdt / PeiServicesTablePointer.c
1 /*++
2
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
10 Intel Corporation.
11
12
13 Module Name:
14
15 PeiServicesTablePointer.c
16
17 Abstract:
18
19 PEI Services Table Pointer Library.
20
21 --*/
22
23 #include "InternalPeiServicesTablePointer.h"
24
25 /**
26
27 The function returns the pointer to PeiServicee following
28 PI1.0.
29
30 For IA32, the four-bytes field immediately prior to new IDT
31 base addres is used to save the EFI_PEI_SERVICES**.
32 For x64, the eight-bytes field immediately prior to new IDT
33 base addres is used to save the EFI_PEI_SERVICES**.
34
35 @retval The pointer to PeiServices.
36
37 **/
38 EFI_PEI_SERVICES **
39 EFIAPI
40 GetPeiServicesTablePointer (
41 VOID
42 )
43 {
44 EFI_PEI_SERVICES **PeiServices;
45
46 PeiServices = (EFI_PEI_SERVICES **) AsmPeiSevicesTablePointer ();
47 ASSERT (PeiServices != NULL);
48 return PeiServices;
49 }
50