Changeset 3e828ea in mainline for kernel/arch/ia64
- Timestamp:
- 2019-09-23T12:49:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9be2358
- Parents:
- 9259d20 (diff), 1a4ec93f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Jiri Svoboda <jiri@…> (2019-09-22 12:49:07)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-09-23 12:49:29)
- Location:
- kernel/arch/ia64
- Files:
-
- 1 added
- 8 edited
-
include/arch/interrupt.h (modified) (1 diff)
-
include/arch/istate.h (modified) (1 diff)
-
include/arch/mm/as.h (modified) (1 diff)
-
include/arch/mm/page.h (modified) (2 diffs)
-
include/arch/register.h (modified) (1 diff)
-
meson.build (added)
-
src/ia64.c (modified) (1 diff)
-
src/interrupt.c (modified) (1 diff)
-
src/mm/tlb.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/arch/interrupt.h
r9259d20 r3e828ea 92 92 extern void disabled_fp_register(unsigned int, istate_t *); 93 93 94 extern void trap_virtual_enable_irqs(uint16_t);95 96 94 void exception_init(void); 97 95 #endif -
kernel/arch/ia64/include/arch/istate.h
r9259d20 r3e828ea 71 71 _NO_TRACE static inline int istate_from_uspace(istate_t *istate) 72 72 { 73 return (istate->cr_iip) < 0xe000000000000000ULL;73 return istate->cr_ipsr.cpl == PSR_CPL_USER; 74 74 } 75 75 -
kernel/arch/ia64/include/arch/mm/as.h
r9259d20 r3e828ea 37 37 38 38 #define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 0 39 #define KERNEL_SEPARATE_PTL0_ARCH 0 39 40 40 41 #define KERNEL_ADDRESS_SPACE_START_ARCH UINT64_C(0xe000000000000000) -
kernel/arch/ia64/include/arch/mm/page.h
r9259d20 r3e828ea 38 38 39 39 #include <arch/mm/frame.h> 40 #include <arch/register.h> 40 41 41 42 #ifndef __ASSEMBLER__ … … 76 77 77 78 /** Privilege Levels. Only the most and the least privileged ones are ever used. */ 78 #define PL_KERNEL 0x0079 #define PL_USER 0x0379 #define PL_KERNEL PSR_CPL_KERNEL 80 #define PL_USER PSR_CPL_USER 80 81 81 82 /* Access Rigths. Only certain combinations are used by the kernel. */ -
kernel/arch/ia64/include/arch/register.h
r9259d20 r3e828ea 57 57 #define PSR_RT_MASK (1 << 27) 58 58 #define PSR_IT_MASK (1 << 36) 59 60 #define PSR_CPL_USER 3 61 #define PSR_CPL_KERNEL 0 59 62 60 63 #define PSR_CPL_SHIFT 32 -
kernel/arch/ia64/src/ia64.c
r9259d20 r3e828ea 244 244 * uspace_stack_size / 2 bytes. 245 245 */ 246 switch_to_userspace( (uintptr_t)kernel_uarg->uspace_entry,247 ((uintptr_t) kernel_uarg->uspace_stack)+246 switch_to_userspace(kernel_uarg->uspace_entry, 247 kernel_uarg->uspace_stack + 248 248 kernel_uarg->uspace_stack_size / 2 - 249 249 ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), 250 ((uintptr_t) kernel_uarg->uspace_stack)+250 kernel_uarg->uspace_stack + 251 251 kernel_uarg->uspace_stack_size / 2, 252 (uintptr_t)kernel_uarg->uspace_uarg, psr.value, rsc.value);252 kernel_uarg->uspace_uarg, psr.value, rsc.value); 253 253 254 254 while (true) -
kernel/arch/ia64/src/interrupt.c
r9259d20 r3e828ea 301 301 } 302 302 303 void trap_virtual_enable_irqs(uint16_t irqmask)304 {305 }306 307 303 void exception_init(void) 308 304 { -
kernel/arch/ia64/src/mm/tlb.c
r9259d20 r3e828ea 464 464 } 465 465 466 static bool is_kernel_fault( uintptr_t va)466 static bool is_kernel_fault(istate_t *istate, uintptr_t va) 467 467 { 468 468 region_register_t rr; 469 470 if (istate_from_uspace(istate)) 471 return false; 469 472 470 473 rr.word = rr_read(VA2VRN(va)); … … 484 487 pte_t t; 485 488 489 assert(istate_from_uspace(istate)); 490 486 491 va = istate->cr_ifa; /* faulting address */ 487 488 assert(!is_kernel_fault(va));489 492 490 493 bool found = page_mapping_find(AS, va, true, &t); … … 587 590 as_t *as = AS; 588 591 589 if (is_kernel_fault( va)) {592 if (is_kernel_fault(istate, va)) { 590 593 if (va < end_of_identity) { 591 594 /* … … 648 651 va = istate->cr_ifa; /* faulting address */ 649 652 650 if (is_kernel_fault( va))653 if (is_kernel_fault(istate, va)) 651 654 as = AS_KERNEL; 652 655 … … 680 683 pte_t t; 681 684 685 assert(istate_from_uspace(istate)); 686 682 687 va = istate->cr_ifa; /* faulting address */ 683 684 assert(!is_kernel_fault(va));685 688 686 689 bool found = page_mapping_find(AS, va, true, &t); … … 716 719 va = istate->cr_ifa; /* faulting address */ 717 720 718 if (is_kernel_fault( va))721 if (is_kernel_fault(istate, va)) 719 722 as = AS_KERNEL; 720 723 … … 752 755 pte_t t; 753 756 757 assert(istate_from_uspace(istate)); 758 754 759 va = istate->cr_ifa; /* faulting address */ 755 756 assert(!is_kernel_fault(va));757 760 758 761 /* … … 779 782 pte_t t; 780 783 784 assert(istate_from_uspace(istate)); 785 781 786 va = istate->cr_ifa; /* faulting address */ 782 783 assert(!is_kernel_fault(va));784 787 785 788 bool found = page_mapping_find(AS, va, true, &t);
Note:
See TracChangeset
for help on using the changeset viewer.
