]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h
c925288608d739c9ed9f3fa195547041a070f987
[mirror_edk2.git] / MdeModulePkg / Universal / FirmwareVolume / GuidedSectionExtraction / Crc32SectionExtract / Dxe / Crc32SectionExtract.h
1 /*++
2
3 Copyright (c) 2006 - 2007, 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 Crc32SectionExtract.h
15
16 Abstract:
17
18 Header file for Crc32SectionExtract.c
19 Please refer to the Framewokr Firmware Volume Specification 0.9.
20
21 --*/
22
23 #ifndef _CRC32_GUIDED_SECTION_EXTRACTION_H
24 #define _CRC32_GUIDED_SECTION_EXTRACTION_H
25
26 //
27 // The package level header files this module uses
28 //
29 #include <PiDxe.h>
30 //
31 // The protocols, PPI and GUID defintions for this module
32 //
33 #include <Protocol/SecurityPolicy.h>
34 #include <Protocol/GuidedSectionExtaction.h>
35 #include <Protocol/Crc32GuidedSectionExtraction.h>
36 //
37 // The Library classes this module consumes
38 //
39 #include <Library/MemoryAllocationLib.h>
40 #include <Library/DebugLib.h>
41 #include <Library/UefiDriverEntryPoint.h>
42 #include <Library/BaseMemoryLib.h>
43 #include <Library/UefiBootServicesTableLib.h>
44
45 typedef struct {
46 EFI_GUID_DEFINED_SECTION GuidedSectionHeader;
47 UINT32 CRC32Checksum;
48 } CRC32_SECTION_HEADER;
49
50 //
51 // Function prototype declarations
52 //
53 STATIC
54 EFI_STATUS
55 EFIAPI
56 Crc32ExtractSection (
57 IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
58 IN VOID *InputSection,
59 OUT VOID **OutputBuffer,
60 OUT UINTN *OutputSize,
61 OUT UINT32 *AuthenticationStatus
62 )
63 /*++
64
65 Routine Description:
66
67 TODO: Add function description
68
69 Arguments:
70
71 This - TODO: add argument description
72 InputSection - TODO: add argument description
73 OutputBuffer - TODO: add argument description
74 OutputSize - TODO: add argument description
75 AuthenticationStatus - TODO: add argument description
76
77 Returns:
78
79 TODO: add return values
80
81 --*/
82 ;
83
84 EFI_STATUS
85 EFIAPI
86 InitializeCrc32GuidedSectionExtractionProtocol (
87 IN EFI_HANDLE ImageHandle,
88 IN EFI_SYSTEM_TABLE *SystemTable
89 )
90 /*++
91
92 Routine Description:
93
94 Entry point of the CRC32 GUIDed section extraction protocol.
95 Creates and initializes an instance of the GUIDed section
96 extraction protocol with CRC32 GUID.
97
98 Arguments:
99
100 ImageHandle EFI_HANDLE: A handle for the image that is initializing
101 this driver
102 SystemTable EFI_SYSTEM_TABLE: A pointer to the EFI system table
103
104 Returns:
105
106 EFI_SUCCESS: Driver initialized successfully
107 EFI_LOAD_ERROR: Failed to Initialize or has been loaded
108 EFI_OUT_OF_RESOURCES: Could not allocate needed resources
109
110 --*/
111 ;
112
113 #endif