mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
fix windows compilation, fix setmem usage
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
da51723696
commit
902c497ab0
@ -14,6 +14,18 @@
|
|||||||
|
|
||||||
#define APTIOMEMORYFIX_PROTOCOL_REVISION 27
|
#define APTIOMEMORYFIX_PROTOCOL_REVISION 27
|
||||||
|
|
||||||
|
#include <Library/UefiLib.h>
|
||||||
|
|
||||||
|
//#ifndef EFIAPI
|
||||||
|
//#if _MSC_EXTENSIONS
|
||||||
|
///
|
||||||
|
/// Define the standard calling convention regardless of optimization level.
|
||||||
|
/// __cdecl is Microsoft* specific C extension.
|
||||||
|
///
|
||||||
|
//#define EFIAPI __cdecl
|
||||||
|
//#endif
|
||||||
|
//#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// APTIOMEMORYFIX_PROTOCOL_GUID
|
// APTIOMEMORYFIX_PROTOCOL_GUID
|
||||||
// C7CBA84E-CC77-461D-9E3C-6BE0CB79A7C1
|
// C7CBA84E-CC77-461D-9E3C-6BE0CB79A7C1
|
||||||
@ -26,8 +38,7 @@
|
|||||||
//
|
//
|
||||||
typedef
|
typedef
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
EFIAPI
|
(EFIAPI *AMF_SET_NVRAM_REDIRECT) (
|
||||||
(*AMF_SET_NVRAM_REDIRECT) (
|
|
||||||
IN BOOLEAN NewValue
|
IN BOOLEAN NewValue
|
||||||
);
|
);
|
||||||
|
|
||||||
|
13
cbuild.bat
13
cbuild.bat
@ -33,7 +33,7 @@ set DEFAULT_CYGWIN_HOME=c:\cygwin
|
|||||||
set DEFAULT_PYTHONHOME=
|
set DEFAULT_PYTHONHOME=
|
||||||
rem d:\Program File\Python37"
|
rem d:\Program File\Python37"
|
||||||
set DEFAULT_PYTHON_FREEZER_PATH=%PYTHON_HOME%\Scripts
|
set DEFAULT_PYTHON_FREEZER_PATH=%PYTHON_HOME%\Scripts
|
||||||
rem set PYTHON3_ENABLE=TRUE
|
set PYTHON3_ENABLE=FALSE
|
||||||
set DEFAULT_NASM_PREFIX=
|
set DEFAULT_NASM_PREFIX=
|
||||||
rem C:\Program Files (x86)\NASM"
|
rem C:\Program Files (x86)\NASM"
|
||||||
rem # %DEFAULT_CYGWIN_HOME%\bin
|
rem # %DEFAULT_CYGWIN_HOME%\bin
|
||||||
@ -53,10 +53,17 @@ if errorlevel 1 (
|
|||||||
rem # get the current revision number
|
rem # get the current revision number
|
||||||
:getrevision
|
:getrevision
|
||||||
rem get svn revision number
|
rem get svn revision number
|
||||||
set F_VER_TXT=vers.txt
|
rem set F_VER_TXT=vers.txt
|
||||||
rem # svnversion -n>%F_VER_TXT%
|
rem # svnversion -n>%F_VER_TXT%
|
||||||
set /P s=<%F_VER_TXT%
|
rem set /P s=<%F_VER_TXT%
|
||||||
rem # del %F_VER_TXT%
|
rem # del %F_VER_TXT%
|
||||||
|
git rev-list --tags --max-count=1 > revs.txt
|
||||||
|
set /p c=< revs.txt
|
||||||
|
del revs.txt
|
||||||
|
git describe --tags %c% > vers.txt
|
||||||
|
set /P s=< vers.txt
|
||||||
|
del vers.txt
|
||||||
|
|
||||||
set SVNREVISION=
|
set SVNREVISION=
|
||||||
|
|
||||||
rem # get the current revision number
|
rem # get the current revision number
|
||||||
|
@ -1175,7 +1175,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
Patches->KextPatches[Patches->NrKexts].MaskFind = NULL;
|
Patches->KextPatches[Patches->NrKexts].MaskFind = NULL;
|
||||||
} else {
|
} else {
|
||||||
Patches->KextPatches[Patches->NrKexts].MaskFind = AllocatePool (FindLen);
|
Patches->KextPatches[Patches->NrKexts].MaskFind = AllocatePool (FindLen);
|
||||||
SetMem(Patches->KextPatches[Patches->NrKexts].MaskFind, 0xFF, FindLen);
|
SetMem(Patches->KextPatches[Patches->NrKexts].MaskFind, FindLen, 0xFF);
|
||||||
CopyMem(Patches->KextPatches[Patches->NrKexts].MaskFind, TmpData, MaskLen);
|
CopyMem(Patches->KextPatches[Patches->NrKexts].MaskFind, TmpData, MaskLen);
|
||||||
}
|
}
|
||||||
FreePool(TmpData);
|
FreePool(TmpData);
|
||||||
@ -1318,7 +1318,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
Patches->KernelPatches[Patches->NrKexts].MaskFind = NULL;
|
Patches->KernelPatches[Patches->NrKexts].MaskFind = NULL;
|
||||||
} else {
|
} else {
|
||||||
Patches->KernelPatches[Patches->NrKexts].MaskFind = AllocatePool (FindLen);
|
Patches->KernelPatches[Patches->NrKexts].MaskFind = AllocatePool (FindLen);
|
||||||
SetMem(Patches->KernelPatches[Patches->NrKexts].MaskFind, 0xFF, FindLen);
|
SetMem(Patches->KernelPatches[Patches->NrKexts].MaskFind, FindLen, 0xFF);
|
||||||
CopyMem(Patches->KernelPatches[Patches->NrKexts].MaskFind, TmpData, MaskLen);
|
CopyMem(Patches->KernelPatches[Patches->NrKexts].MaskFind, TmpData, MaskLen);
|
||||||
}
|
}
|
||||||
FreePool(TmpData);
|
FreePool(TmpData);
|
||||||
@ -1443,7 +1443,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
Patches->BootPatches[Patches->NrKexts].MaskFind = NULL;
|
Patches->BootPatches[Patches->NrKexts].MaskFind = NULL;
|
||||||
} else {
|
} else {
|
||||||
Patches->BootPatches[Patches->NrKexts].MaskFind = AllocatePool (FindLen);
|
Patches->BootPatches[Patches->NrKexts].MaskFind = AllocatePool (FindLen);
|
||||||
SetMem(Patches->BootPatches[Patches->NrKexts].MaskFind, 0xFF, FindLen);
|
SetMem(Patches->BootPatches[Patches->NrKexts].MaskFind, FindLen, 0xFF);
|
||||||
CopyMem(Patches->BootPatches[Patches->NrKexts].MaskFind, TmpData, MaskLen);
|
CopyMem(Patches->BootPatches[Patches->NrKexts].MaskFind, TmpData, MaskLen);
|
||||||
}
|
}
|
||||||
FreePool(TmpData);
|
FreePool(TmpData);
|
||||||
|
Loading…
Reference in New Issue
Block a user