mirror of https://github.com/acidanthera/audk.git
1. Perfect libraries MSA files
2. Use MemoryAllocationLib to replace gBS memory services in EdkEt32Pkg. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2517 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
db29f969a9
commit
fa332de749
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -201,7 +201,7 @@ Returns:
|
|||
//
|
||||
PackageList = PreparePackages (1, &gEfiMiscSubClassGuid, MiscSubclassStrings);
|
||||
EfiStatus = Hii->NewPack (Hii, PackageList, &HiiHandle);
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
|
||||
if (EFI_ERROR (EfiStatus)) {
|
||||
DEBUG ((EFI_D_ERROR, "Could not log default strings to Hii. %r\n", EfiStatus));
|
||||
|
|
|
@ -445,7 +445,7 @@ Returns:
|
|||
TmpStr = GetStringById (STRING_TOKEN (STR_BOOT_SUCCEEDED));
|
||||
if (TmpStr != NULL) {
|
||||
BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r", NULL);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -487,7 +487,7 @@ Returns:
|
|||
TmpStr = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
|
||||
if (TmpStr != NULL) {
|
||||
BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r", NULL);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -634,7 +634,7 @@ BdsCreateOneLegacyBootOption (
|
|||
);
|
||||
BbsItem->BootPriority = 0x00;
|
||||
|
||||
gBS->FreePool (DevPath);
|
||||
FreePool (DevPath);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -518,7 +518,7 @@ Returns:
|
|||
*String
|
||||
);
|
||||
|
||||
gBS->FreePool (HiiHandleBuffer);
|
||||
FreePool (HiiHandleBuffer);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -849,13 +849,13 @@ Returns:
|
|||
//
|
||||
PackageList = PreparePackages (1, &gBdsStringPackGuid, bmBin);
|
||||
Status = Hii->NewPack (Hii, PackageList, &HiiHandle);
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
|
||||
BmmCallbackInfo->BmmHiiHandle = HiiHandle;
|
||||
|
||||
PackageList = PreparePackages (1, &gBdsStringPackGuid, FEBin);
|
||||
Status = Hii->NewPack (Hii, PackageList, &HiiHandle);
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
|
||||
BmmCallbackInfo->FeHiiHandle = HiiHandle;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*++
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -1679,7 +1679,7 @@ Returns:
|
|||
--*/
|
||||
{
|
||||
if (Buffer != NULL) {
|
||||
gBS->FreePool (Buffer);
|
||||
FreePool (Buffer);
|
||||
Buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -179,7 +179,8 @@ BootThisFile (
|
|||
CHAR16 *ExitData;
|
||||
BDS_COMMON_OPTION *Option;
|
||||
|
||||
Status = gBS->AllocatePool (EfiBootServicesData, sizeof (BDS_COMMON_OPTION), &Option);
|
||||
Option = AllocatePool (sizeof (BDS_COMMON_OPTION));
|
||||
|
||||
Option->Description = FileContext->FileName;
|
||||
Option->DevicePath = FileContext->DevicePath;
|
||||
Option->LoadOptionsSize = 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -170,7 +170,7 @@ Returns:
|
|||
//
|
||||
PackageList = PreparePackages (2, &BmGuid, BootManagerVfrBin, BdsStrings);
|
||||
Status = Hii->NewPack (Hii, PackageList, &gBootManagerHandle);
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
|
||||
//
|
||||
// This example does not implement worker functions
|
||||
|
@ -296,7 +296,7 @@ Returns:
|
|||
|
||||
Hii->UpdateForm (Hii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData);
|
||||
|
||||
gBS->FreePool (UpdateData);
|
||||
FreePool (UpdateData);
|
||||
|
||||
ASSERT (gBrowser);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -120,7 +120,7 @@ Returns:
|
|||
|
||||
PackageList = PreparePackages (1, &gBdsStringPackGuid, DeviceManagerVfrBin);
|
||||
Status = Hii->NewPack (Hii, PackageList, &FPCallbackInfo.DevMgrHiiHandle);
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
|
||||
//
|
||||
// This example does not implement worker functions for the NV accessor functions. Only a callback evaluator
|
||||
|
@ -157,7 +157,7 @@ Returns:
|
|||
//
|
||||
Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) 0x0000, TRUE, UpdateData);
|
||||
|
||||
gBS->FreePool (UpdateData);
|
||||
FreePool (UpdateData);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (String);
|
||||
FreePool (String);
|
||||
|
||||
CreateGotoOpCode (
|
||||
0x1000, // Device Manager Page
|
||||
|
@ -391,7 +391,7 @@ Returns:
|
|||
//
|
||||
// Reset Buffer pointer to original location
|
||||
//
|
||||
gBS->FreePool (Buffer);
|
||||
FreePool (Buffer);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -406,12 +406,12 @@ Returns:
|
|||
FPCallbackInfo.Data.VideoBIOS = 0;
|
||||
} else {
|
||||
FPCallbackInfo.Data.VideoBIOS = VideoOption[0];
|
||||
gBS->FreePool (VideoOption);
|
||||
FreePool (VideoOption);
|
||||
}
|
||||
|
||||
ASSERT (FPCallbackInfo.Data.VideoBIOS <= 1);
|
||||
|
||||
Status = gBS->AllocatePool (EfiBootServicesData, 2 * sizeof (IFR_OPTION), &IfrOptionList);
|
||||
IfrOptionList = AllocatePool (2 * sizeof (IFR_OPTION));
|
||||
if (IfrOptionList != NULL) {
|
||||
IfrOptionList[0].Flags = EFI_IFR_FLAG_INTERACTIVE;
|
||||
IfrOptionList[0].Key = SET_VIDEO_BIOS_TYPE_QUESTION_ID + 0x2000;
|
||||
|
@ -437,7 +437,7 @@ Returns:
|
|||
|
||||
UpdateData->DataCount = 4;
|
||||
Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) EFI_VBIOS_CLASS, TRUE, UpdateData);
|
||||
gBS->FreePool (IfrOptionList);
|
||||
FreePool (IfrOptionList);
|
||||
}
|
||||
|
||||
BootDeviceMngrMenuResetRequired = FALSE;
|
||||
|
@ -490,8 +490,8 @@ Returns:
|
|||
gCallbackKey = 4;
|
||||
}
|
||||
|
||||
gBS->FreePool (UpdateData);
|
||||
gBS->FreePool (HiiHandles);
|
||||
FreePool (UpdateData);
|
||||
FreePool (HiiHandles);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -136,7 +136,7 @@ Returns:
|
|||
Lang
|
||||
);
|
||||
|
||||
gBS->FreePool (LanguageString);
|
||||
FreePool (LanguageString);
|
||||
gCallbackKey = 2;
|
||||
break;
|
||||
|
||||
|
@ -179,7 +179,7 @@ Returns:
|
|||
(UINTN) (((EFI_IFR_DATA_ENTRY *) (DataArray+1))->Data),
|
||||
0
|
||||
);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -254,7 +254,7 @@ Returns:
|
|||
|
||||
Status = Hii->NewPack (Hii, PackageList, &gFrontPageHandle);
|
||||
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
|
||||
//
|
||||
// There will be only one FormConfig in the system
|
||||
|
@ -364,11 +364,11 @@ ReInitStrings:
|
|||
OptionCount++;
|
||||
}
|
||||
|
||||
gBS->FreePool (LanguageString);
|
||||
FreePool (LanguageString);
|
||||
|
||||
if (ReInitializeStrings) {
|
||||
gBS->FreePool (StringBuffer);
|
||||
gBS->FreePool (OptionList);
|
||||
FreePool (StringBuffer);
|
||||
FreePool (OptionList);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -389,11 +389,11 @@ ReInitStrings:
|
|||
|
||||
Hii->UpdateForm (Hii, gFrontPageHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData);
|
||||
|
||||
gBS->FreePool (UpdateData);
|
||||
FreePool (UpdateData);
|
||||
//
|
||||
// gBS->FreePool (OptionList);
|
||||
// FreePool (OptionList);
|
||||
//
|
||||
gBS->FreePool (StringBuffer);
|
||||
FreePool (StringBuffer);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -529,11 +529,11 @@ Returns:
|
|||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (*String);
|
||||
FreePool (*String);
|
||||
*String = GetStringById (STRING_TOKEN (STR_MISSING_STRING));
|
||||
}
|
||||
|
||||
gBS->FreePool (HiiHandleBuffer);
|
||||
FreePool (HiiHandleBuffer);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -689,7 +689,7 @@ Returns:
|
|||
GetStringFromToken (&Record->ProducerName, BiosVendor->BiosVersion, &NewString);
|
||||
TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_BIOS_VERSION;
|
||||
Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString);
|
||||
gBS->FreePool (NewString);
|
||||
FreePool (NewString);
|
||||
Find[0] = TRUE;
|
||||
}
|
||||
|
||||
|
@ -700,7 +700,7 @@ Returns:
|
|||
GetStringFromToken (&Record->ProducerName, SystemManufacturer->SystemProductName, &NewString);
|
||||
TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_COMPUTER_MODEL;
|
||||
Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString);
|
||||
gBS->FreePool (NewString);
|
||||
FreePool (NewString);
|
||||
Find[1] = TRUE;
|
||||
}
|
||||
|
||||
|
@ -711,7 +711,7 @@ Returns:
|
|||
GetStringFromToken (&Record->ProducerName, *ProcessorVersion, &NewString);
|
||||
TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_CPU_MODEL;
|
||||
Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString);
|
||||
gBS->FreePool (NewString);
|
||||
FreePool (NewString);
|
||||
Find[2] = TRUE;
|
||||
}
|
||||
|
||||
|
@ -722,7 +722,7 @@ Returns:
|
|||
ConvertProcessorToString (ProcessorFrequency, &NewString);
|
||||
TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_CPU_SPEED;
|
||||
Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString);
|
||||
gBS->FreePool (NewString);
|
||||
FreePool (NewString);
|
||||
Find[3] = TRUE;
|
||||
}
|
||||
|
||||
|
@ -735,7 +735,7 @@ Returns:
|
|||
&NewString);
|
||||
TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_MEMORY_SIZE;
|
||||
Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString);
|
||||
gBS->FreePool (NewString);
|
||||
FreePool (NewString);
|
||||
Find[4] = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -326,7 +326,7 @@ Returns:
|
|||
HiiHandle = 0;
|
||||
Hii->NewPack (Hii, PackageList, &HiiHandle);
|
||||
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -421,11 +421,11 @@ Returns:
|
|||
}
|
||||
|
||||
if (LangCodes) {
|
||||
gBS->FreePool (LangCodes);
|
||||
FreePool (LangCodes);
|
||||
}
|
||||
|
||||
if (LanguageString != NULL) {
|
||||
gBS->FreePool (LanguageString);
|
||||
FreePool (LanguageString);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -274,7 +274,7 @@ Returns:
|
|||
&GenMemoryTest
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (Pos);
|
||||
FreePool (Pos);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,7 @@ Returns:
|
|||
// do the test, and then the status of EFI_NO_MEDIA will be returned by
|
||||
// "MemoryTestInit". So it does not need to test memory again, just return.
|
||||
//
|
||||
gBS->FreePool (Pos);
|
||||
FreePool (Pos);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ Returns:
|
|||
|
||||
if (TmpStr != NULL) {
|
||||
gST->ConOut->OutputString (gST->ConOut, TmpStr);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
|
||||
do {
|
||||
|
@ -317,7 +317,7 @@ Returns:
|
|||
PrintXY (10, 10, NULL, NULL, TmpStr);
|
||||
gST->ConOut->SetCursorPosition (gST->ConOut, 0, 4);
|
||||
gST->ConOut->OutputString (gST->ConOut, TmpStr);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
|
||||
ASSERT (0);
|
||||
|
@ -333,7 +333,7 @@ Returns:
|
|||
TmpStr = GetStringById (STRING_TOKEN (STR_MEMORY_TEST_PERCENT));
|
||||
if (TmpStr != NULL) {
|
||||
BdsLibOutputStrings (gST->ConOut, StrPercent, TmpStr, NULL);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
|
||||
TmpStr = GetStringById (STRING_TOKEN (STR_PERFORM_MEM_TEST));
|
||||
|
@ -346,7 +346,7 @@ Returns:
|
|||
TestPercent,
|
||||
(UINTN) PreviousValue
|
||||
);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ Returns:
|
|||
100,
|
||||
(UINTN) PreviousValue
|
||||
);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
|
||||
gST->ConOut->SetCursorPosition (gST->ConOut, 0, 0);
|
||||
|
@ -389,7 +389,7 @@ Done:
|
|||
TmpStr = GetStringById (STRING_TOKEN (STR_MEM_TEST_COMPLETED));
|
||||
if (TmpStr != NULL) {
|
||||
StrCat (StrTotalMemory, TmpStr);
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
}
|
||||
|
||||
gST->ConOut->ClearScreen (gST->ConOut);
|
||||
|
@ -405,7 +405,7 @@ Done:
|
|||
(UINTN) PreviousValue
|
||||
);
|
||||
|
||||
gBS->FreePool (Pos);
|
||||
FreePool (Pos);
|
||||
|
||||
DataSize = sizeof (Value);
|
||||
Status = gRT->GetVariable (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -60,7 +60,7 @@ Returns:
|
|||
if (!EFI_ERROR (Status)) {
|
||||
PackageList = PreparePackages (1, &gBdsStringPackGuid, BdsStrings);
|
||||
Status = Hii->NewPack (Hii, PackageList, &gStringPackHandle);
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -112,7 +112,7 @@ Returns:
|
|||
//
|
||||
// Free the old pool
|
||||
//
|
||||
gBS->FreePool (String);
|
||||
FreePool (String);
|
||||
|
||||
//
|
||||
// Allocate new pool with correct value
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -148,7 +148,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
|
|||
if (DiagnosticType != EfiDriverDiagnosticTypeStandard) {
|
||||
*ErrorType = &gEfiBlockIoProtocolGuid;
|
||||
*BufferSize = 0x60;
|
||||
gBS->AllocatePool (EfiBootServicesData, (UINTN) (*BufferSize), Buffer);
|
||||
Buffer = AllocatePool ((UINTN) (*BufferSize));
|
||||
CopyMem (*Buffer, L"Windows Block I/O Driver Diagnostics Failed\n", *BufferSize);
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
|
|
@ -346,7 +346,7 @@ Returns:
|
|||
//
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -430,12 +430,8 @@ Returns:
|
|||
|
||||
WinNtIo->WinNtThunk->SetErrorMode (SEM_FAILCRITICALERRORS);
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (WIN_NT_BLOCK_IO_PRIVATE),
|
||||
&Private
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
Private = AllocatePool (sizeof (WIN_NT_BLOCK_IO_PRIVATE));
|
||||
ASSERT (Private != NULL);
|
||||
|
||||
EfiInitializeLock (&Private->Lock, EFI_TPL_NOTIFY);
|
||||
|
||||
|
@ -518,7 +514,7 @@ Returns:
|
|||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INIT, "BlockDevice added: %s\n", Filename));
|
||||
|
|
|
@ -46,6 +46,9 @@
|
|||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>WinNtBlockIo.h</Filename>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -164,12 +164,8 @@ Returns:
|
|||
return Status;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (WIN_NT_SIMPLE_TEXT_PRIVATE_DATA),
|
||||
&Private
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Private = AllocatePool (sizeof (WIN_NT_SIMPLE_TEXT_PRIVATE_DATA));
|
||||
if (Private == NULL) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -214,7 +210,7 @@ Done:
|
|||
gBS->CloseEvent (Private->SimpleTextIn.WaitForKey);
|
||||
}
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -300,7 +296,7 @@ Returns:
|
|||
//
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -280,12 +280,8 @@ Returns:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (INPUT_RECORD) * NtEventCount,
|
||||
&InputRecord
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
InputRecord = AllocatePool (sizeof (INPUT_RECORD) * NtEventCount);
|
||||
if (InputRecord == NULL) {
|
||||
Status = EFI_NOT_READY;
|
||||
goto Done;
|
||||
}
|
||||
|
@ -315,7 +311,7 @@ Returns:
|
|||
|
||||
Done:
|
||||
if (InputRecord != NULL) {
|
||||
gBS->FreePool (InputRecord);
|
||||
FreePool (InputRecord);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>Console.h</Filename>
|
||||
|
|
|
@ -46,6 +46,9 @@
|
|||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>WinNtGopScreen.c</Filename>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -125,12 +125,8 @@ WinNtGopDriverBindingStart (
|
|||
// Allocate Private context data for SGO inteface.
|
||||
//
|
||||
Private = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (GOP_PRIVATE_DATA),
|
||||
&Private
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Private = AllocatePool (sizeof (GOP_PRIVATE_DATA));
|
||||
if (Private == NULL) {
|
||||
goto Done;
|
||||
}
|
||||
//
|
||||
|
@ -185,7 +181,7 @@ Done:
|
|||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
}
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,7 +266,7 @@ WinNtGopDriverBindingStop (
|
|||
//
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,6 @@ WinNtGopQuerytMode (
|
|||
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
GOP_PRIVATE_DATA *Private;
|
||||
|
||||
Private = GOP_PRIVATE_DATA_FROM_THIS (This);
|
||||
|
@ -94,13 +93,9 @@ WinNtGopQuerytMode (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
*Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
|
||||
if (*Info == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
||||
|
@ -242,17 +237,13 @@ WinNtGopSetMode (
|
|||
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ModeData->HorizontalResolution,
|
||||
&NewFillLine
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewFillLine = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ModeData->HorizontalResolution);
|
||||
if (NewFillLine == NULL) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if (Private->FillLine != NULL) {
|
||||
gBS->FreePool (Private->FillLine);
|
||||
FreePool (Private->FillLine);
|
||||
}
|
||||
|
||||
Private->FillLine = NewFillLine;
|
||||
|
@ -885,8 +876,6 @@ WinNtGopConstructor (
|
|||
GOP_PRIVATE_DATA *Private
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Private->ModeData = mGopModeData;
|
||||
|
||||
Private->GraphicsOutput.QueryMode = WinNtGopQuerytMode;
|
||||
|
@ -896,22 +885,15 @@ WinNtGopConstructor (
|
|||
//
|
||||
// Allocate buffer for Graphics Output Protocol mode information
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE),
|
||||
(VOID **) &Private->GraphicsOutput.Mode
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
Private->GraphicsOutput.Mode = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE));
|
||||
if (Private->GraphicsOutput.Mode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
(VOID **) &Private->GraphicsOutput.Mode->Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
Private->GraphicsOutput.Mode->Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
|
||||
if (Private->GraphicsOutput.Mode->Info == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
Private->GraphicsOutput.Mode->MaxMode = sizeof(mGopModeData) / sizeof(GOP_MODE_DATA);
|
||||
//
|
||||
// Till now, we have no idea about the window size.
|
||||
|
@ -982,9 +964,9 @@ WinNtGopDestructor (
|
|||
//
|
||||
if (Private->GraphicsOutput.Mode != NULL) {
|
||||
if (Private->GraphicsOutput.Mode->Info != NULL) {
|
||||
gBS->FreePool (Private->GraphicsOutput.Mode->Info);
|
||||
FreePool (Private->GraphicsOutput.Mode->Info);
|
||||
}
|
||||
gBS->FreePool (Private->GraphicsOutput.Mode);
|
||||
FreePool (Private->GraphicsOutput.Mode);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -309,7 +309,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (OpenInfoBuffer);
|
||||
FreePool (OpenInfoBuffer);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -334,12 +334,8 @@ Returns:
|
|||
//
|
||||
// Construct Private data
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (WIN_NT_SERIAL_IO_PRIVATE_DATA),
|
||||
&Private
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Private = AllocatePool (sizeof (WIN_NT_SERIAL_IO_PRIVATE_DATA));
|
||||
if (Private == NULL) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
@ -474,12 +470,12 @@ Error:
|
|||
}
|
||||
|
||||
if (Private->DevicePath != NULL) {
|
||||
gBS->FreePool (Private->DevicePath);
|
||||
FreePool (Private->DevicePath);
|
||||
}
|
||||
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -592,11 +588,11 @@ Returns:
|
|||
} else {
|
||||
Private->WinNtThunk->CloseHandle (Private->NtHandle);
|
||||
|
||||
gBS->FreePool (Private->DevicePath);
|
||||
FreePool (Private->DevicePath);
|
||||
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -869,7 +865,7 @@ Returns:
|
|||
}
|
||||
|
||||
if (Private->DevicePath != NULL) {
|
||||
gBS->FreePool (Private->DevicePath);
|
||||
FreePool (Private->DevicePath);
|
||||
}
|
||||
|
||||
Private->DevicePath = NewDevicePath;
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>DevicePathLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>WinNtSerialIo.h</Filename>
|
||||
|
|
|
@ -284,12 +284,10 @@ Returns:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (WIN_NT_SIMPLE_FILE_SYSTEM_PRIVATE),
|
||||
&Private
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Private = AllocatePool (sizeof (WIN_NT_SIMPLE_FILE_SYSTEM_PRIVATE));
|
||||
if (Private == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -298,14 +296,9 @@ Returns:
|
|||
|
||||
Private->FilePath = WinNtIo->EnvString;
|
||||
|
||||
Private->VolumeLabel = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (L"EFI_EMULATED"),
|
||||
&Private->VolumeLabel
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
Private->VolumeLabel = AllocatePool (StrSize (L"EFI_EMULATED"));
|
||||
if (Private->VolumeLabel == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -339,7 +332,7 @@ Done:
|
|||
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
gBS->CloseProtocol (
|
||||
|
@ -431,7 +424,7 @@ Returns:
|
|||
//
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -489,33 +482,21 @@ Returns:
|
|||
|
||||
Private = WIN_NT_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (This);
|
||||
|
||||
PrivateFile = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (WIN_NT_EFI_FILE_PRIVATE),
|
||||
&PrivateFile
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
PrivateFile = AllocatePool (sizeof (WIN_NT_EFI_FILE_PRIVATE));
|
||||
if (PrivateFile == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
PrivateFile->FileName = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (Private->FilePath),
|
||||
&PrivateFile->FileName
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
PrivateFile->FileName = AllocatePool (StrSize (Private->FilePath));
|
||||
if (PrivateFile->FileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
PrivateFile->FilePath = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (Private->FilePath),
|
||||
&PrivateFile->FilePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
PrivateFile->FilePath = AllocatePool (StrSize (Private->FilePath));
|
||||
if (PrivateFile->FilePath == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -550,14 +531,14 @@ Done:
|
|||
if (EFI_ERROR (Status)) {
|
||||
if (PrivateFile) {
|
||||
if (PrivateFile->FileName) {
|
||||
gBS->FreePool (PrivateFile->FileName);
|
||||
FreePool (PrivateFile->FileName);
|
||||
}
|
||||
|
||||
if (PrivateFile->FilePath) {
|
||||
gBS->FreePool (PrivateFile->FilePath);
|
||||
FreePool (PrivateFile->FilePath);
|
||||
}
|
||||
|
||||
gBS->FreePool (PrivateFile);
|
||||
FreePool (PrivateFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -675,13 +656,9 @@ Returns:
|
|||
//
|
||||
// Allocate buffer for FileName as the passed in FileName may be read only
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (FileName),
|
||||
&TempFileName
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
TempFileName = AllocatePool (StrSize (FileName));
|
||||
if (TempFileName == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
StrCpy (TempFileName, FileName);
|
||||
FileName = TempFileName;
|
||||
|
@ -733,27 +710,17 @@ OpenRoot:
|
|||
//
|
||||
// Attempt to open the file
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (WIN_NT_EFI_FILE_PRIVATE),
|
||||
&NewPrivateFile
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewPrivateFile = AllocatePool (sizeof (WIN_NT_EFI_FILE_PRIVATE));
|
||||
if (NewPrivateFile == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
CopyMem (NewPrivateFile, PrivateFile, sizeof (WIN_NT_EFI_FILE_PRIVATE));
|
||||
|
||||
NewPrivateFile->FilePath = NULL;
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (PrivateFile->FileName),
|
||||
&NewPrivateFile->FilePath
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewPrivateFile->FilePath = AllocatePool (StrSize (PrivateFile->FileName));
|
||||
if (NewPrivateFile->FilePath == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -763,14 +730,9 @@ OpenRoot:
|
|||
StrCpy (NewPrivateFile->FilePath, PrivateFile->FilePath);
|
||||
}
|
||||
|
||||
NewPrivateFile->FileName = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (NewPrivateFile->FilePath) + StrSize (L"\\") + StrSize (FileName),
|
||||
&NewPrivateFile->FileName
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewPrivateFile->FileName = AllocatePool (StrSize (NewPrivateFile->FilePath) + StrSize (L"\\") + StrSize (FileName));
|
||||
if (NewPrivateFile->FileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -847,9 +809,9 @@ OpenRoot:
|
|||
|
||||
if (StrCmp (NewPrivateFile->FileName, PrivateRoot->FilePath) == 0) {
|
||||
NewPrivateFile->IsRootDirectory = TRUE;
|
||||
gBS->FreePool (NewPrivateFile->FilePath);
|
||||
gBS->FreePool (NewPrivateFile->FileName);
|
||||
gBS->FreePool (NewPrivateFile);
|
||||
FreePool (NewPrivateFile->FilePath);
|
||||
FreePool (NewPrivateFile->FileName);
|
||||
FreePool (NewPrivateFile);
|
||||
goto OpenRoot;
|
||||
}
|
||||
|
||||
|
@ -861,15 +823,11 @@ OpenRoot:
|
|||
TempChar = *(RealFileName - 1);
|
||||
*(RealFileName - 1) = 0;
|
||||
|
||||
gBS->FreePool (NewPrivateFile->FilePath);
|
||||
FreePool (NewPrivateFile->FilePath);
|
||||
NewPrivateFile->FilePath = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (NewPrivateFile->FileName),
|
||||
&NewPrivateFile->FilePath
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewPrivateFile->FilePath = AllocatePool (StrSize (NewPrivateFile->FileName));
|
||||
if (NewPrivateFile->FilePath == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -923,13 +881,9 @@ OpenRoot:
|
|||
//
|
||||
if (NewPrivateFile->IsDirectoryPath) {
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (NewPrivateFile->FileName) + StrSize (L"\\*"),
|
||||
&TempFileName
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
TempFileName = AllocatePool (StrSize (NewPrivateFile->FileName) + StrSize (L"\\*"));
|
||||
if (TempFileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -943,7 +897,7 @@ OpenRoot:
|
|||
|
||||
LastError = PrivateFile->WinNtThunk->GetLastError ();
|
||||
if (LastError != ERROR_ALREADY_EXISTS) {
|
||||
gBS->FreePool (TempFileName);
|
||||
FreePool (TempFileName);
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
goto Done;
|
||||
}
|
||||
|
@ -1059,13 +1013,9 @@ OpenRoot:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
InfoSize,
|
||||
&Info
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
Info = AllocatePool (InfoSize);
|
||||
if (Info == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -1081,19 +1031,19 @@ OpenRoot:
|
|||
}
|
||||
|
||||
Done: ;
|
||||
gBS->FreePool (FileName);
|
||||
FreePool (FileName);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (NewPrivateFile) {
|
||||
if (NewPrivateFile->FileName) {
|
||||
gBS->FreePool (NewPrivateFile->FileName);
|
||||
FreePool (NewPrivateFile->FileName);
|
||||
}
|
||||
|
||||
if (NewPrivateFile->FilePath) {
|
||||
gBS->FreePool (NewPrivateFile->FilePath);
|
||||
FreePool (NewPrivateFile->FilePath);
|
||||
}
|
||||
|
||||
gBS->FreePool (NewPrivateFile);
|
||||
FreePool (NewPrivateFile);
|
||||
}
|
||||
} else {
|
||||
*NewHandle = &NewPrivateFile->EfiFile;
|
||||
|
@ -1151,10 +1101,10 @@ Returns:
|
|||
}
|
||||
|
||||
if (PrivateFile->FileName) {
|
||||
gBS->FreePool (PrivateFile->FileName);
|
||||
FreePool (PrivateFile->FileName);
|
||||
}
|
||||
|
||||
gBS->FreePool (PrivateFile);
|
||||
FreePool (PrivateFile);
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
|
||||
|
@ -1223,8 +1173,8 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (PrivateFile->FileName);
|
||||
gBS->FreePool (PrivateFile);
|
||||
FreePool (PrivateFile->FileName);
|
||||
FreePool (PrivateFile);
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
|
||||
|
@ -1344,11 +1294,7 @@ Returns:
|
|||
}
|
||||
|
||||
FileInfoSize = SIZE_OF_EFI_FILE_SYSTEM_INFO;
|
||||
gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
FileInfoSize,
|
||||
&FileInfo
|
||||
);
|
||||
FileInfo = AllocatePool (FileInfoSize);
|
||||
|
||||
Status = This->GetInfo (
|
||||
This,
|
||||
|
@ -1358,12 +1304,8 @@ Returns:
|
|||
);
|
||||
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
gBS->FreePool (FileInfo);
|
||||
gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
FileInfoSize,
|
||||
&FileInfo
|
||||
);
|
||||
FreePool (FileInfo);
|
||||
FileInfo = AllocatePool (FileInfoSize);
|
||||
Status = This->GetInfo (
|
||||
This,
|
||||
&gEfiFileInfoGuid,
|
||||
|
@ -1379,7 +1321,7 @@ Returns:
|
|||
|
||||
FileSize = FileInfo->FileSize;
|
||||
|
||||
gBS->FreePool (FileInfo);
|
||||
FreePool (FileInfo);
|
||||
|
||||
if (Pos >= FileSize) {
|
||||
*BufferSize = 0;
|
||||
|
@ -1628,13 +1570,9 @@ Returns:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (PrivateFile->FileName) + StrSize (L"\\*"),
|
||||
&FileName
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
FileName = AllocatePool (StrSize (PrivateFile->FileName) + StrSize (L"\\*"));
|
||||
if (FileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -1653,7 +1591,7 @@ Returns:
|
|||
PrivateFile->IsValidFindBuf = TRUE;
|
||||
}
|
||||
|
||||
gBS->FreePool (FileName);
|
||||
FreePool (FileName);
|
||||
|
||||
Status = (PrivateFile->LHandle == INVALID_HANDLE_VALUE) ? EFI_DEVICE_ERROR : EFI_SUCCESS;
|
||||
} else {
|
||||
|
@ -1956,14 +1894,10 @@ Returns:
|
|||
//
|
||||
// Try to get the drive name
|
||||
//
|
||||
DriveName = NULL;
|
||||
DriveNameFound = FALSE;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (PrivateFile->FilePath) + 1,
|
||||
&DriveName
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DriveName = AllocatePool (StrSize (PrivateFile->FilePath) + 1);
|
||||
if (DriveName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -2003,7 +1937,7 @@ Returns:
|
|||
&TotalClusters
|
||||
);
|
||||
if (DriveName) {
|
||||
gBS->FreePool (DriveName);
|
||||
FreePool (DriveName);
|
||||
}
|
||||
|
||||
if (NtStatus) {
|
||||
|
@ -2161,16 +2095,10 @@ Returns:
|
|||
|
||||
NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;
|
||||
|
||||
gBS->FreePool (PrivateRoot->VolumeLabel);
|
||||
|
||||
PrivateRoot->VolumeLabel = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (NewFileSystemInfo->VolumeLabel),
|
||||
&PrivateRoot->VolumeLabel
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (PrivateRoot->VolumeLabel);
|
||||
PrivateRoot->VolumeLabel = AllocatePool (StrSize (NewFileSystemInfo->VolumeLabel));
|
||||
if (PrivateRoot->VolumeLabel == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -2240,9 +2168,9 @@ Returns:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (EfiBootServicesData, OldInfoSize, &OldFileInfo);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
OldFileInfo = AllocatePool (OldInfoSize);
|
||||
if (OldFileInfo == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -2252,13 +2180,9 @@ Returns:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (PrivateFile->FileName),
|
||||
&OldFileName
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
OldFileName = AllocatePool (StrSize (PrivateFile->FileName));
|
||||
if (OldFileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -2268,13 +2192,9 @@ Returns:
|
|||
// Make full pathname from new filename and rootpath.
|
||||
//
|
||||
if (NewFileInfo->FileName[0] == '\\') {
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (PrivateRoot->FilePath) + StrSize (L"\\") + StrSize (NewFileInfo->FileName),
|
||||
&NewFileName
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewFileName = AllocatePool (StrSize (PrivateRoot->FilePath) + StrSize (L"\\") + StrSize (NewFileInfo->FileName));
|
||||
if (NewFileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -2282,13 +2202,9 @@ Returns:
|
|||
StrCat (NewFileName, L"\\");
|
||||
StrCat (NewFileName, NewFileInfo->FileName + 1);
|
||||
} else {
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (PrivateFile->FilePath) + StrSize (L"\\") + StrSize (NewFileInfo->FileName),
|
||||
&NewFileName
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewFileName = AllocatePool (StrSize (PrivateFile->FilePath) + StrSize (L"\\") + StrSize (NewFileInfo->FileName));
|
||||
if (NewFileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -2394,25 +2310,17 @@ Returns:
|
|||
//
|
||||
// modify file name
|
||||
//
|
||||
gBS->FreePool (PrivateFile->FileName);
|
||||
FreePool (PrivateFile->FileName);
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (NewFileName),
|
||||
&PrivateFile->FileName
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
PrivateFile->FileName = AllocatePool (StrSize (NewFileName));
|
||||
if (PrivateFile->FileName == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
StrCpy (PrivateFile->FileName, NewFileName);
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (NewFileName) + StrSize (L"\\*"),
|
||||
&TempFileName
|
||||
);
|
||||
TempFileName = AllocatePool (StrSize (NewFileName) + StrSize (L"\\*"));
|
||||
|
||||
StrCpy (TempFileName, NewFileName);
|
||||
|
||||
|
@ -2427,7 +2335,7 @@ Returns:
|
|||
NULL
|
||||
);
|
||||
|
||||
gBS->FreePool (TempFileName);
|
||||
FreePool (TempFileName);
|
||||
|
||||
//
|
||||
// Flush buffers just in case
|
||||
|
@ -2450,7 +2358,7 @@ Returns:
|
|||
StrCat (TempFileName, L"\\*");
|
||||
PrivateFile->LHandle = PrivateFile->WinNtThunk->FindFirstFile (TempFileName, &FindBuf);
|
||||
|
||||
gBS->FreePool (TempFileName);
|
||||
FreePool (TempFileName);
|
||||
}
|
||||
} else {
|
||||
Reopen: ;
|
||||
|
@ -2462,11 +2370,7 @@ Reopen: ;
|
|||
goto Done;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
StrSize (OldFileName) + StrSize (L"\\*"),
|
||||
&TempFileName
|
||||
);
|
||||
TempFileName = AllocatePool (StrSize (OldFileName) + StrSize (L"\\*"));
|
||||
|
||||
StrCpy (TempFileName, OldFileName);
|
||||
|
||||
|
@ -2495,7 +2399,7 @@ Reopen: ;
|
|||
PrivateFile->LHandle = PrivateFile->WinNtThunk->FindFirstFile (TempFileName, &FindBuf);
|
||||
}
|
||||
|
||||
gBS->FreePool (TempFileName);
|
||||
FreePool (TempFileName);
|
||||
|
||||
goto Done;
|
||||
|
||||
|
@ -2637,15 +2541,15 @@ Reopen: ;
|
|||
|
||||
Done:
|
||||
if (OldFileInfo != NULL) {
|
||||
gBS->FreePool (OldFileInfo);
|
||||
FreePool (OldFileInfo);
|
||||
}
|
||||
|
||||
if (OldFileName != NULL) {
|
||||
gBS->FreePool (OldFileName);
|
||||
FreePool (OldFileName);
|
||||
}
|
||||
|
||||
if (NewFileName != NULL) {
|
||||
gBS->FreePool (NewFileName);
|
||||
FreePool (NewFileName);
|
||||
}
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
|
|
|
@ -46,6 +46,9 @@
|
|||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>WinNtSimpleFileSystem.h</Filename>
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>WinNtUga.h</Filename>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -137,13 +137,8 @@ Returns:
|
|||
//
|
||||
// Allocate Private context data for SGO inteface.
|
||||
//
|
||||
Private = NULL;
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (UGA_PRIVATE_DATA),
|
||||
&Private
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Private = AllocatePool (sizeof (UGA_PRIVATE_DATA));
|
||||
if (Private == NULL) {
|
||||
goto Done;
|
||||
}
|
||||
//
|
||||
|
@ -198,7 +193,7 @@ Done:
|
|||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
}
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,7 +282,7 @@ Returns:
|
|||
//
|
||||
FreeUnicodeStringTable (Private->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -224,17 +224,13 @@ WinNtUgaSetMode (
|
|||
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (EFI_UGA_PIXEL) * HorizontalResolution,
|
||||
&NewFillLine
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
NewFillLine = AllocatePool (sizeof (EFI_UGA_PIXEL) * HorizontalResolution);
|
||||
if (NewFillLine == NULL) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if (Private->FillLine != NULL) {
|
||||
gBS->FreePool (Private->FillLine);
|
||||
FreePool (Private->FillLine);
|
||||
}
|
||||
|
||||
Private->FillLine = NewFillLine;
|
||||
|
|
|
@ -136,18 +136,11 @@ AllocateMemory (
|
|||
IN UINTN Size
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VOID *Buffer;
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
Size,
|
||||
(VOID *)&Buffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ASSERT (FALSE);
|
||||
return NULL;
|
||||
}
|
||||
Buffer = AllocatePool (Size);
|
||||
ASSERT (Buffer != NULL);
|
||||
|
||||
return Buffer;
|
||||
}
|
||||
|
||||
|
@ -341,13 +334,9 @@ Returns:
|
|||
}
|
||||
|
||||
if (Status != EFI_ALREADY_STARTED) {
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (WIN_NT_BUS_DEVICE),
|
||||
(VOID *) &WinNtBusDevice
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
WinNtBusDevice = AllocatePool (sizeof (WIN_NT_BUS_DEVICE));
|
||||
if (WinNtBusDevice == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
WinNtBusDevice->Signature = WIN_NT_BUS_DEVICE_SIGNATURE;
|
||||
|
@ -368,7 +357,7 @@ Returns:
|
|||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreeUnicodeStringTable (WinNtBusDevice->ControllerNameTable);
|
||||
gBS->FreePool (WinNtBusDevice);
|
||||
FreePool (WinNtBusDevice);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
@ -464,7 +453,7 @@ Returns:
|
|||
Count
|
||||
);
|
||||
if (WinNtDevice->DevicePath == NULL) {
|
||||
gBS->FreePool (WinNtDevice);
|
||||
FreePool (WinNtDevice);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -490,7 +479,7 @@ Returns:
|
|||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreeUnicodeStringTable (WinNtDevice->ControllerNameTable);
|
||||
gBS->FreePool (WinNtDevice);
|
||||
FreePool (WinNtDevice);
|
||||
} else {
|
||||
//
|
||||
// Open For Child Device
|
||||
|
@ -516,7 +505,7 @@ Returns:
|
|||
StartString = SubString;
|
||||
}
|
||||
|
||||
gBS->FreePool (TempStr);
|
||||
FreePool (TempStr);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@ -588,7 +577,7 @@ Returns:
|
|||
|
||||
FreeUnicodeStringTable (WinNtBusDevice->ControllerNameTable);
|
||||
|
||||
gBS->FreePool (WinNtBusDevice);
|
||||
FreePool (WinNtBusDevice);
|
||||
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
|
@ -652,7 +641,7 @@ Returns:
|
|||
// Close the child handle
|
||||
//
|
||||
FreeUnicodeStringTable (WinNtDevice->ControllerNameTable);
|
||||
gBS->FreePool (WinNtDevice);
|
||||
FreePool (WinNtDevice);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,9 @@
|
|||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>DevicePathLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>WinNtBusDriver.h</Filename>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -417,12 +417,8 @@ Returns:
|
|||
CPU_ARCH_PROTOCOL_PRIVATE *Private;
|
||||
VOID *Registration;
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (CPU_ARCH_PROTOCOL_PRIVATE),
|
||||
&Private
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
Private = AllocatePool (sizeof (CPU_ARCH_PROTOCOL_PRIVATE));
|
||||
ASSERT (Private != NULL);
|
||||
|
||||
Private->Signature = CPU_ARCH_PROT_PRIVATE_SIGNATURE;
|
||||
Private->Cpu.FlushDataCache = WinNtFlushCpuDataCache;
|
||||
|
@ -656,7 +652,7 @@ Returns:
|
|||
Status = Hii->NewPack (Hii, PackageList, &StringHandle);
|
||||
ASSERT (!EFI_ERROR (Status));
|
||||
|
||||
gBS->FreePool (PackageList);
|
||||
FreePool (PackageList);
|
||||
|
||||
//
|
||||
// Store processor version data record to data hub
|
||||
|
@ -717,7 +713,7 @@ Returns:
|
|||
TotalSize
|
||||
);
|
||||
|
||||
gBS->FreePool (RecordBuffer.Raw);
|
||||
FreePool (RecordBuffer.Raw);
|
||||
}
|
||||
|
||||
gBS->CloseProtocol (
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<SupportedArchitectures>IA32</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>DxeWinNtLib</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED">
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER">
|
||||
<Keyword>WinNtLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -240,7 +240,7 @@ Returns:
|
|||
BlkIo->Media->BlockSize,
|
||||
Buffer
|
||||
);
|
||||
gBS->FreePool (Buffer);
|
||||
FreePool (Buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -460,7 +460,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (BlockIoBuffer);
|
||||
FreePool (BlockIoBuffer);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -532,7 +532,7 @@ Returns:
|
|||
&BootOptionSize
|
||||
);
|
||||
if (NULL == BootOptionVar) {
|
||||
gBS->FreePool (BootOrder);
|
||||
FreePool (BootOrder);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -549,11 +549,11 @@ Returns:
|
|||
if ((OptionDevicePathSize == DevicePathSize) &&
|
||||
(CompareMem (DevicePath, OptionDevicePath, DevicePathSize) == 0)) {
|
||||
BdsDeleteBootOption (BootOrder[Index], BootOrder, &BootOrderSize);
|
||||
gBS->FreePool (BootOptionVar);
|
||||
FreePool (BootOptionVar);
|
||||
break;
|
||||
}
|
||||
|
||||
gBS->FreePool (BootOptionVar);
|
||||
FreePool (BootOptionVar);
|
||||
Index++;
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ Returns:
|
|||
BootOrder
|
||||
);
|
||||
|
||||
gBS->FreePool (BootOrder);
|
||||
FreePool (BootOrder);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ Returns:
|
|||
&BootOptionSize
|
||||
);
|
||||
if (NULL == BootOptionVar) {
|
||||
gBS->FreePool (BootOrder);
|
||||
FreePool (BootOrder);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -652,7 +652,7 @@ Returns:
|
|||
//
|
||||
if ((DevicePathType (OptionDevicePath) == BBS_DEVICE_PATH) &&
|
||||
(DevicePathSubType (OptionDevicePath) == BBS_BBS_DP)) {
|
||||
gBS->FreePool (BootOptionVar);
|
||||
FreePool (BootOptionVar);
|
||||
Index++;
|
||||
continue;
|
||||
}
|
||||
|
@ -673,7 +673,7 @@ Returns:
|
|||
// Skip boot option for internal Shell, it's always valid
|
||||
//
|
||||
(EfiGetNameGuidFromFwVolDevicePathNode ((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) LastDeviceNode) != NULL)) {
|
||||
gBS->FreePool (BootOptionVar);
|
||||
FreePool (BootOptionVar);
|
||||
Index++;
|
||||
continue;
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ Returns:
|
|||
BootOrder[Index] = 0xffff;
|
||||
}
|
||||
|
||||
gBS->FreePool (BootOptionVar);
|
||||
FreePool (BootOptionVar);
|
||||
Index++;
|
||||
}
|
||||
|
||||
|
@ -743,7 +743,7 @@ Returns:
|
|||
BootOrder
|
||||
);
|
||||
|
||||
gBS->FreePool (BootOrder);
|
||||
FreePool (BootOrder);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -877,7 +877,7 @@ Returns:
|
|||
}
|
||||
|
||||
if (NumberFileSystemHandles) {
|
||||
gBS->FreePool (FileSystemHandles);
|
||||
FreePool (FileSystemHandles);
|
||||
}
|
||||
//
|
||||
// Parse Network Boot Device
|
||||
|
@ -904,7 +904,7 @@ Returns:
|
|||
}
|
||||
|
||||
if (NumberLoadFileHandles) {
|
||||
gBS->FreePool (LoadFileHandles);
|
||||
FreePool (LoadFileHandles);
|
||||
}
|
||||
//
|
||||
// Check if we have on flash shell
|
||||
|
@ -946,7 +946,7 @@ Returns:
|
|||
}
|
||||
|
||||
if (FvHandleCount) {
|
||||
gBS->FreePool (FvHandleBuffer);
|
||||
FreePool (FvHandleBuffer);
|
||||
}
|
||||
//
|
||||
// Make sure every boot only have one time
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -206,7 +206,7 @@ Returns:
|
|||
} while (DevicePath != NULL);
|
||||
|
||||
if (CopyOfDevicePath != NULL) {
|
||||
gBS->FreePool (CopyOfDevicePath);
|
||||
FreePool (CopyOfDevicePath);
|
||||
}
|
||||
//
|
||||
// All handle with DevicePath exists in the handle database
|
||||
|
@ -257,7 +257,7 @@ Returns:
|
|||
Status = gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);
|
||||
}
|
||||
|
||||
gBS->FreePool (HandleBuffer);
|
||||
FreePool (HandleBuffer);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ Returns:
|
|||
Status = gBS->DisconnectController (HandleBuffer[Index], NULL, NULL);
|
||||
}
|
||||
|
||||
gBS->FreePool (HandleBuffer);
|
||||
FreePool (HandleBuffer);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -250,7 +250,7 @@ Returns:
|
|||
BdsLibSafeFreePool(Instance);
|
||||
} while (CopyOfDevicePath != NULL);
|
||||
|
||||
gBS->FreePool (StartDevicePath);
|
||||
FreePool (StartDevicePath);
|
||||
|
||||
if (DeviceExist == FALSE) {
|
||||
return EFI_NOT_FOUND;
|
||||
|
|
|
@ -249,11 +249,13 @@ Returns:
|
|||
ZeroMem (OptionName, sizeof (OptionName));
|
||||
|
||||
TempOptionSize = 0;
|
||||
|
||||
TempOptionPtr = BdsLibGetVariableAndSize (
|
||||
VariableName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
&TempOptionSize
|
||||
);
|
||||
|
||||
//
|
||||
// Compare with current option variable
|
||||
//
|
||||
|
@ -290,8 +292,8 @@ Returns:
|
|||
//
|
||||
// Got the option, so just return
|
||||
//
|
||||
gBS->FreePool (OptionPtr);
|
||||
gBS->FreePool (TempOptionPtr);
|
||||
FreePool (OptionPtr);
|
||||
FreePool (TempOptionPtr);
|
||||
return EFI_SUCCESS;
|
||||
} else {
|
||||
//
|
||||
|
@ -302,7 +304,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (OptionPtr);
|
||||
FreePool (OptionPtr);
|
||||
}
|
||||
|
||||
OptionSize = sizeof (UINT32) + sizeof (UINT16) + StrSize (String) + GetDevicePathSize (DevicePath);
|
||||
|
@ -342,12 +344,12 @@ Returns:
|
|||
OptionPtr
|
||||
);
|
||||
if (EFI_ERROR (Status) || UpdateBootDevicePath) {
|
||||
gBS->FreePool (OptionPtr);
|
||||
gBS->FreePool (TempOptionPtr);
|
||||
FreePool (OptionPtr);
|
||||
FreePool (TempOptionPtr);
|
||||
return Status;
|
||||
}
|
||||
|
||||
gBS->FreePool (OptionPtr);
|
||||
FreePool (OptionPtr);
|
||||
|
||||
//
|
||||
// Update the option order variable
|
||||
|
@ -363,13 +365,15 @@ Returns:
|
|||
OptionOrderPtr
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (TempOptionPtr);
|
||||
gBS->FreePool (OptionOrderPtr);
|
||||
FreePool (TempOptionPtr);
|
||||
FreePool (OptionOrderPtr);
|
||||
return Status;
|
||||
}
|
||||
|
||||
gBS->FreePool (TempOptionPtr);
|
||||
gBS->FreePool (OptionOrderPtr);
|
||||
if (TempOptionPtr != NULL) {
|
||||
FreePool (TempOptionPtr);
|
||||
}
|
||||
FreePool (OptionOrderPtr);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -482,12 +486,12 @@ Returns:
|
|||
//
|
||||
if ((Option->Attribute & LOAD_OPTION_ACTIVE) == LOAD_OPTION_ACTIVE) {
|
||||
InsertTailList (BdsCommonOptionList, &Option->Link);
|
||||
gBS->FreePool (Variable);
|
||||
FreePool (Variable);
|
||||
return Option;
|
||||
}
|
||||
|
||||
gBS->FreePool (Variable);
|
||||
gBS->FreePool (Option);
|
||||
FreePool (Variable);
|
||||
FreePool (Option);
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
@ -553,7 +557,7 @@ Returns:
|
|||
|
||||
}
|
||||
|
||||
gBS->FreePool (OptionOrder);
|
||||
FreePool (OptionOrder);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -641,7 +645,7 @@ Returns:
|
|||
--*/
|
||||
{
|
||||
if (Buffer != NULL) {
|
||||
gBS->FreePool (Buffer);
|
||||
FreePool (Buffer);
|
||||
Buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -756,11 +760,11 @@ Returns:
|
|||
// return success
|
||||
//
|
||||
if (CompareMem (Single, DevicePathInst, Size) == 0) {
|
||||
gBS->FreePool (DevicePathInst);
|
||||
FreePool (DevicePathInst);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gBS->FreePool (DevicePathInst);
|
||||
FreePool (DevicePathInst);
|
||||
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
|
||||
}
|
||||
|
||||
|
@ -1021,8 +1025,8 @@ Returns:
|
|||
Browser->CreatePopUp (2, TRUE, 0, NULL, &Key, StringBuffer1, StringBuffer2);
|
||||
} while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN));
|
||||
|
||||
gBS->FreePool (StringBuffer1);
|
||||
gBS->FreePool (StringBuffer2);
|
||||
FreePool (StringBuffer1);
|
||||
FreePool (StringBuffer2);
|
||||
//
|
||||
// If the user hits the YES Response key, reset
|
||||
//
|
||||
|
|
|
@ -71,7 +71,7 @@ Returns:
|
|||
CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
|
||||
}
|
||||
|
||||
gBS->FreePool (OldPool);
|
||||
FreePool (OldPool);
|
||||
}
|
||||
|
||||
return NewPool;
|
||||
|
@ -137,7 +137,7 @@ Returns:
|
|||
Str->len = strsize - sizeof (UINT16);
|
||||
}
|
||||
|
||||
gBS->FreePool (AppendStr);
|
||||
FreePool (AppendStr);
|
||||
return Str->str;
|
||||
}
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ DevicePathToStr (
|
|||
//
|
||||
// Shrink pool used for string allocation
|
||||
//
|
||||
gBS->FreePool (DevPath);
|
||||
FreePool (DevPath);
|
||||
|
||||
Done:
|
||||
NewSize = (Str.len + 1) * sizeof (CHAR16);
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<SupportedArchitectures>IA32</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>EdkGenericBdsLib</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED">
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="DXE_DRIVER">
|
||||
<Keyword>EdkGenericBdsLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
|
@ -76,7 +76,6 @@
|
|||
<Filename>Performance.h</Filename>
|
||||
<Filename>Performance.c</Filename>
|
||||
<Filename>BdsMisc.c</Filename>
|
||||
<Filename SupArchList="IPF">Ipf/ShadowRom.c</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -328,7 +328,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (Handles);
|
||||
FreePool (Handles);
|
||||
|
||||
//
|
||||
// Get inserted performance data
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<SupportedArchitectures>IA32</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>EdkNt32PeiPeCoffGetEntryPointLib</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED">
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="PEI_CORE PEIM">
|
||||
<Keyword>PeCoffGetEntryPointLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<SupportedArchitectures>IA32</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>Nt32PeCoffLoaderLib</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED">
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="DXE_CORE PEIM">
|
||||
<Keyword>EdkPeCoffLoaderLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -1252,12 +1252,8 @@ Returns:
|
|||
// Allocate runtime services data for global variable, which contains
|
||||
// the private data of all firmware volume block instances
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiRuntimeServicesData,
|
||||
sizeof (ESAL_FWB_GLOBAL),
|
||||
&mFvbModuleGlobal
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
mFvbModuleGlobal = AllocateRuntimePool (sizeof (ESAL_FWB_GLOBAL));
|
||||
ASSERT (mFvbModuleGlobal != NULL);
|
||||
|
||||
//
|
||||
// Calculate the total size for all firmware volume block instances
|
||||
|
@ -1306,12 +1302,8 @@ Returns:
|
|||
// the private data of each FV instance. But in virtual mode or in physical
|
||||
// mode, the address of the the physical memory may be different.
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiRuntimeServicesData,
|
||||
BufferSize,
|
||||
&mFvbModuleGlobal->FvInstance[FVB_PHYSICAL]
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
mFvbModuleGlobal->FvInstance[FVB_PHYSICAL] = AllocateRuntimePool (BufferSize);
|
||||
ASSERT (mFvbModuleGlobal->FvInstance[FVB_PHYSICAL] != NULL);
|
||||
|
||||
//
|
||||
// Make a virtual copy of the FvInstance pointer.
|
||||
|
@ -1392,12 +1384,8 @@ Returns:
|
|||
//
|
||||
// Add a FVB Protocol Instance
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiRuntimeServicesData,
|
||||
sizeof (EFI_FW_VOL_BLOCK_DEVICE),
|
||||
&FvbDevice
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
FvbDevice = AllocateRuntimePool (sizeof (EFI_FW_VOL_BLOCK_DEVICE));
|
||||
ASSERT (FvbDevice != NULL);
|
||||
|
||||
CopyMem (FvbDevice, &mFvbDeviceTemplate, sizeof (EFI_FW_VOL_BLOCK_DEVICE));
|
||||
|
||||
|
@ -1481,12 +1469,8 @@ Returns:
|
|||
//
|
||||
// Allocate for scratch space, an intermediate buffer for FVB extention
|
||||
//
|
||||
Status = gBS->AllocatePool (
|
||||
EfiRuntimeServicesData,
|
||||
MaxLbaSize,
|
||||
&mFvbModuleGlobal->FvbScratchSpace[FVB_PHYSICAL]
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
mFvbModuleGlobal->FvbScratchSpace[FVB_PHYSICAL] = AllocateRuntimePool (MaxLbaSize);
|
||||
ASSERT (mFvbModuleGlobal->FvbScratchSpace[FVB_PHYSICAL] != NULL);
|
||||
|
||||
mFvbModuleGlobal->FvbScratchSpace[FVB_VIRTUAL] = mFvbModuleGlobal->FvbScratchSpace[FVB_PHYSICAL];
|
||||
|
||||
|
|
Loading…
Reference in New Issue