diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-02-14 19:21:39 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-02-14 19:21:39 +0000 |
commit | dd71f6e2876cb791fda1feb889558d1efcf41ea2 (patch) | |
tree | 41cb724168e3fc6bb61e7b5ceecb575319e68bdd /OvmfPkg/Library/LoadLinuxLib/X64 | |
parent | 25ca06f9a0b64011f93682d3e46511f57c61b7b8 (diff) | |
download | edk2-platforms-dd71f6e2876cb791fda1feb889558d1efcf41ea2.tar.xz |
OvmfPkg LoadLinuxLib: Use kernel's EFI entry point where available
Usage of the EFI entry point was made feasible in the kernel
x64 boot protocol 2.12 where a 32-bit & 64-bit entry point
became well defined.
http://git.kernel.org/linus/09c205af
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14132 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/Library/LoadLinuxLib/X64')
-rw-r--r-- | OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.S | 22 | ||||
-rw-r--r-- | OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.asm | 24 |
2 files changed, 46 insertions, 0 deletions
diff --git a/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.S b/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.S index edc6e7bd70..056e3c013f 100644 --- a/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.S +++ b/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.S @@ -13,6 +13,7 @@ #------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(JumpToKernel)
+ASM_GLOBAL ASM_PFX(JumpToUefiKernel)
#------------------------------------------------------------------------------
# VOID
@@ -67,3 +68,24 @@ ASM_PFX(JumpToKernel): ret
.code64
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# JumpToUefiKernel (
+# EFI_HANDLE ImageHandle, // rcx
+# EFI_SYSTEM_TABLE *SystemTable, // rdx
+# VOID *KernelBootParams, // r8
+# VOID *KernelStart // r9
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(JumpToUefiKernel):
+ movq %rcx, %rdi
+ movq %rdx, %rsi
+ movq %r8, %rdx
+ xor %rax, %rax
+ movl 0x264(%r8), %eax
+ addq %rax, %r9
+ addq $0x200, %r9
+ callq %r9
+ ret
+
diff --git a/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.asm b/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.asm index bcf6260e1d..fc07eab684 100644 --- a/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.asm +++ b/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.asm @@ -68,4 +68,28 @@ JumpToKernel PROC JumpToKernel ENDP
+;------------------------------------------------------------------------------
+; VOID
+; EFIAPI
+; JumpToUefiKernel (
+; EFI_HANDLE ImageHandle, // rcx
+; EFI_SYSTEM_TABLE *SystemTable, // rdx
+; VOID *KernelBootParams // r8
+; VOID *KernelStart, // r9
+; );
+;------------------------------------------------------------------------------
+JumpToUefiKernel PROC
+
+ mov rdi, rcx
+ mov rsi, rdx
+ mov rdx, r8
+ xor rax, rax
+ mov eax, [r8 + 264h]
+ add r9, rax
+ add r9, 200h
+ call r9
+ ret
+
+JumpToUefiKernel ENDP
+
END
|