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