1 /*
2 * Copyright 2016, General Dynamics C4 Systems
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 */
6
7 #pragma once
8
9 #include <types.h>
10 #include <api/failures.h>
11 #include <object/structures.h>
12
13 #ifdef CONFIG_TK1_SMMU
14
15 seL4_SlotRegion create_iospace_caps(cap_t root_cnode_cap);
16 exception_t decodeARMIOPTInvocation(word_t invLabel, uint32_t length, cte_t *slot, cap_t cap, word_t *buffer);
17 exception_t decodeARMIOMapInvocation(word_t invLabel, uint32_t length, cte_t *slot, cap_t cap, word_t *buffer);
18 exception_t performPageInvocationUnmapIO(cap_t cap, cte_t *slot);
19 exception_t decodeARMIOSpaceInvocation(word_t invLabel, cap_t cap);
20 void unmapIOPage(cap_t cap);
21 void deleteIOPageTable(cap_t cap);
22 void clearIOPageDirectory(cap_t cap);
23
24 #else
25
26 /* define dummy functions */
create_iospace_caps(cap_t root_cnode_cap)27 static inline seL4_SlotRegion create_iospace_caps(cap_t root_cnode_cap)
28 {
29 return S_REG_EMPTY;
30 }
31
decodeARMIOPTInvocation(word_t invLabel,uint32_t length,cte_t * slot,cap_t cap,word_t * buffer)32 static inline exception_t decodeARMIOPTInvocation(word_t invLabel, uint32_t length, cte_t *slot, cap_t cap,
33 word_t *buffer)
34 {
35 return EXCEPTION_NONE;
36 }
37
decodeARMIOMapInvocation(word_t invLabel,uint32_t length,cte_t * slot,cap_t cap,word_t * buffer)38 static inline exception_t decodeARMIOMapInvocation(word_t invLabel, uint32_t length, cte_t *slot, cap_t cap,
39 word_t *buffer)
40 {
41 return EXCEPTION_NONE;
42 }
43
performPageInvocationUnmapIO(cap_t cap,cte_t * slot)44 static inline exception_t performPageInvocationUnmapIO(cap_t cap, cte_t *slot)
45 {
46 return EXCEPTION_NONE;
47 }
48
decodeARMIOSpaceInvocation(word_t invLabel,cap_t cap)49 static inline exception_t decodeARMIOSpaceInvocation(word_t invLabel, cap_t cap)
50 {
51 return EXCEPTION_NONE;
52 }
53
unmapIOPage(cap_t cap)54 static inline void unmapIOPage(cap_t cap)
55 {
56 }
57
deleteIOPageTable(cap_t cap)58 static inline void deleteIOPageTable(cap_t cap)
59 {
60 }
61
clearIOPageDirectory(cap_t cap)62 static inline void clearIOPageDirectory(cap_t cap)
63 {
64 }
65
66 #endif /* end of !CONFIG_TK1_SMMU */
67
68
69