]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/Common/CommonLib.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Common / CommonLib.h
1 /*++
2
3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 CommonLib.h
15
16 Abstract:
17
18 Common library assistance routines.
19
20 --*/
21
22 #ifndef _EFI_COMMON_LIB_H
23 #define _EFI_COMMON_LIB_H
24
25 #include "TianoCommon.h"
26
27 #define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
28 //
29 // Function declarations
30 //
31 VOID
32 PeiZeroMem (
33 IN VOID *Buffer,
34 IN UINTN Size
35 )
36 ;
37
38 VOID
39 PeiCopyMem (
40 IN VOID *Destination,
41 IN VOID *Source,
42 IN UINTN Length
43 )
44 ;
45
46 VOID
47 ZeroMem (
48 IN VOID *Buffer,
49 IN UINTN Size
50 )
51 ;
52
53 VOID
54 CopyMem (
55 IN VOID *Destination,
56 IN VOID *Source,
57 IN UINTN Length
58 )
59 ;
60
61 INTN
62 CompareGuid (
63 IN EFI_GUID *Guid1,
64 IN EFI_GUID *Guid2
65 )
66 ;
67
68 EFI_STATUS
69 GetFileImage (
70 IN CHAR8 *InputFileName,
71 OUT CHAR8 **InputFileImage,
72 OUT UINT32 *BytesRead
73 )
74 ;
75
76 UINT8
77 CalculateChecksum8 (
78 IN UINT8 *Buffer,
79 IN UINTN Size
80 )
81 ;
82
83 UINT8
84 CalculateSum8 (
85 IN UINT8 *Buffer,
86 IN UINTN Size
87 )
88 ;
89
90 UINT16
91 CalculateChecksum16 (
92 IN UINT16 *Buffer,
93 IN UINTN Size
94 )
95 ;
96
97 UINT16
98 CalculateSum16 (
99 IN UINT16 *Buffer,
100 IN UINTN Size
101 )
102 ;
103
104 EFI_STATUS
105 PrintGuid (
106 IN EFI_GUID *Guid
107 )
108 ;
109
110 #define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
111 EFI_STATUS
112 PrintGuidToBuffer (
113 IN EFI_GUID *Guid,
114 IN OUT UINT8 *Buffer,
115 IN UINT32 BufferLen,
116 IN BOOLEAN Uppercase
117 )
118 ;
119
120 #endif