- Timestamp:
- 2018-05-17T13:46:56Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4f8772d4
- Parents:
- 7c3fb9b
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-16 18:44:36)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-17 13:46:56)
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/arch/barrier.h
r7c3fb9b r6ff23ff 49 49 50 50 #if defined PROCESSOR_ARCH_armv7_a 51 /* ARMv7 uses instructions for memory barriers see ARM Architecture reference 51 /* 52 * ARMv7 uses instructions for memory barriers see ARM Architecture reference 52 53 * manual for details: 53 54 * DMB: ch. A8.8.43 page A8-376 … … 69 70 * ARM Architecture Reference Manual version I ch. B.3.2.1 p. B3-4 70 71 */ 71 /* ARMv6- use system control coprocessor (CP15) for memory barrier instructions. 72 /* 73 * ARMv6- use system control coprocessor (CP15) for memory barrier instructions. 72 74 * Although at least mcr p15, 0, r0, c7, c10, 4 is mentioned in earlier archs, 73 75 * CP15 implementation is mandatory only for armv6+. … … 86 88 #endif 87 89 #else 88 /* Older manuals mention syscalls as a way to implement cache coherency and 90 /* 91 * Older manuals mention syscalls as a way to implement cache coherency and 89 92 * barriers. See for example ARM Architecture Reference Manual Version D 90 93 * chapter 2.7.4 Prefetching and self-modifying code (p. A2-28) … … 123 126 inst_barrier(); /* Wait for Inst refetch */\ 124 127 } while (0) 125 /* @note: Cache type register is not available in uspace. We would need 126 * to export the cache line value, or use syscall for uspace smc_coherence */ 128 /* 129 * @note: Cache type register is not available in uspace. We would need 130 * to export the cache line value, or use syscall for uspace smc_coherence 131 */ 127 132 #define smc_coherence_block(a, l) \ 128 133 do { \ -
kernel/arch/arm32/src/fpu_context.c
r7c3fb9b r6ff23ff 117 117 static int fpu_have_coprocessor_access(void) 118 118 { 119 /*120 * The register containing the information (CPACR) is not available on armv6- 121 * rely on user decision to use CONFIG_FPU.122 */119 /* 120 * The register containing the information (CPACR) is not available 121 * on armv6-. Rely on user decision to use CONFIG_FPU. 122 */ 123 123 #ifdef PROCESSOR_ARCH_armv7_a 124 124 const uint32_t cpacr = CPACR_read(); 125 /* FPU needs access to coprocessor 10 and 11. 126 * Moreover they need to have same access enabled */ 125 /* 126 * FPU needs access to coprocessor 10 and 11. 127 * Moreover, they need to have same access enabled 128 */ 127 129 if (((cpacr & CPACR_CP_MASK(10)) != CPACR_CP_FULL_ACCESS(10)) && 128 130 ((cpacr & CPACR_CP_MASK(11)) != CPACR_CP_FULL_ACCESS(11))) { … … 131 133 } 132 134 #endif 135 133 136 return 1; 134 137 } … … 147 150 static void fpu_enable_coprocessor_access(void) 148 151 { 149 /*150 * The register containing the information (CPACR) is not available on armv6- 151 * rely on user decision to use CONFIG_FPU.152 */152 /* 153 * The register containing the information (CPACR) is not available 154 * on armv6-. Rely on user decision to use CONFIG_FPU. 155 */ 153 156 #ifdef PROCESSOR_ARCH_armv7_a 154 157 /* Allow coprocessor access */ 155 158 uint32_t cpacr = CPACR_read(); 156 /* FPU needs access to coprocessor 10 and 11. 157 * Moreover, they need to have same access enabled */ 159 /* 160 * FPU needs access to coprocessor 10 and 11. 161 * Moreover, they need to have same access enabled 162 */ 158 163 cpacr &= ~(CPACR_CP_MASK(10) | CPACR_CP_MASK(11)); 159 164 cpacr |= (CPACR_CP_FULL_ACCESS(10) | CPACR_CP_FULL_ACCESS(11)); … … 172 177 fpexc_write(0); 173 178 fpu_enable(); 174 /* Mask all exception traps, 179 /* 180 * Mask all exception traps, 175 181 * The bits are RAZ/WI on archs that don't support fpu exc traps. 176 182 */ -
kernel/generic/src/ipc/sysipc.c
r7c3fb9b r6ff23ff 119 119 120 120 121 /* **********************************************************************121 /* 122 122 * Functions that preprocess answer before sending it to the recepient. 123 * **********************************************************************/123 */ 124 124 125 125 /** Decide if the caller (e.g. ipc_answer()) should save the old call contents … … 228 228 } 229 229 230 /* ******************************************************************************230 /* 231 231 * Functions called to process received call/answer before passing it to uspace. 232 * ******************************************************************************/232 */ 233 233 234 234 /** Do basic kernel processing of received call answer. -
kernel/generic/src/printf/printf_core.c
r7c3fb9b r6ff23ff 784 784 785 785 switch (uc) { 786 /*787 * String and character conversions.788 */786 /* 787 * String and character conversions. 788 */ 789 789 case 's': 790 790 if (qualifier == PrintfQualifierLong) … … 816 816 continue; 817 817 818 /*819 * Integer values820 */818 /* 819 * Integer values 820 */ 821 821 case 'P': 822 822 /* Pointer */ … … 848 848 break; 849 849 850 /* Percentile itself */851 850 case '%': 851 /* Percentile itself */ 852 852 j = i; 853 853 continue; 854 854 855 /*856 * Bad formatting.857 */855 /* 856 * Bad formatting. 857 */ 858 858 default: 859 859 /* -
kernel/generic/src/udebug/udebug_ipc.c
r7c3fb9b r6ff23ff 54 54 { 55 55 switch (IPC_GET_ARG1(call->data)) { 56 /* future UDEBUG_M_REGS_WRITE, UDEBUG_M_MEM_WRITE: */56 /* future UDEBUG_M_REGS_WRITE, UDEBUG_M_MEM_WRITE: */ 57 57 default: 58 58 break; … … 193 193 194 194 IPC_SET_RETVAL(call->data, 0); 195 /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 196 same code in process_answer() can be used 197 (no way to distinguish method in answer) */ 195 /* 196 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 197 * same code in process_answer() can be used 198 * (no way to distinguish method in answer) 199 */ 198 200 IPC_SET_ARG1(call->data, uspace_addr); 199 201 IPC_SET_ARG2(call->data, copied); … … 238 240 239 241 IPC_SET_RETVAL(call->data, 0); 240 /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 241 same code in process_answer() can be used 242 (no way to distinguish method in answer) */ 242 /* 243 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 244 * same code in process_answer() can be used 245 * (no way to distinguish method in answer) 246 */ 243 247 IPC_SET_ARG1(call->data, uspace_addr); 244 248 IPC_SET_ARG2(call->data, to_copy); … … 285 289 286 290 IPC_SET_RETVAL(call->data, 0); 287 /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 288 same code in process_answer() can be used 289 (no way to distinguish method in answer) */ 291 /* 292 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 293 * same code in process_answer() can be used 294 * (no way to distinguish method in answer) 295 */ 290 296 IPC_SET_ARG1(call->data, uspace_addr); 291 297 IPC_SET_ARG2(call->data, to_copy); … … 326 332 327 333 IPC_SET_RETVAL(call->data, 0); 328 /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 329 same code in process_answer() can be used 330 (no way to distinguish method in answer) */ 334 /* 335 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 336 * same code in process_answer() can be used 337 * (no way to distinguish method in answer) 338 */ 331 339 IPC_SET_ARG1(call->data, uspace_addr); 332 340 IPC_SET_ARG2(call->data, 6 * sizeof(sysarg_t)); … … 367 375 368 376 IPC_SET_RETVAL(call->data, 0); 369 /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 370 same code in process_answer() can be used 371 (no way to distinguish method in answer) */ 377 /* 378 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 379 * same code in process_answer() can be used 380 * (no way to distinguish method in answer) 381 */ 372 382 IPC_SET_ARG1(call->data, uspace_addr); 373 383 IPC_SET_ARG2(call->data, to_copy); … … 406 416 407 417 IPC_SET_RETVAL(call->data, 0); 408 /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 409 same code in process_answer() can be used 410 (no way to distinguish method in answer) */ 418 /* 419 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 420 * same code in process_answer() can be used 421 * (no way to distinguish method in answer) 422 */ 411 423 IPC_SET_ARG1(call->data, uspace_dst); 412 424 IPC_SET_ARG2(call->data, size);
Note:
See TracChangeset
for help on using the changeset viewer.