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