Changeset 83d2d0e in mainline
- Timestamp:
- 2006-03-05T20:28:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e1c68e0c
- Parents:
- bc314be8
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/include/interrupt.h
rbc314be8 r83d2d0e 60 60 __address cr_iip; 61 61 __u64 pr; 62 __address sp; 62 63 } __attribute__ ((packed)); 63 64 -
arch/ia64/include/register.h
rbc314be8 r83d2d0e 42 42 #define PSR_RT_MASK (1<<27) 43 43 #define PSR_IT_MASK 0x0000001000000000 44 45 #define PSR_CPL_SHIFT 32 46 #define PSR_CPL_MASK_SHIFTED 3 44 47 45 48 /** Application registers. */ -
arch/ia64/src/ivt.S
rbc314be8 r83d2d0e 30 30 #include <arch/stack.h> 31 31 #include <arch/register.h> 32 33 #define STACK_ITEMS 12 34 #define STACK_FRAME_SIZE ((STACK_ITEMS*STACK_ITEM_SIZE) + STACK_SCRATCH_AREA_SIZE) 35 36 #if (STACK_FRAME_SIZE % STACK_ALIGNMENT != 0) 37 #error Memory stack must be 16-byte aligned. 32 #include <arch/mm/page.h> 33 #include <align.h> 34 35 #define STACK_ITEMS 13 36 #define STACK_FRAME_SIZE ALIGN_UP((STACK_ITEMS*STACK_ITEM_SIZE) + STACK_SCRATCH_AREA_SIZE, STACK_ALIGNMENT) 37 38 #if (STACK_ITEMS % 2 == 0) 39 # define STACK_FRAME_BIAS 8 40 #else 41 # define STACK_FRAME_BIAS 16 38 42 #endif 39 43 … … 71 75 72 76 /* 73 * Note that r24-r31 from bank 0 can be used only as long as PSR.ic = 0.77 * Note that r24-r31 from bank 0 can be used only as long as PSR.ic = 0. 74 78 */ 75 79 mov r24 = cr.iip … … 83 87 84 88 /* 3. switch to kernel memory stack */ 85 /* TODO: support interruptions from userspace */ 86 /* assume kernel stack */ 87 88 add r31 = -8, r12 ;; 89 mov r30 = cr.ipsr 90 shr.u r31 = r12, VRN_SHIFT ;; 91 92 /* 93 * Set p6 to true if the stack register references kernel address space. 94 * Set p7 to false if the stack register doesn't reference kernel address space. 95 */ 96 cmp.eq p6, p7 = VRN_KERNEL, r31 ;; 97 98 (p6) shr.u r30 = r30, PSR_CPL_SHIFT ;; 99 (p6) and r30 = PSR_CPL_MASK_SHIFTED, r30 ;; 100 101 /* 102 * Set p6 to true if the interrupted context executed in kernel mode. 103 * Set p7 to false if the interrupted context didn't execute in kernel mode. 104 */ 105 (p6) cmp.eq p6, p7 = r30, r0 ;; 106 107 /* 108 * Now, p7 is true iff the stack needs to be switched to kernel stack. 109 */ 110 mov r30 = r12 111 (p7) mov r12 = R_KSTACK ;; 112 113 add r31 = -STACK_FRAME_BIAS, r12 ;; 89 114 add r12 = -STACK_FRAME_SIZE, r12 90 115 91 116 /* 4. save registers in bank 0 into memory stack */ 92 st8 [r31] = r29, -8 ;; /* save predicate registers */ 93 94 st8 [r31] = r24, -8 ;; /* save cr.iip */ 95 st8 [r31] = r25, -8 ;; /* save cr.ipsr */ 96 st8 [r31] = r26, -8 ;; /* save cr.iipa */ 97 st8 [r31] = r27, -8 ;; /* save cr.isr */ 98 st8 [r31] = r28, -8 /* save cr.ifa */ 117 st8 [r31] = r30, -8 ;; /* save old stack pointer */ 118 119 st8 [r31] = r29, -8 ;; /* save predicate registers */ 120 121 st8 [r31] = r24, -8 ;; /* save cr.iip */ 122 st8 [r31] = r25, -8 ;; /* save cr.ipsr */ 123 st8 [r31] = r26, -8 ;; /* save cr.iipa */ 124 st8 [r31] = r27, -8 ;; /* save cr.isr */ 125 st8 [r31] = r28, -8 ;; /* save cr.ifa */ 99 126 100 127 /* 5. RSE switch from interrupted context */ … … 104 131 mov r26 = cr.ifs 105 132 106 st8 [r31] = r24, -8 ;; /* save ar.rsc */107 st8 [r31] = r25, -8 ;; /* save ar.pfs */133 st8 [r31] = r24, -8 ;; /* save ar.rsc */ 134 st8 [r31] = r25, -8 ;; /* save ar.pfs */ 108 135 st8 [r31] = r26, -8 /* save ar.ifs */ 109 136 … … 121 148 st8 [r31] = r27, -8 ;; /* save ar.rnat */ 122 149 st8 [r31] = r28, -8 ;; /* save ar.bspstore */ 123 st8 [r31] = r29, -8 /* save ar.bsp */150 st8 [r31] = r29, -8 /* save ar.bsp */ 124 151 125 152 mov ar.rsc = r24 /* restore RSE's setting */ … … 175 202 176 203 /* 18. restore predicate registers from memory stack */ 177 ld8 r29 = [r31] , -8 ;; /* load predicate registers */204 ld8 r29 = [r31], +8 ;; /* load predicate registers */ 178 205 mov pr = r29 179 206 180 207 /* 19. return from interruption */ 181 add r12 = STACK_FRAME_SIZE, r12208 ld8 r12 = [r31] /* load stack pointer */ 182 209 rfi ;; 183 210 -
arch/ia64/src/proc/scheduler.c
rbc314be8 r83d2d0e 31 31 #include <arch.h> 32 32 #include <arch/register.h> 33 #include <arch/context.h> 33 34 #include <arch/mm/tlb.h> 34 35 #include <config.h> … … 58 59 "mov r23 = %0\n" 59 60 "bsw.1\n" 60 : : "r" ( THREAD->kstack));61 : : "r" (&THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA])); 61 62 } 62 63 -
doc/arch/ia64
rbc314be8 r83d2d0e 12 12 13 13 TOOLCHAIN REQUIREMENTS 14 o binutils 2.15, 2.16 15 o gcc 4.0.0 14 o binutils 2.15, 2.16, 2.16.1 15 o gcc 4.0.0, 4.0.1 16 16 o older versions may do as well, but are now obsoleted
Note:
See TracChangeset
for help on using the changeset viewer.