summaryrefslogtreecommitdiff
path: root/inc/x86_64
diff options
context:
space:
mode:
authorNigel Croxon <nigel.croxon@hp.com>2015-05-14 12:20:51 -0400
committerNigel Croxon <nigel.croxon@hp.com>2015-05-14 12:20:51 -0400
commitdae0b4b0b0d522caecf09123db2cf0250c37a169 (patch)
tree49c17a320e3d6ed2b2fe1e6d4a9929e7bf35e4c4 /inc/x86_64
parentb5a8e93cec396381a6d2beee022abbf50100f2fd (diff)
downloadgnu-efi-dae0b4b0b0d522caecf09123db2cf0250c37a169.tar.gz
Turns out we actually need setjmp in one of gnu-efi's prominent
users, and it seems to make more sense to put it here than in the application. All of these are derived from the Tiano code, but I re-wrote the x86_64 one because we use the ELF psABI calling conventions instead of the MS ABI calling conventions. Which is to say you probably shouldn't setjmp()/longjmp() between functions with EFIAPI (aka __attribute__((ms_abi))) and those without. Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
Diffstat (limited to 'inc/x86_64')
-rw-r--r--inc/x86_64/efisetjmp_arch.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/inc/x86_64/efisetjmp_arch.h b/inc/x86_64/efisetjmp_arch.h
new file mode 100644
index 0000000..ce4e393
--- /dev/null
+++ b/inc/x86_64/efisetjmp_arch.h
@@ -0,0 +1,20 @@
+#ifndef GNU_EFI_X86_64_SETJMP_H
+#define GNU_EFI_X86_64_SETJMP_H
+
+typedef struct {
+ UINT64 Rbx;
+ UINT64 Rsp;
+ UINT64 Rbp;
+
+ UINT64 Rdi;
+ UINT64 Rsi;
+ UINT64 R12;
+ UINT64 R13;
+ UINT64 R14;
+ UINT64 R15;
+ UINT64 Rip;
+ UINT64 MxCsr;
+ UINT8 XmmBuffer[160]; // XMM6 - XMM15
+} __attribute__((__aligned__(8))) jmp_buf;
+
+#endif /* GNU_EFI_X86_64_SETJMP_H */