- Timestamp:
- 2006-03-17T18:07:56Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 69f293e
- Parents:
- 6c6a19e6
- Location:
- arch/ia64
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/include/asm.h
r6c6a19e6 r0f250f9 259 259 extern void asm_delay_loop(__u32 t); 260 260 261 extern void switch_to_userspace(__address entry, __address sp, __address bsp, __ u64 ipsr, __u64 rsc);261 extern void switch_to_userspace(__address entry, __address sp, __address bsp, __address uspace_uarg, __u64 ipsr, __u64 rsc); 262 262 263 263 #endif -
arch/ia64/include/faddr.h
r6c6a19e6 r0f250f9 32 32 #include <arch/types.h> 33 33 34 static __address FADDR(void (* fptr)(void));35 36 34 /** 37 35 * … … 42 40 * 43 41 */ 44 inline __address FADDR(void (* fptr)(void)) {42 static inline __address FADDR(void (* fptr)()) { 45 43 __address faddr; 46 47 /*Deprecated assembler version*/48 /*49 __asm__(50 "ld8 %0 = [%1]\n\t"51 : "=r" (faddr)52 : "r" (fptr)53 );54 */55 44 56 45 faddr = *((__address *)(fptr));; -
arch/ia64/src/asm.S
r6c6a19e6 r0f250f9 55 55 * @param in1 Userspace stack pointer address. 56 56 * @param in2 Userspace register stack pointer address. 57 * @param in3 Value to be stored in IPSR. 58 * @param in4 Value to be stored in RSC. 57 * @param in3 Userspace address of thread uspace_arg_t structure. 58 * @param in4 Value to be stored in IPSR. 59 * @param in5 Value to be stored in RSC. 59 60 */ 60 61 .global switch_to_userspace 61 62 switch_to_userspace: 62 alloc loc0 = ar.pfs, 5, 3, 0, 063 alloc loc0 = ar.pfs, 6, 3, 0, 0 63 64 rsm (PSR_IC_MASK | PSR_I_MASK) /* disable interruption collection and interrupts */ 64 65 srlz.d ;; 65 66 srlz.i ;; 66 67 67 mov cr.ipsr = in 368 mov cr.ipsr = in4 68 69 mov cr.iip = in0 69 70 mov r12 = in1 … … 85 86 86 87 mov ar.bspstore = in2 ;; 87 mov ar.rsc = in4 ;; 88 mov ar.rsc = in5 ;; 89 90 mov r8 = in3 88 91 89 92 rfi ;; -
arch/ia64/src/ia64.c
r6c6a19e6 r0f250f9 42 42 #include <userspace.h> 43 43 #include <console/console.h> 44 #include <proc/ thread.h>44 #include <proc/uarg.h> 45 45 46 46 void arch_pre_mm_init(void) … … 74 74 75 75 /** Enter userspace and never return. */ 76 void userspace(uspace_arg_t * uarg)76 void userspace(uspace_arg_t *kernel_uarg) 77 77 { 78 78 psr_t psr; … … 92 92 rsc.mode = 3; /* eager mode */ 93 93 94 switch_to_userspace(uarg->uspace_entry, uarg->uspace_stack+PAGE_SIZE-ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), uarg->uspace_stack, psr.value, rsc.value); 94 switch_to_userspace((__address) kernel_uarg->uspace_entry, 95 ((__address) kernel_uarg->uspace_stack)+PAGE_SIZE-ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), 96 (__address) kernel_uarg->uspace_stack, 97 (__address) kernel_uarg->uspace_uarg, 98 psr.value, rsc.value); 95 99 96 100 while (1) {
Note:
See TracChangeset
for help on using the changeset viewer.