Lines Matching full:base
44 uint64_t base;
53 static inline uint32_t tzc_read_build_config(uint64_t base)
55 return mmio_read_32(base + BUILD_CONFIG_OFF);
58 static inline uint32_t tzc_read_gate_keeper(uint64_t base)
60 return mmio_read_32(base + GATE_KEEPER_OFF);
63 static inline void tzc_write_gate_keeper(uint64_t base, uint32_t val)
65 mmio_write_32(base + GATE_KEEPER_OFF, val);
68 static inline void tzc_write_action(uint64_t base, tzc_action_t action)
70 mmio_write_32(base + ACTION_OFF, action);
73 static inline void tzc_write_region_base_low(uint64_t base,
77 mmio_write_32(base + REGION_BASE_LOW_OFF +
81 static inline void tzc_write_region_base_high(uint64_t base,
85 mmio_write_32(base + REGION_BASE_HIGH_OFF +
89 static inline void tzc_write_region_top_low(uint64_t base,
93 mmio_write_32(base + REGION_TOP_LOW_OFF +
97 static inline void tzc_write_region_top_high(uint64_t base,
101 mmio_write_32(base + REGION_TOP_HIGH_OFF +
105 static inline void tzc_write_region_attributes(uint64_t base,
109 mmio_write_32(base + REGION_ATTRIBUTES_OFF +
113 static inline void tzc_write_region_id_access(uint64_t base,
117 mmio_write_32(base + REGION_ID_ACCESS_OFF +
121 static uint32_t tzc_read_component_id(uint64_t base)
125 id = mmio_read_8(base + CID0_OFF);
126 id |= (mmio_read_8(base + CID1_OFF) << 8);
127 id |= (mmio_read_8(base + CID2_OFF) << 16);
128 id |= (mmio_read_8(base + CID3_OFF) << 24);
133 static uint32_t tzc_get_gate_keeper(uint64_t base, uint8_t filter)
137 tmp = (tzc_read_gate_keeper(base) >> GATE_KEEPER_OS_SHIFT) &
144 static void tzc_set_gate_keeper(uint64_t base, uint8_t filter, uint32_t val)
149 tmp = (tzc_read_gate_keeper(base) >> GATE_KEEPER_OS_SHIFT) &
157 tzc_write_gate_keeper(base, (tmp & GATE_KEEPER_OR_MASK) <<
161 while (((tzc_read_gate_keeper(base) >> GATE_KEEPER_OS_SHIFT) &
167 void tzc_init(uint64_t base)
171 assert(base);
172 tzc.base = base;
178 tzc_id = tzc_read_component_id(tzc.base);
185 tzc_build = tzc_read_build_config(tzc.base);
211 assert(tzc.base);
234 tzc_write_region_base_low(tzc.base, region,
236 tzc_write_region_base_high(tzc.base, region,
239 tzc_write_region_top_low(tzc.base, region,
241 tzc_write_region_top_high(tzc.base, region,
245 tzc_write_region_attributes(tzc.base, region,
252 tzc_write_region_id_access(tzc.base, region, ns_device_access);
258 assert(tzc.base);
265 tzc_write_action(tzc.base, action);
274 assert(tzc.base);
277 state = tzc_get_gate_keeper(tzc.base, filter);
290 tzc_set_gate_keeper(tzc.base, filter, 1);
299 assert(tzc.base);
306 tzc_set_gate_keeper(tzc.base, filter, 0);