Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pac.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 BayLibre SAS
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
13
14#ifndef ZEPHYR_INCLUDE_ARCH_ARM64_PAC_H_
15#define ZEPHYR_INCLUDE_ARCH_ARM64_PAC_H_
16
18
19#include <zephyr/types.h>
20
21/* Forward declaration */
22struct k_thread;
23
29struct pac_key {
30 uint64_t lo; /* Low 64 bits of key */
31 uint64_t hi; /* High 64 bits of key */
32};
33
43struct pac_keys {
44 union {
45 struct {
46 struct pac_key apia; /* Instruction Pointer Authentication Key A */
47 struct pac_key apib; /* Instruction Pointer Authentication Key B */
48 struct pac_key apda; /* Data Pointer Authentication Key A */
49 struct pac_key apdb; /* Data Pointer Authentication Key B */
50 struct pac_key apga; /* Generic Authentication Key */
51 };
52 uint8_t raw_bytes[5 * 2 * 8]; /* 5 keys × 2 (hi/lo) × 8 bytes = 80 bytes */
53 };
54};
55
61void z_arm64_pac_keys_generate(struct pac_keys *keys);
62
68void z_arm64_pac_keys_save(struct pac_keys *keys);
69
75void z_arm64_pac_keys_restore(const struct pac_keys *keys);
76
85void z_arm64_pac_thread_context_switch(struct k_thread *new_thread, struct k_thread *old_thread);
86
88
89#endif /* ZEPHYR_INCLUDE_ARCH_ARM64_PAC_H_ */
irp hi
Definition asm-macro-32-bit-gnu.h:10
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Thread Structure.
Definition thread.h:259