blob: 174b3eb18062708c2d3ddd6b16521a19857d0e65 [file] [log] [blame]
Jeenu Viswambharan2de81532018-02-16 11:54:24 +00001/*
Antonio Nino Diaz4586d1c2019-02-08 13:10:45 +00002 * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
Jeenu Viswambharan2de81532018-02-16 11:54:24 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaza884dfb2019-02-08 13:20:37 +00007#ifndef SETJMP__H
8#define SETJMP__H
Jeenu Viswambharan2de81532018-02-16 11:54:24 +00009
10#define JMP_CTX_X19 0x0
11#define JMP_CTX_X21 0x10
12#define JMP_CTX_X23 0x20
13#define JMP_CTX_X25 0x30
14#define JMP_CTX_X27 0x40
15#define JMP_CTX_X29 0x50
16#define JMP_CTX_SP 0x60
Antonio Nino Diaz4586d1c2019-02-08 13:10:45 +000017#define JMP_CTX_END 0x70 /* Aligned to 16 bytes */
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000018
19#define JMP_SIZE (JMP_CTX_END >> 3)
20
21#ifndef __ASSEMBLY__
22
Antonio Nino Diaz4586d1c2019-02-08 13:10:45 +000023#include <cdefs.h>
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000024
25/* Jump buffer hosting x18 - x30 and sp_el0 registers */
Antonio Nino Diaz4586d1c2019-02-08 13:10:45 +000026typedef uint64_t jmp_buf[JMP_SIZE] __aligned(16);
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000027
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000028#endif /* __ASSEMBLY__ */
Antonio Nino Diaza884dfb2019-02-08 13:20:37 +000029
30#endif /* SETJMP__H */