NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ote_ext_nv.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2016, NVIDIA CORPORATION. All rights reserved
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files
6  * (the "Software"), to deal in the Software without restriction,
7  * including without limitation the rights to use, copy, modify, merge,
8  * publish, distribute, sublicense, and/or sell copies of the Software,
9  * and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be
13  * included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  */
23 
39 #ifndef __OTE_EXT_NV_H
40 #define __OTE_EXT_NV_H
41 
42 #include <common/ote_common.h>
43 #include <common/ote_ioctl.h>
44 
46 typedef enum {
54 
57 typedef struct {
58  uint32_t id;
59  void *addr;
62 
65 typedef struct {
66  void *vaddr;
67  uint64_t paddr;
70 
73 typedef struct {
74  void *vaddr;
75  uint32_t length;
76  uint32_t op;
79 
81 typedef enum {
87 
114  uint32_t length);
115 
136 te_error_t te_ext_nv_virt_to_phys(void *addr, uint64_t *paddr);
137 
138 #ifdef CONFIG_TRUSTY
139 
165 te_error_t te_ext_trusty_prepare_dma(void *addr, uint64_t *paddr, uint32_t size, bool write);
166 
182 long te_ext_trusty_finish_dma(void *regs, uint32_t size, bool write);
183 
184 #endif
185 
208 te_error_t te_ext_nv_get_map_addr(uint32_t id, void **addr);
209 
210 #ifdef CONFIG_TRUSTY
211 
236 te_error_t te_ext_nv_get_map_addr_trusty(uint32_t id, void **addr, uint32_t size);
237 
246 long te_ext_nv_get_unmap_addr_trusty(void *regs, uint32_t size);
247 
248 #endif
249 
252 #endif
uint32_t op
Holds the operation; see te_ext_nv_cache_maint_op_t.
Definition: ote_ext_nv.h:76
Holds an op code and data used to for cache maintenance.
Definition: ote_ext_nv.h:73
uint64_t paddr
Holds a pointer to the corresponding physical address.
Definition: ote_ext_nv.h:67
void * vaddr
Holds a pointer to the virtual address.
Definition: ote_ext_nv.h:66
Cache clean operation.
Definition: ote_ext_nv.h:48
Holds a pointer to the physical address for a specific virtual address.
Definition: ote_ext_nv.h:65
te_error_t te_ext_nv_cache_maint(te_ext_nv_cache_maint_op_t op, void *addr, uint32_t length)
Performs a cache maintenance operation.
uint32_t id
Holds the OTE_CONFIG_MAP_MEM ID value.
Definition: ote_ext_nv.h:58
void * vaddr
Holds a pointer to the virtual address.
Definition: ote_ext_nv.h:74
NVIDIA Trusted Little Kernel Interface: Common Declarations
Cache invalidate operation.
Definition: ote_ext_nv.h:50
Bit to enable CPC rollback protection support.
Definition: ote_ext_nv.h:85
void * addr
Holds a pointer to the corresponding address of mapping.
Definition: ote_ext_nv.h:59
Cache flush operation.
Definition: ote_ext_nv.h:52
te_ext_nv_cache_maint_op_t
Defines cache maintenance operations.
Definition: ote_ext_nv.h:46
te_error_t te_ext_nv_virt_to_phys(void *addr, uint64_t *paddr)
Performs virtual-to-physical address translation.
te_error_t te_ext_nv_get_map_addr(uint32_t id, void **addr)
Retrieves mapping of a specified memory range.
uint32_t length
Holds the length of the address space.
Definition: ote_ext_nv.h:75
te_error_t
Defines Open Trusted Environment (OTE) error codes.
Definition: ote_error.h:45
te_ss_config_option_t
Bit mask defines for secure storage configuration options.
Definition: ote_ext_nv.h:81
Bit to enable RPMB rollback protection support.
Definition: ote_ext_nv.h:83
Holds a pointer to the map memory for a specific OTE_CONFIG_MAP_MEM ID value.
Definition: ote_ext_nv.h:57