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