Lines Matching full:entry
25 * @name Bit shifts and masks for MPU entry registers.
31 * Number of bits to shift for start address in MPU entry register.
33 * This is only used for aligning the value to the MPU entry register,
39 * Bit mask of start address in MPU entry register.
41 * This is only used for aligning the value to the MPU entry register,
46 /** Number of bits to shift for enable bit in MPU entry register. */
49 /** Bit mask of enable bit in MPU entry register. */
52 /** Number of bits to shift for lock bit in MPU entry register. */
55 /** Bit mask of lock bit in MPU entry register. */
58 /** Number of bits to shift for access rights in MPU entry register. */
61 /** Bit mask of access rights in MPU entry register. */
65 /** Number of bits to shift for memory type in MPU entry register. */
68 /** Bit mask of memory type in MPU entry register. */
72 /** Bit mask for foreground entry returned by probing. */
75 /** Bit mask for background entry returned by probing. */
78 /** Bit mask used to determine if entry is valid returned by probing. */
104 * Define one MPU entry of type struct xtensa_mpu_entry.
171 * @brief Probe for protection TLB entry from an address.
186 * @name MPU entry internal helper functions.
192 * @brief Return the start address encoded in the MPU entry.
194 * @param entry Pointer to the MPU entry.
199 uintptr_t xtensa_mpu_entry_start_address_get(const struct xtensa_mpu_entry *entry) in xtensa_mpu_entry_start_address_get() argument
201 return (entry->as.p.start_addr << XTENSA_MPU_ENTRY_REG_START_ADDR_SHIFT); in xtensa_mpu_entry_start_address_get()
205 * @brief Set the start address encoded in the MPU entry.
207 * @param entry Pointer to the MPU entry.
211 void xtensa_mpu_entry_start_address_set(struct xtensa_mpu_entry *entry, uintptr_t addr) in xtensa_mpu_entry_start_address_set() argument
213 entry->as.p.start_addr = addr >> XTENSA_MPU_ENTRY_REG_START_ADDR_SHIFT; in xtensa_mpu_entry_start_address_set()
217 * @brief Return the lock bit encoded in the MPU entry.
219 * @param entry Pointer to the MPU entry.
225 bool xtensa_mpu_entry_lock_get(const struct xtensa_mpu_entry *entry) in xtensa_mpu_entry_lock_get() argument
227 return entry->as.p.lock != 0; in xtensa_mpu_entry_lock_get()
231 * @brief Set the lock bit encoded in the MPU entry.
233 * @param entry Pointer to the MPU entry.
234 * @param lock True if to lock the MPU entry.
237 void xtensa_mpu_entry_lock_set(struct xtensa_mpu_entry *entry, bool lock) in xtensa_mpu_entry_lock_set() argument
239 entry->as.p.lock = lock ? 1 : 0; in xtensa_mpu_entry_lock_set()
243 * @brief Return the enable bit encoded in the MPU entry.
245 * @param entry Pointer to the MPU entry.
251 bool xtensa_mpu_entry_enable_get(const struct xtensa_mpu_entry *entry) in xtensa_mpu_entry_enable_get() argument
253 return entry->as.p.enable != 0; in xtensa_mpu_entry_enable_get()
257 * @brief Set the enable bit encoded in the MPU entry.
259 * @param entry Pointer to the MPU entry.
260 * @param en True if to enable the MPU entry.
263 void xtensa_mpu_entry_enable_set(struct xtensa_mpu_entry *entry, bool en) in xtensa_mpu_entry_enable_set() argument
265 entry->as.p.enable = en ? 1 : 0; in xtensa_mpu_entry_enable_set()
269 * @brief Return the access rights encoded in the MPU entry.
271 * @param entry Pointer to the MPU entry.
276 uint8_t xtensa_mpu_entry_access_rights_get(const struct xtensa_mpu_entry *entry) in xtensa_mpu_entry_access_rights_get() argument
278 return entry->at.p.access_rights; in xtensa_mpu_entry_access_rights_get()
282 * @brief Set the lock bit encoded in the MPU entry.
284 * @param entry Pointer to the MPU entry.
288 void xtensa_mpu_entry_access_rights_set(struct xtensa_mpu_entry *entry, uint8_t access_rights) in xtensa_mpu_entry_access_rights_set() argument
290 entry->at.p.access_rights = access_rights; in xtensa_mpu_entry_access_rights_set()
294 * @brief Return the memory type encoded in the MPU entry.
296 * @param entry Pointer to the MPU entry.
301 uint16_t xtensa_mpu_entry_memory_type_get(const struct xtensa_mpu_entry *entry) in xtensa_mpu_entry_memory_type_get() argument
303 return entry->at.p.memory_type; in xtensa_mpu_entry_memory_type_get()
307 * @brief Set the memory type in the MPU entry.
309 * @param entry Pointer to the MPU entry.
313 void xtensa_mpu_entry_memory_type_set(struct xtensa_mpu_entry *entry, uint16_t memory_type) in xtensa_mpu_entry_memory_type_set() argument
315 entry->at.p.memory_type = memory_type; in xtensa_mpu_entry_memory_type_set()
319 * @brief Set both access rights and memory type of a MPU entry.
321 * @param entry Pointer to the MPU entry.
326 void xtensa_mpu_entry_attributes_set(struct xtensa_mpu_entry *entry, in xtensa_mpu_entry_attributes_set() argument
329 xtensa_mpu_entry_access_rights_set(entry, access_rights); in xtensa_mpu_entry_attributes_set()
330 xtensa_mpu_entry_memory_type_set(entry, memory_type); in xtensa_mpu_entry_attributes_set()
334 * @brief Set fields in MPU entry so it will be functional.
337 * of an entry.
341 * @param entry Pointer to the entry to be manipulated.
343 * @param enable Whether this entry should be enabled.
344 * @param access_rights Access rights for the entry.
345 * @param memory_type Memory type for the entry.
348 void xtensa_mpu_entry_set(struct xtensa_mpu_entry *entry, uintptr_t start_address, in xtensa_mpu_entry_set() argument
351 uint8_t segment = entry->at.p.segment; in xtensa_mpu_entry_set()
354 entry->as.raw = 0; in xtensa_mpu_entry_set()
355 entry->at.raw = 0; in xtensa_mpu_entry_set()
357 xtensa_mpu_entry_start_address_set(entry, start_address); in xtensa_mpu_entry_set()
358 xtensa_mpu_entry_enable_set(entry, enable); in xtensa_mpu_entry_set()
359 xtensa_mpu_entry_access_rights_set(entry, access_rights); in xtensa_mpu_entry_set()
360 xtensa_mpu_entry_memory_type_set(entry, memory_type); in xtensa_mpu_entry_set()
362 entry->at.p.segment = segment; in xtensa_mpu_entry_set()
368 * @param entry1 MPU entry #1
369 * @param entry2 MPU entry #2.
383 * @param entry1 MPU entry #1.
384 * @param entry2 MPU entry #2.
398 * @param entry1 MPU entry #1.
399 * @param entry2 MPU entry #2.
414 * @param entry1 MPU entry #1.
415 * @param entry2 MPU entry #2.