105 OUT VOID **OutputBuffer,
107 OUT UINT32 *AuthenticationStatus
210 OUT VOID **OutputBuffer,
212 OUT UINT32 *AuthenticationStatus
217 VOID *AllocatedOutputBuffer;
218 UINT32 OutputBufferSize;
219 UINT32 ScratchBufferSize;
220 UINT16 SectionAttribute;
225 ScratchBuffer =
NULL;
226 AllocatedOutputBuffer =
NULL;
238 if (EFI_ERROR (Status)) {
239 DEBUG ((DEBUG_ERROR,
"GetInfo from guided section Failed - %r\n", Status));
243 if (ScratchBufferSize > 0) {
248 if (ScratchBuffer ==
NULL) {
249 return EFI_OUT_OF_RESOURCES;
253 if (OutputBufferSize > 0) {
257 AllocatedOutputBuffer =
AllocatePool (OutputBufferSize);
258 if (AllocatedOutputBuffer ==
NULL) {
260 return EFI_OUT_OF_RESOURCES;
263 *OutputBuffer = AllocatedOutputBuffer;
269 Status = ExtractGuidedSectionDecode (
275 if (EFI_ERROR (Status)) {
279 if (AllocatedOutputBuffer !=
NULL) {
283 if (ScratchBuffer !=
NULL) {
287 DEBUG ((DEBUG_ERROR,
"Extract guided section Failed - %r\n", Status));
291 if (*OutputBuffer != AllocatedOutputBuffer) {
296 CopyMem (AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
297 *OutputBuffer = AllocatedOutputBuffer;
303 *OutputSize = (
UINTN)OutputBufferSize;
308 if (ScratchBuffer !=
NULL) {
337 UINTN ExtractHandlerNumber;
342 ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable);
347 while (ExtractHandlerNumber-- > 0) {
348 Status =
gBS->InstallMultipleProtocolInterfaces (
349 &mSectionExtractionHandle,
350 &ExtractHandlerGuidTable[ExtractHandlerNumber],
351 &mCustomGuidedSectionExtractionProtocol,
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)