traps.c (f928d4f2a86f46b030fa0850385b4391fc2b5918) | traps.c (19accfd373847ac3d10623c5d20f948846299741) |
---|---|
1/* 2 * linux/arch/arm/kernel/traps.c 3 * 4 * Copyright (C) 1995-2009 Russell King 5 * Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 823 unchanged lines hidden (view full) --- 832 ((u32 *)vectors_base)[i] = 0xe7fddef1; 833 834 /* 835 * Copy the vectors, stubs and kuser helpers (in entry-armv.S) 836 * into the vector page, mapped at 0xffff0000, and ensure these 837 * are visible to the instruction stream. 838 */ 839 memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start); | 1/* 2 * linux/arch/arm/kernel/traps.c 3 * 4 * Copyright (C) 1995-2009 Russell King 5 * Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 823 unchanged lines hidden (view full) --- 832 ((u32 *)vectors_base)[i] = 0xe7fddef1; 833 834 /* 835 * Copy the vectors, stubs and kuser helpers (in entry-armv.S) 836 * into the vector page, mapped at 0xffff0000, and ensure these 837 * are visible to the instruction stream. 838 */ 839 memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start); |
840 memcpy((void *)vectors + 0x200, __stubs_start, __stubs_end - __stubs_start); | 840 memcpy((void *)vectors + 0x1000, __stubs_start, __stubs_end - __stubs_start); |
841 memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); 842 843 /* 844 * Do processor specific fixups for the kuser helpers 845 */ 846 kuser_get_tls_init(vectors); 847 848 /* 849 * Copy signal return handlers into the vector page, and 850 * set sigreturn to be a pointer to these. 851 */ 852 memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE), 853 sigreturn_codes, sizeof(sigreturn_codes)); 854 | 841 memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); 842 843 /* 844 * Do processor specific fixups for the kuser helpers 845 */ 846 kuser_get_tls_init(vectors); 847 848 /* 849 * Copy signal return handlers into the vector page, and 850 * set sigreturn to be a pointer to these. 851 */ 852 memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE), 853 sigreturn_codes, sizeof(sigreturn_codes)); 854 |
855 flush_icache_range(vectors, vectors + PAGE_SIZE); | 855 flush_icache_range(vectors, vectors + PAGE_SIZE * 2); |
856 modify_domain(DOMAIN_USER, DOMAIN_CLIENT); 857#else /* ifndef CONFIG_CPU_V7M */ 858 /* 859 * on V7-M there is no need to copy the vector table to a dedicated 860 * memory area. The address is configurable and so a table in the kernel 861 * image can be used. 862 */ 863#endif 864} | 856 modify_domain(DOMAIN_USER, DOMAIN_CLIENT); 857#else /* ifndef CONFIG_CPU_V7M */ 858 /* 859 * on V7-M there is no need to copy the vector table to a dedicated 860 * memory area. The address is configurable and so a table in the kernel 861 * image can be used. 862 */ 863#endif 864} |