blob: c8d577fe42e347f3173ffe406267bfbe06252bc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
* Copyright (c) 2019-2023, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PAUTH_H
#define PAUTH_H
#include <stdbool.h>
#include <stdint.h>
#ifdef __aarch64__
/* Initialize 128-bit ARMv8.3-PAuth key */
uint128_t init_apkey(void);
/* Program APIAKey_EL1 key and enable ARMv8.3-PAuth */
void pauth_init_enable(void);
/* Disable ARMv8.3-PAuth */
void pauth_disable(void);
/*
* Fill Pauth Keys and template with random values if keys werenot initialized earlier,
* Else Copy PAuth key registers to template.
*/
void pauth_test_lib_fill_regs_and_template(void);
/* Read and Compare PAuth registers with provided template values. */
bool pauth_test_lib_compare_template(void);
/* Read and Store PAuth registers in template. */
void pauth_test_lib_read_keys(void);
/* Test PAuth instructions. */
void pauth_test_lib_test_intrs(void);
#endif /* __aarch64__ */
#endif /* PAUTH_H */
|