]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/Common/CommonLib.h
clean up the un-suitable ';' location when declaring the functions. The regular is...
[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 VOID
38 PeiCopyMem (
39 IN VOID *Destination,
40 IN VOID *Source,
41 IN UINTN Length
42 );
43
44 VOID
45 ZeroMem (
46 IN VOID *Buffer,
47 IN UINTN Size
48 );
49
50 VOID
51 CopyMem (
52 IN VOID *Destination,
53 IN VOID *Source,
54 IN UINTN Length
55 );
56
57 INTN
58 CompareGuid (
59 IN EFI_GUID *Guid1,
60 IN EFI_GUID *Guid2
61 );
62
63 EFI_STATUS
64 GetFileImage (
65 IN CHAR8 *InputFileName,
66 OUT CHAR8 **InputFileImage,
67 OUT UINT32 *BytesRead
68 );
69
70 UINT8
71 CalculateChecksum8 (
72 IN UINT8 *Buffer,
73 IN UINTN Size
74 );
75
76 UINT8
77 CalculateSum8 (
78 IN UINT8 *Buffer,
79 IN UINTN Size
80 );
81
82 UINT16
83 CalculateChecksum16 (
84 IN UINT16 *Buffer,
85 IN UINTN Size
86 );
87
88 UINT16
89 CalculateSum16 (
90 IN UINT16 *Buffer,
91 IN UINTN Size
92 );
93
94 EFI_STATUS
95 PrintGuid (
96 IN EFI_GUID *Guid
97 );
98
99 #define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
100 EFI_STATUS
101 PrintGuidToBuffer (
102 IN EFI_GUID *Guid,
103 IN OUT UINT8 *Buffer,
104 IN UINT32 BufferLen,
105 IN BOOLEAN Uppercase
106 );
107
108 #endif