mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-12 09:54:36 +01:00
fix errors in MemoryAllocationLib
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
b6aadbd0db
commit
a355a5dad4
@ -51,7 +51,7 @@ TOOL_CHAIN_CONF = Conf/tools_def.txt
|
||||
# TAGNAME List Optional Specify the name(s) of the tools_def.txt TagName to use.
|
||||
# If not specified, all applicable TagName tools will be
|
||||
# used for the build. The list uses space character separation.
|
||||
TOOL_CHAIN_TAG = VS2015x86
|
||||
TOOL_CHAIN_TAG = VS2017
|
||||
|
||||
# MAX_CONCURRENT_THREAD_NUMBER NUMBER Optional The number of concurrent threads. If not specified or set
|
||||
# to zero, tool automatically detect number of processor
|
||||
|
@ -139,11 +139,13 @@ FreePages (
|
||||
IN UINTN Pages
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
// EFI_STATUS Status;
|
||||
|
||||
ASSERT (Pages != 0);
|
||||
Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT (Pages != 0);
|
||||
if (Pages != 0) {
|
||||
gBS->FreePages((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages);
|
||||
}
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -216,8 +218,8 @@ InternalAllocateAlignedPages (
|
||||
//
|
||||
// Free last unaligned page(s).
|
||||
//
|
||||
Status = gBS->FreePages (Memory, UnalignedPages);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
/* Status = */ gBS->FreePages (Memory, UnalignedPages);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
} else {
|
||||
//
|
||||
@ -340,11 +342,12 @@ FreeAlignedPages (
|
||||
IN UINTN Pages
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
// EFI_STATUS Status;
|
||||
|
||||
ASSERT (Pages != 0);
|
||||
Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (Pages != 0) {
|
||||
/* Status = */ gBS->FreePages((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages);
|
||||
}
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -367,7 +370,12 @@ InternalAllocatePool (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VOID *Memory;
|
||||
VOID *Memory = NULL;
|
||||
|
||||
if (AllocationSize == 0)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (MemoryType, AllocationSize, &Memory);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@ -559,9 +567,13 @@ InternalAllocateCopyPool (
|
||||
)
|
||||
{
|
||||
VOID *Memory;
|
||||
if (!Buffer || (AllocationSize > (MAX_ADDRESS - (UINTN)Buffer + 1)))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ASSERT (Buffer != NULL);
|
||||
ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));
|
||||
// ASSERT (Buffer != NULL);
|
||||
// ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));
|
||||
|
||||
Memory = InternalAllocatePool (PoolType, AllocationSize);
|
||||
if (Memory != NULL) {
|
||||
@ -807,9 +819,11 @@ FreePool (
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = gBS->FreePool (Buffer);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
// EFI_STATUS Status;
|
||||
if (Buffer) {
|
||||
gBS->FreePool(Buffer);
|
||||
}
|
||||
// Status = gBS->FreePool (Buffer);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,9 @@ set DEVSTAGE=
|
||||
set IASL_PREFIX=c:\ASL\
|
||||
|
||||
set DEFAULT_CYGWIN_HOME=c:\cygwin
|
||||
set DEFAULT_PYTHONHOME=c:\Python27
|
||||
set DEFAULT_PYTHONHOME="d:\Program File\Python37"
|
||||
set DEFAULT_PYTHON_FREEZER_PATH=%PYTHON_HOME%\Scripts
|
||||
set PYTHON3_ENABLE="TRUE"
|
||||
set DEFAULT_NASM_PREFIX=
|
||||
rem # %DEFAULT_CYGWIN_HOME%\bin
|
||||
set DEFAULT_TOOLCHAIN=VS2015x86
|
||||
|
@ -765,6 +765,12 @@ struct ACPI_NAME_LIST {
|
||||
CHAR8 *Name;
|
||||
};
|
||||
|
||||
typedef struct RT_VARIABLES RT_VARIABLES;
|
||||
struct RT_VARIABLES {
|
||||
BOOLEAN Disabled;
|
||||
CHAR8 *Name;
|
||||
EFI_GUID VarGuid;
|
||||
};
|
||||
|
||||
typedef struct CUSTOM_LOADER_ENTRY CUSTOM_LOADER_ENTRY;
|
||||
struct CUSTOM_LOADER_ENTRY {
|
||||
|
@ -6184,7 +6184,7 @@ GetUserSettings(
|
||||
if (Prop != NULL) {
|
||||
INTN i, Count = GetTagCount (Prop);
|
||||
for (i = 0; i < Count; i++) {
|
||||
EFI_STATUS Status = GetElement (Prop, i, &Dict);
|
||||
Status = GetElement (Prop, i, &Dict);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Prop2 = GetProperty (Dict, "Comment");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user