1 /** @file
2 *
3 *  Copyright (c) 2011-2012, ARM Limited. All rights reserved.
4 *
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 _PREPI_H_
16 #define _PREPI_H_
17 
18 #include <PiPei.h>
19 
20 #include <Library/PcdLib.h>
21 #include <Library/ArmLib.h>
22 #include <Library/BaseMemoryLib.h>
23 #include <Library/DebugLib.h>
24 #include <Library/IoLib.h>
25 #include <Library/MemoryAllocationLib.h>
26 #include <Library/HobLib.h>
27 #include <Library/SerialPortLib.h>
28 #include <Library/ArmPlatformLib.h>
29 
30 #define SerialPrint(txt)  SerialPortWrite (txt, AsciiStrLen(txt)+1);
31 
32 RETURN_STATUS
33 EFIAPI
34 TimerConstructor (
35   VOID
36   );
37 
38 VOID
39 PrePiMain (
40   IN  UINTN                     UefiMemoryBase,
41   IN  UINTN                     StacksBase,
42   IN  UINT64                    StartTimeStamp
43   );
44 
45 EFI_STATUS
46 EFIAPI
47 MemoryPeim (
48   IN EFI_PHYSICAL_ADDRESS       UefiMemoryBase,
49   IN UINT64                     UefiMemorySize
50   );
51 
52 EFI_STATUS
53 EFIAPI
54 PlatformPeim (
55   VOID
56   );
57 
58 // Either implemented by PrePiLib or by MemoryInitPei
59 VOID
60 BuildMemoryTypeInformationHob (
61   VOID
62   );
63 
64 EFI_STATUS
65 GetPlatformPpi (
66   IN  EFI_GUID  *PpiGuid,
67   OUT VOID      **Ppi
68   );
69 
70 // Initialize the Architecture specific controllers
71 VOID
72 ArchInitialize (
73   VOID
74   );
75 
76 #endif /* _PREPI_H_ */
77