Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 1 | /* |
| 2 | * SPDX-License-Identifier: BSD-3-Clause |
| 3 | * SPDX-FileCopyrightText: Copyright TF-RMM Contributors. |
| 4 | */ |
| 5 | |
| 6 | #include <arch.h> |
| 7 | #include <arch_helpers.h> |
| 8 | #include <assert.h> |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 9 | #include <buffer.h> |
Javier Almansa Sobrino | 68a593a | 2022-07-25 09:35:32 +0100 | [diff] [blame] | 10 | #include <buffer_private.h> |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 11 | #include <cpuid.h> |
| 12 | #include <debug.h> |
| 13 | #include <errno.h> |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 14 | #include <granule.h> |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 15 | #include <slot_buf_arch.h> |
| 16 | #include <stdbool.h> |
| 17 | #include <stdint.h> |
| 18 | #include <table.h> |
| 19 | #include <xlat_contexts.h> |
| 20 | #include <xlat_tables.h> |
| 21 | |
| 22 | /* |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 23 | * All the slot buffers for a given PE must be mapped by a single translation |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 24 | * table, which means the max VA size should be <= 4KB * 512 |
| 25 | */ |
| 26 | COMPILER_ASSERT((RMM_SLOT_BUF_VA_SIZE) <= (GRANULE_SIZE * XLAT_TABLE_ENTRIES)); |
| 27 | |
| 28 | /* |
| 29 | * For all translation stages if FEAT_TTST is implemented, while |
| 30 | * the PE is executing in AArch64 state and is using 4KB |
| 31 | * translation granules, the min address space size is 64KB |
| 32 | */ |
| 33 | COMPILER_ASSERT((RMM_SLOT_BUF_VA_SIZE) >= (1 << 16U)); |
| 34 | |
| 35 | #define RMM_SLOT_BUF_MMAP MAP_REGION_TRANSIENT( \ |
| 36 | SLOT_VIRT, \ |
| 37 | RMM_SLOT_BUF_VA_SIZE, \ |
| 38 | PAGE_SIZE) |
| 39 | |
| 40 | #define SLOT_BUF_MMAP_REGIONS UL(1) |
| 41 | |
| 42 | /* |
| 43 | * Attributes for a buffer slot page descriptor. |
| 44 | * Note that the AF bit on the descriptor is handled by the translation |
| 45 | * library (it assumes that access faults are not handled) so it does not |
| 46 | * need to be specified here. |
| 47 | */ |
Javier Almansa Sobrino | 765a316 | 2023-04-27 17:42:58 +0100 | [diff] [blame] | 48 | #define SLOT_DESC_ATTR (MT_RW_DATA | MT_NG) |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 49 | |
| 50 | /* |
| 51 | * The base tables for all the contexts are manually allocated as a continous |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 52 | * block of memory (one L3 table per PE). |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 53 | */ |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 54 | static uint64_t slot_buf_s1tt[XLAT_TABLE_ENTRIES * MAX_CPUS] |
| 55 | __aligned(XLAT_TABLES_ALIGNMENT); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 56 | |
| 57 | /* Allocate per-cpu xlat_ctx_tbls */ |
| 58 | static struct xlat_ctx_tbls slot_buf_tbls[MAX_CPUS]; |
| 59 | |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 60 | /* Allocate xlat_ctx_cfg for high VA which will be common to all PEs */ |
| 61 | static struct xlat_ctx_cfg slot_buf_xlat_ctx_cfg; |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 62 | |
| 63 | /* context definition */ |
| 64 | static struct xlat_ctx slot_buf_xlat_ctx[MAX_CPUS]; |
| 65 | |
| 66 | /* |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 67 | * Allocate a cache to store the last level table info where the slot buffers |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 68 | * are mapped to avoid needing to perform a table walk every time a buffer |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 69 | * slot operation has to be done. |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 70 | */ |
Javier Almansa Sobrino | e7aa1ab | 2023-03-09 17:38:02 +0000 | [diff] [blame] | 71 | static struct xlat_llt_info llt_info_cache[MAX_CPUS]; |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 72 | |
Javier Almansa Sobrino | 68a593a | 2022-07-25 09:35:32 +0100 | [diff] [blame] | 73 | uintptr_t slot_to_va(enum buffer_slot slot) |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 74 | { |
| 75 | assert(slot < NR_CPU_SLOTS); |
| 76 | |
AlexeiFedorov | 56e1a8e | 2023-09-01 17:06:13 +0100 | [diff] [blame] | 77 | return (SLOT_VIRT + (GRANULE_SIZE * (unsigned long)slot)); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | static inline struct xlat_ctx *get_slot_buf_xlat_ctx(void) |
| 81 | { |
| 82 | return &slot_buf_xlat_ctx[my_cpuid()]; |
| 83 | } |
| 84 | |
Javier Almansa Sobrino | e7aa1ab | 2023-03-09 17:38:02 +0000 | [diff] [blame] | 85 | struct xlat_llt_info *get_cached_llt_info(void) |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 86 | { |
Javier Almansa Sobrino | e7aa1ab | 2023-03-09 17:38:02 +0000 | [diff] [blame] | 87 | return &llt_info_cache[my_cpuid()]; |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | __unused static uint64_t slot_to_descriptor(enum buffer_slot slot) |
| 91 | { |
Javier Almansa Sobrino | e7aa1ab | 2023-03-09 17:38:02 +0000 | [diff] [blame] | 92 | uint64_t *entry = xlat_get_tte_ptr(get_cached_llt_info(), |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 93 | slot_to_va(slot)); |
AlexeiFedorov | 2bdd475 | 2023-08-17 16:48:19 +0100 | [diff] [blame] | 94 | assert(entry != NULL); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 95 | |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 96 | return xlat_read_tte(entry); |
| 97 | } |
| 98 | |
| 99 | int slot_buf_coldboot_init(void) |
| 100 | { |
| 101 | static struct xlat_mmap_region slot_buf_regions[] = { |
| 102 | RMM_SLOT_BUF_MMAP, |
| 103 | }; |
| 104 | |
| 105 | /* |
| 106 | * Initialize the common configuration used for all |
| 107 | * translation contexts |
| 108 | */ |
| 109 | return xlat_ctx_cfg_init(&slot_buf_xlat_ctx_cfg, VA_HIGH_REGION, |
| 110 | &slot_buf_regions[0], 1U, |
| 111 | RMM_SLOT_BUF_VA_SIZE); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | /* |
| 115 | * Setup xlat table for slot buffer mechanism for each PE. |
| 116 | * Must be called for every PE in the system |
| 117 | */ |
| 118 | void slot_buf_setup_xlat(void) |
| 119 | { |
| 120 | unsigned int cpuid = my_cpuid(); |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 121 | struct xlat_ctx *slot_buf_ctx = get_slot_buf_xlat_ctx(); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 122 | |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 123 | /* |
| 124 | * Initialize the translation tables for the current context. |
| 125 | * This is done on the first boot of each PE. |
| 126 | */ |
| 127 | int ret = xlat_ctx_init(slot_buf_ctx, |
| 128 | &slot_buf_xlat_ctx_cfg, |
| 129 | &slot_buf_tbls[cpuid], |
| 130 | &slot_buf_s1tt[XLAT_TABLE_ENTRIES * cpuid], 1U); |
| 131 | |
| 132 | if (!((ret == 0) || (ret == -EALREADY))) { |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 133 | /* |
| 134 | * If the context was already created, carry on with the |
| 135 | * initialization. If it cannot be created, panic. |
| 136 | */ |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 137 | ERROR("%s (%u): Failed to initialize the xlat context for the slot buffers (-%i)\n", |
| 138 | __func__, __LINE__, ret); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 139 | panic(); |
| 140 | } |
| 141 | |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 142 | /* Configure MMU registers */ |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 143 | if (xlat_arch_setup_mmu_cfg(get_slot_buf_xlat_ctx())) { |
| 144 | ERROR("%s (%u): MMU registers failed to initialize\n", |
| 145 | __func__, __LINE__); |
| 146 | panic(); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | /* |
| 151 | * Finishes initializing the slot buffer mechanism. |
| 152 | * This function must be called after the MMU is enabled. |
| 153 | */ |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 154 | void slot_buf_finish_warmboot_init(void) |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 155 | { |
Javier Almansa Sobrino | ed93259 | 2023-01-24 12:50:41 +0000 | [diff] [blame] | 156 | assert(is_mmu_enabled() == true); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 157 | |
| 158 | /* |
| 159 | * Initialize (if not done yet) the internal cache with the last level |
| 160 | * translation table that holds the MMU descriptors for the slot |
| 161 | * buffers, so we can access them faster when we need to map/unmap. |
| 162 | */ |
Javier Almansa Sobrino | e7aa1ab | 2023-03-09 17:38:02 +0000 | [diff] [blame] | 163 | if ((get_cached_llt_info())->table == NULL) { |
| 164 | if (xlat_get_llt_from_va(get_cached_llt_info(), |
| 165 | get_slot_buf_xlat_ctx(), |
| 166 | slot_to_va(SLOT_NS)) != 0) { |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 167 | ERROR("%s (%u): Failed to initialize table entry cache for CPU %u\n", |
| 168 | __func__, __LINE__, my_cpuid()); |
| 169 | panic(); |
| 170 | |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | /* |
| 176 | * Buffer slots are intended to be transient, and should not be live at |
| 177 | * entry/exit of the RMM. |
| 178 | */ |
| 179 | void assert_cpu_slots_empty(void) |
| 180 | { |
AlexeiFedorov | b80042d | 2023-08-25 12:02:24 +0100 | [diff] [blame] | 181 | for (unsigned int i = 0U; i < (unsigned int)NR_CPU_SLOTS; i++) { |
AlexeiFedorov | 0b67df8 | 2023-08-29 15:16:06 +0100 | [diff] [blame] | 182 | assert(slot_to_descriptor((enum buffer_slot)i) == |
| 183 | TRANSIENT_DESC); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 184 | } |
| 185 | } |
| 186 | |
| 187 | static inline bool is_ns_slot(enum buffer_slot slot) |
| 188 | { |
| 189 | return slot == SLOT_NS; |
| 190 | } |
| 191 | |
| 192 | static inline bool is_realm_slot(enum buffer_slot slot) |
| 193 | { |
| 194 | return (slot != SLOT_NS) && (slot < NR_CPU_SLOTS); |
| 195 | } |
| 196 | |
| 197 | static void *ns_granule_map(enum buffer_slot slot, struct granule *granule) |
| 198 | { |
| 199 | unsigned long addr = granule_addr(granule); |
| 200 | |
| 201 | assert(is_ns_slot(slot)); |
Javier Almansa Sobrino | d528efd | 2023-01-05 16:23:54 +0000 | [diff] [blame] | 202 | return buffer_arch_map(slot, addr); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 203 | } |
| 204 | |
Javier Almansa Sobrino | bb66f8a | 2023-01-05 16:43:43 +0000 | [diff] [blame] | 205 | static inline void ns_buffer_unmap(void *buf) |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 206 | { |
Javier Almansa Sobrino | bb66f8a | 2023-01-05 16:43:43 +0000 | [diff] [blame] | 207 | buffer_arch_unmap(buf); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | /* |
| 211 | * Maps a granule @g into the provided @slot, returning |
| 212 | * the virtual address. |
| 213 | * |
| 214 | * The caller must either hold @g::lock or hold a reference. |
| 215 | */ |
| 216 | void *granule_map(struct granule *g, enum buffer_slot slot) |
| 217 | { |
| 218 | unsigned long addr = granule_addr(g); |
| 219 | |
| 220 | assert(is_realm_slot(slot)); |
| 221 | |
Javier Almansa Sobrino | d528efd | 2023-01-05 16:23:54 +0000 | [diff] [blame] | 222 | return buffer_arch_map(slot, addr); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | void buffer_unmap(void *buf) |
| 226 | { |
| 227 | buffer_arch_unmap(buf); |
| 228 | } |
| 229 | |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 230 | /* |
| 231 | * Map a Non secure granule @g into the slot @slot and read data from |
| 232 | * this granule to @dest. Unmap the granule once the read is done. |
| 233 | * |
| 234 | * It returns 'true' on success or `false` if not all data are copied. |
| 235 | * Only the least significant bits of @offset are considered, which allows the |
| 236 | * full PA of a non-granule aligned buffer to be used for the @offset parameter. |
| 237 | */ |
| 238 | bool ns_buffer_read(enum buffer_slot slot, |
| 239 | struct granule *ns_gr, |
| 240 | unsigned int offset, |
AlexeiFedorov | 4faab85 | 2023-08-30 15:06:49 +0100 | [diff] [blame] | 241 | size_t size, |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 242 | void *dest) |
| 243 | { |
| 244 | uintptr_t src; |
| 245 | bool retval; |
| 246 | |
| 247 | assert(is_ns_slot(slot)); |
| 248 | assert(ns_gr != NULL); |
Javier Almansa Sobrino | 1948e69 | 2023-01-16 17:10:38 +0000 | [diff] [blame] | 249 | assert(dest != NULL); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 250 | |
| 251 | /* |
| 252 | * To simplify the trapping mechanism around NS access, |
| 253 | * memcpy_ns_read uses a single 8-byte LDR instruction and |
| 254 | * all parameters must be aligned accordingly. |
| 255 | */ |
AlexeiFedorov | b80042d | 2023-08-25 12:02:24 +0100 | [diff] [blame] | 256 | assert(ALIGNED(size, 8U)); |
| 257 | assert(ALIGNED(offset, 8U)); |
| 258 | assert(ALIGNED(dest, 8U)); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 259 | |
AlexeiFedorov | 0b67df8 | 2023-08-29 15:16:06 +0100 | [diff] [blame] | 260 | offset &= (unsigned int)(~GRANULE_MASK); |
| 261 | assert((offset + size) <= GRANULE_SIZE); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 262 | |
Javier Almansa Sobrino | bb66f8a | 2023-01-05 16:43:43 +0000 | [diff] [blame] | 263 | src = (uintptr_t)ns_granule_map(slot, ns_gr); |
| 264 | retval = memcpy_ns_read(dest, (void *)(src + offset), size); |
| 265 | ns_buffer_unmap((void *)src); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 266 | |
| 267 | return retval; |
| 268 | } |
| 269 | |
| 270 | /* |
| 271 | * Map a Non secure granule @g into the slot @slot and write data from |
| 272 | * this granule to @dest. Unmap the granule once the write is done. |
| 273 | * |
| 274 | * It returns 'true' on success or `false` if not all data are copied. |
| 275 | * Only the least significant bits of @offset are considered, which allows the |
| 276 | * full PA of a non-granule aligned buffer to be used for the @offset parameter. |
| 277 | */ |
| 278 | bool ns_buffer_write(enum buffer_slot slot, |
| 279 | struct granule *ns_gr, |
| 280 | unsigned int offset, |
AlexeiFedorov | 4faab85 | 2023-08-30 15:06:49 +0100 | [diff] [blame] | 281 | size_t size, |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 282 | void *src) |
| 283 | { |
| 284 | uintptr_t dest; |
| 285 | bool retval; |
| 286 | |
| 287 | assert(is_ns_slot(slot)); |
| 288 | assert(ns_gr != NULL); |
Javier Almansa Sobrino | 1948e69 | 2023-01-16 17:10:38 +0000 | [diff] [blame] | 289 | assert(src != NULL); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 290 | |
| 291 | /* |
| 292 | * To simplify the trapping mechanism around NS access, |
| 293 | * memcpy_ns_write uses a single 8-byte STR instruction and |
| 294 | * all parameters must be aligned accordingly. |
| 295 | */ |
AlexeiFedorov | b80042d | 2023-08-25 12:02:24 +0100 | [diff] [blame] | 296 | assert(ALIGNED(size, 8U)); |
| 297 | assert(ALIGNED(offset, 8U)); |
| 298 | assert(ALIGNED(src, 8U)); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 299 | |
AlexeiFedorov | 0b67df8 | 2023-08-29 15:16:06 +0100 | [diff] [blame] | 300 | offset &= (unsigned int)(~GRANULE_MASK); |
| 301 | assert((offset + size) <= GRANULE_SIZE); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 302 | |
Javier Almansa Sobrino | bb66f8a | 2023-01-05 16:43:43 +0000 | [diff] [blame] | 303 | dest = (uintptr_t)ns_granule_map(slot, ns_gr); |
| 304 | retval = memcpy_ns_write((void *)(dest + offset), src, size); |
| 305 | ns_buffer_unmap((void *)dest); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 306 | |
| 307 | return retval; |
| 308 | } |
| 309 | |
| 310 | /****************************************************************************** |
| 311 | * Internal helpers |
| 312 | ******************************************************************************/ |
| 313 | |
Javier Almansa Sobrino | d528efd | 2023-01-05 16:23:54 +0000 | [diff] [blame] | 314 | void *buffer_map_internal(enum buffer_slot slot, unsigned long addr) |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 315 | { |
| 316 | uint64_t attr = SLOT_DESC_ATTR; |
| 317 | uintptr_t va = slot_to_va(slot); |
Javier Almansa Sobrino | e7aa1ab | 2023-03-09 17:38:02 +0000 | [diff] [blame] | 318 | struct xlat_llt_info *entry = get_cached_llt_info(); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 319 | |
| 320 | assert(GRANULE_ALIGNED(addr)); |
| 321 | |
AlexeiFedorov | 0b67df8 | 2023-08-29 15:16:06 +0100 | [diff] [blame] | 322 | attr |= ((slot == SLOT_NS) ? MT_NS : MT_REALM); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 323 | |
| 324 | if (xlat_map_memory_page_with_attrs(entry, va, |
| 325 | (uintptr_t)addr, attr) != 0) { |
| 326 | /* Error mapping the buffer */ |
| 327 | return NULL; |
| 328 | } |
| 329 | |
| 330 | return (void *)va; |
| 331 | } |
| 332 | |
| 333 | void buffer_unmap_internal(void *buf) |
| 334 | { |
AlexeiFedorov | 44a76a3 | 2023-08-29 16:53:26 +0100 | [diff] [blame] | 335 | int ret __unused; |
| 336 | |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 337 | /* |
| 338 | * Prevent the compiler from moving prior loads/stores to buf after the |
| 339 | * update to the translation table. Otherwise, those could fault. |
| 340 | */ |
| 341 | COMPILER_BARRIER(); |
| 342 | |
AlexeiFedorov | 44a76a3 | 2023-08-29 16:53:26 +0100 | [diff] [blame] | 343 | ret = xlat_unmap_memory_page(get_cached_llt_info(), (uintptr_t)buf); |
| 344 | assert(ret == 0); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 345 | } |