Added support for an EFI X64 ABI compatible UnixPkg. With an internal only compiler I've been able to run checked in X64 EFI shell binary! We are hoping to get the open source LLVM compiler working for this... Since the SEC has to be UNIX ABI to make the POSIX calls it is compiled using a different compiler and the rest of the UnixPkg is compiled with UNIXPKG tool. You just need to point UNIXPKG at your EFI X64 ABI compiler of choice, it should work like MYTOOLS. Some one may want to port this to Linux at some point. To build cd into UnixPkg and ./build64.sh

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10806 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish
2010-08-18 20:24:08 +00:00
parent 6989af7168
commit bb111c2346
18 changed files with 316 additions and 200 deletions

View File

@@ -35,45 +35,17 @@
# None
#
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(EfiInternalSwitchStack)
ASM_PFX(EfiInternalSwitchStack):
mov %rcx, %rax
mov %rdx, %rcx
mov %r8, %rdx
#
# Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
# in case the callee wishes to spill them.
#
lea -0x20(%r9), %rsp
call *%rax
#------------------------------------------------------------------------------
# Routine Description:
#
# Routine for switching stacks with 2 parameters (Unix ABI)
#
# Arguments:
#
# (rdi) EntryPoint - Entry point with new stack.
# (rsi) Context1 - Parameter1 for entry point.
# (rdx) Context2 - Parameter2 for entry point.
# (rcx) NewStack - The pointer to new stack.
#
# Returns:
#
# None
#
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalSwitchStack)
ASM_PFX(InternalSwitchStack):
mov %rdi, %rax
mov %rsi, %rdi
mov %rdx, %rsi
movq %rcx, %rax
movq %rdx, %rcx
movq %r8, %rdx
movq %r9, %rsp
#
# Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
# in case the callee wishes to spill them.
#
lea -0x20(%rcx), %rsp
subq $40, %rsp // 32-byte shadow space plus alignment pad
call *%rax