Merge tag 'efi-2020-07-rc6' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
[oweals/u-boot.git] / arch / arm / include / asm / setjmp.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
4  * (C) Copyright 2016 Alexander Graf <agraf@suse.de>
5  */
6
7 #ifndef _SETJMP_H_
8 #define _SETJMP_H_      1
9
10 /*
11  * This really should be opaque, but the EFI implementation wrongly
12  * assumes that a 'struct jmp_buf_data' is defined.
13  */
14 struct jmp_buf_data {
15 #if defined(__aarch64__)
16         u64  regs[13];
17 #else
18         u32  regs[10];  /* r4-r9, sl, fp, sp, lr */
19 #endif
20 };
21
22 typedef struct jmp_buf_data jmp_buf[1];
23
24 int setjmp(jmp_buf jmp);
25 void longjmp(jmp_buf jmp, int ret);
26
27 #endif /* _SETJMP_H_ */