Changeset ae7d03c in mainline for kernel/arch
- Timestamp:
- 2018-05-10T13:39:19Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e8975278
- Parents:
- b277bef
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-10 07:38:12)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-10 13:39:19)
- Location:
- kernel/arch
- Files:
-
- 8 edited
-
amd64/src/userspace.c (modified) (1 diff)
-
arm32/src/cpu/cpu.c (modified) (1 diff)
-
arm32/src/exception.c (modified) (1 diff)
-
arm32/src/mach/beagleboardxm/beagleboardxm.c (modified) (1 diff)
-
arm32/src/mach/integratorcp/integratorcp.c (modified) (1 diff)
-
ia32/src/userspace.c (modified) (1 diff)
-
ia64/include/arch/mm/vhpt.h (modified) (1 diff)
-
ia64/src/mm/vhpt.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/userspace.c
rb277bef rae7d03c 55 55 56 56 asm volatile ( 57 "pushq %[udata_des]\n"58 "pushq %[stack_top]\n"59 "pushq %[rflags]\n"60 "pushq %[utext_des]\n"61 "pushq %[entry]\n"62 "movq %[uarg], %%rax\n"57 "pushq %[udata_des]\n" 58 "pushq %[stack_top]\n" 59 "pushq %[rflags]\n" 60 "pushq %[utext_des]\n" 61 "pushq %[entry]\n" 62 "movq %[uarg], %%rax\n" 63 63 64 /* %rdi is defined to hold pcb_ptr - set it to 0 */65 "xorq %%rdi, %%rdi\n"66 "iretq\n"67 :: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),68 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +69 kernel_uarg->uspace_stack_size),70 [rflags] "r" (rflags),71 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),72 [entry] "r" (kernel_uarg->uspace_entry),73 [uarg] "r" (kernel_uarg->uspace_uarg)74 : "rax"64 /* %rdi is defined to hold pcb_ptr - set it to 0 */ 65 "xorq %%rdi, %%rdi\n" 66 "iretq\n" 67 :: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 68 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack + 69 kernel_uarg->uspace_stack_size), 70 [rflags] "r" (rflags), 71 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER), 72 [entry] "r" (kernel_uarg->uspace_entry), 73 [uarg] "r" (kernel_uarg->uspace_uarg) 74 : "rax" 75 75 ); 76 76 77 77 /* Unreachable */ 78 while (true); 78 while (true) 79 ; 79 80 } 80 81 -
kernel/arch/arm32/src/cpu/cpu.c
rb277bef rae7d03c 169 169 #endif 170 170 #ifdef PROCESSOR_ARCH_armv7_a 171 /* ICache coherency is elaborated on in barrier.h.172 * VIPT and PIPT caches need maintenance only on code modify,173 * so it should be safe for general use.174 * Enable branch predictors too as they follow the same rules175 * as ICache and they can be flushed together176 */171 /* ICache coherency is elaborated on in barrier.h. 172 * VIPT and PIPT caches need maintenance only on code modify, 173 * so it should be safe for general use. 174 * Enable branch predictors too as they follow the same rules 175 * as ICache and they can be flushed together 176 */ 177 177 if ((CTR_read() & CTR_L1I_POLICY_MASK) != CTR_L1I_POLICY_AIVIVT) { 178 178 control_reg |= -
kernel/arch/arm32/src/exception.c
rb277bef rae7d03c 68 68 /* relative address (related to exc. vector) of the word 69 69 * where handler's address is stored 70 */70 */ 71 71 volatile uint32_t handler_address_ptr = EXC_VECTORS_SIZE - 72 72 PREFETCH_OFFSET; -
kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c
rb277bef rae7d03c 88 88 amdm37x_gpt_irq_ack(&beagleboard.timer); 89 89 90 /*91 * We are holding a lock which prevents preemption.92 * Release the lock, call clock() and reacquire the lock again.93 */90 /* 91 * We are holding a lock which prevents preemption. 92 * Release the lock, call clock() and reacquire the lock again. 93 */ 94 94 spinlock_unlock(&irq->lock); 95 95 clock(); -
kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
rb277bef rae7d03c 193 193 { 194 194 /* 195 * We are holding a lock which prevents preemption.196 * Release the lock, call clock() and reacquire the lock again.197 */195 * We are holding a lock which prevents preemption. 196 * Release the lock, call clock() and reacquire the lock again. 197 */ 198 198 199 199 spinlock_unlock(&irq->lock); -
kernel/arch/ia32/src/userspace.c
rb277bef rae7d03c 53 53 54 54 asm volatile ( 55 /* Set up GS register (virtual register segment) */56 "movl %[vreg_des], %%gs\n"55 /* Set up GS register (virtual register segment) */ 56 "movl %[vreg_des], %%gs\n" 57 57 58 "pushl %[udata_des]\n"59 "pushl %[stack_top]\n"60 "pushl %[eflags]\n"61 "pushl %[utext_des]\n"62 "pushl %[entry]\n"63 "movl %[uarg], %%eax\n"58 "pushl %[udata_des]\n" 59 "pushl %[stack_top]\n" 60 "pushl %[eflags]\n" 61 "pushl %[utext_des]\n" 62 "pushl %[entry]\n" 63 "movl %[uarg], %%eax\n" 64 64 65 /* %edi is defined to hold pcb_ptr - set it to 0 */66 "xorl %%edi, %%edi\n"65 /* %edi is defined to hold pcb_ptr - set it to 0 */ 66 "xorl %%edi, %%edi\n" 67 67 68 "iret\n"69 :70 : [eflags_mask] "i" (~EFLAGS_NT),71 [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),72 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +73 kernel_uarg->uspace_stack_size),74 [eflags] "r" ((eflags & ~(EFLAGS_NT)) | EFLAGS_IF),75 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),76 [entry] "r" (kernel_uarg->uspace_entry),77 [uarg] "r" (kernel_uarg->uspace_uarg),78 [vreg_des] "r" (GDT_SELECTOR(VREG_DES))79 : "eax");68 "iret\n" 69 : 70 : [eflags_mask] "i" (~EFLAGS_NT), 71 [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 72 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack + 73 kernel_uarg->uspace_stack_size), 74 [eflags] "r" ((eflags & ~(EFLAGS_NT)) | EFLAGS_IF), 75 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER), 76 [entry] "r" (kernel_uarg->uspace_entry), 77 [uarg] "r" (kernel_uarg->uspace_uarg), 78 [vreg_des] "r" (GDT_SELECTOR(VREG_DES)) 79 : "eax"); 80 80 81 81 /* Unreachable */ 82 while (true); 82 while (true) 83 ; 83 84 } 84 85 -
kernel/arch/ia64/include/arch/mm/vhpt.h
rb277bef rae7d03c 31 31 */ 32 32 /** @file 33 */33 */ 34 34 35 35 #ifndef KERN_ia64_VHPT_H_ -
kernel/arch/ia64/src/mm/vhpt.c
rb277bef rae7d03c 1 1 /* 2 * Copyright (c) 2006 Jakub Vana3 * All rights reserved.4 *5 * Redistribution and use in source and binary forms, with or without6 * modification, are permitted provided that the following conditions7 * are met:8 *9 * - Redistributions of source code must retain the above copyright10 * notice, this list of conditions and the following disclaimer.11 * - Redistributions in binary form must reproduce the above copyright12 * notice, this list of conditions and the following disclaimer in the13 * documentation and/or other materials provided with the distribution.14 * - The name of the author may not be used to endorse or promote products15 * derived from this software without specific prior written permission.16 *17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.2 * Copyright (c) 2006 Jakub Vana 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 … … 31 31 */ 32 32 /** @file 33 */33 */ 34 34 35 35 #include <mem.h>
Note:
See TracChangeset
for help on using the changeset viewer.
