1 /*
2  * Copyright (c) 2023-2024, Arm Limited. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  * \file tram_drv.h
19  * \brief Driver for Arm TRAM.
20  */
21 
22 #ifndef __TRAM_DRV_H__
23 #define __TRAM_DRV_H__
24 
25 #include <stdint.h>
26 #include <stddef.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /**
33  * \brief ARM TRAM device configuration structure
34  */
35 struct tram_dev_cfg_t {
36     const uint32_t base;                         /*!< TRAM base address */
37 };
38 
39 /**
40  * \brief ARM TRAM device structure
41  */
42 struct tram_dev_t {
43     const struct tram_dev_cfg_t *const cfg;       /*!< TRAM configuration */
44 };
45 
46 void tram_set_key(struct tram_dev_t *dev, const uint32_t *key);
47 void tram_wipe_key(struct tram_dev_t *dev);
48 
49 void tram_enable_encryption(struct tram_dev_t *dev);
50 void tram_disable_encryption(struct tram_dev_t *dev);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif /* __TRAM_DRV_H__ */
57