[FREELOADER] Fix build with full UEFI support

This commit is contained in:
Justin Miller 2023-10-12 18:41:20 -07:00
parent cf2818762d
commit 5cf3dbabb0
4 changed files with 28 additions and 3 deletions

View file

@ -0,0 +1,20 @@
#include <kxarm64.h>
EXTERN BasicStack
EXTERN UefiExitBootServices
EXTERN ExecuteLoaderCleanly
NESTED_ENTRY _changestack
PROLOG_END _changestack
ldr x1, =BasicStack
mov sp, x1
b ExecuteLoaderCleanly
NESTED_END _changestack
NESTED_ENTRY _exituefi
PROLOG_END _exituefi
b UefiExitBootServices
ret
NESTED_END _exituefi
END

View file

@ -23,7 +23,7 @@ extern UINT32 FreeldrDescCount;
BOOLEAN AcpiPresent = FALSE;
/* FUNCTIONS *****************************************************************/
#if 0
static
PRSDP_DESCRIPTOR
FindAcpiBios(VOID)
@ -122,11 +122,13 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
}
}
#endif
PCONFIGURATION_COMPONENT_DATA
UefiHwDetect(VOID)
{
PCONFIGURATION_COMPONENT_DATA SystemKey;
ULONG BusNumber = 0;
//ULONG BusNumber = 0;
TRACE("DetectHardware()\n");
@ -142,7 +144,7 @@ UefiHwDetect(VOID)
#endif
/* Detect ACPI */
DetectAcpiBios(SystemKey, &BusNumber);
// DetectAcpiBios(SystemKey, &BusNumber);
TRACE("DetectHardware() Done\n");
return SystemKey;

View file

@ -18,6 +18,7 @@ PVOID UefiServiceStack;
PVOID BasicStack;
void _changestack(VOID);
VOID __cdecl Reboot(VOID);
/* FUNCTIONS ******************************************************************/

View file

@ -40,6 +40,8 @@ elseif(ARCH STREQUAL "arm")
elseif(ARCH STREQUAL "arm64")
list(APPEND UEFILDR_ARC_SOURCE
arch/arm64/mach.c)
list(APPEND UEFILDR_COMMON_ASM_SOURCE
arch/uefi/arm64/uefiasm.S)
#TBD
else()
#TBD