17#define EXTRACT_HANDLER_TABLE_SIZE 0x10
19UINT32 mNumberOfExtractHandler = 0;
20UINT32 mMaxNumberOfExtractHandler = 0;
22GUID *mExtractHandlerGuidTable =
NULL;
42 mMaxNumberOfExtractHandler *
sizeof (
GUID),
43 (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) *
sizeof (
GUID),
44 mExtractHandlerGuidTable
47 if (mExtractHandlerGuidTable ==
NULL) {
57 mExtractDecodeHandlerTable
60 if (mExtractDecodeHandlerTable ==
NULL) {
70 mExtractGetInfoHandlerTable
73 if (mExtractGetInfoHandlerTable ==
NULL) {
80 mMaxNumberOfExtractHandler = mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE;
84 if (mExtractHandlerGuidTable !=
NULL) {
88 if (mExtractDecodeHandlerTable !=
NULL) {
89 FreePool (mExtractDecodeHandlerTable);
92 if (mExtractGetInfoHandlerTable !=
NULL) {
93 FreePool (mExtractGetInfoHandlerTable);
135 OUT GUID **ExtractHandlerGuidTable
138 ASSERT (ExtractHandlerGuidTable !=
NULL);
140 *ExtractHandlerGuidTable = mExtractHandlerGuidTable;
141 return mNumberOfExtractHandler;
182 ASSERT (SectionGuid !=
NULL);
183 ASSERT (GetInfoHandler !=
NULL);
184 ASSERT (DecodeHandler !=
NULL);
189 for (Index = 0; Index < mNumberOfExtractHandler; Index++) {
190 if (
CompareGuid (&mExtractHandlerGuidTable[Index], SectionGuid)) {
194 mExtractDecodeHandlerTable[Index] = DecodeHandler;
195 mExtractGetInfoHandlerTable[Index] = GetInfoHandler;
203 if (mNumberOfExtractHandler >= mMaxNumberOfExtractHandler) {
212 CopyGuid (&mExtractHandlerGuidTable[mNumberOfExtractHandler], SectionGuid);
213 mExtractDecodeHandlerTable[mNumberOfExtractHandler] = DecodeHandler;
214 mExtractGetInfoHandlerTable[mNumberOfExtractHandler++] = GetInfoHandler;
221 if (GuidData !=
NULL) {
222 gBS->InstallConfigurationTable ((
EFI_GUID *)SectionGuid, GuidData);
266 OUT UINT32 *OutputBufferSize,
267 OUT UINT32 *ScratchBufferSize,
268 OUT UINT16 *SectionAttribute
274 ASSERT (InputSection !=
NULL);
275 ASSERT (OutputBufferSize !=
NULL);
276 ASSERT (ScratchBufferSize !=
NULL);
277 ASSERT (SectionAttribute !=
NULL);
279 if (IS_SECTION2 (InputSection)) {
288 for (Index = 0; Index < mNumberOfExtractHandler; Index++) {
289 if (
CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {
293 return mExtractGetInfoHandlerTable[Index](
347 OUT VOID **OutputBuffer,
348 IN VOID *ScratchBuffer OPTIONAL,
349 OUT UINT32 *AuthenticationStatus
358 ASSERT (InputSection !=
NULL);
359 ASSERT (OutputBuffer !=
NULL);
360 ASSERT (AuthenticationStatus !=
NULL);
362 if (IS_SECTION2 (InputSection)) {
371 for (Index = 0; Index < mNumberOfExtractHandler; Index++) {
372 if (
CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {
376 return mExtractDecodeHandlerTable[Index](
431 ASSERT (SectionGuid !=
NULL);
436 for (Index = 0; Index < mNumberOfExtractHandler; Index++) {
437 if (
CompareGuid (&mExtractHandlerGuidTable[Index], SectionGuid)) {
441 if (GetInfoHandler !=
NULL) {
442 *GetInfoHandler = mExtractGetInfoHandlerTable[Index];
445 if (DecodeHandler !=
NULL) {
446 *DecodeHandler = mExtractDecodeHandlerTable[Index];
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
VOID *EFIAPI ReallocatePool(IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
#define RETURN_UNSUPPORTED
#define RETURN_OUT_OF_RESOURCES