[L4alpha-cvscommit] CVS: L4Alpha/pal ipc.mar,1.14,1.15 thread.mar,1.7,1.8
Status: Beta
Brought to you by:
dpotts
|
From: Daniel P. <dp...@us...> - 2002-01-02 04:08:52
|
Update of /cvsroot/l4alpha/L4Alpha/pal In directory usw-pr-cvs1:/tmp/cvs-serv6055/pal Modified Files: ipc.mar thread.mar Log Message: Some extra comments... Index: ipc.mar =================================================================== RCS file: /cvsroot/l4alpha/L4Alpha/pal/ipc.mar,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ipc.mar 2001/04/13 05:45:51 1.14 --- ipc.mar 2002/01/02 04:08:46 1.15 *************** *** 512,519 **** ;; PROBLEM - registers covered by PALshadow need to be saved too!!!! .if df ev6 ; push non-overlapping and shadow registers ! push p_pp1!p_a0!p_a1!p_a2!p_a3 ; now switch to kernel mode and store the others, then switch to the dispatcher --- 512,523 ---- ;; PROBLEM - registers covered by PALshadow need to be saved too!!!! + ;; NOTE - ipc_ret_timeout and possibly others rely on the other of + ;; pushed registers, so that it can unwind them + .if df ev6 ; push non-overlapping and shadow registers ! push p_pp1 ! push p_a0!p_a1!p_a2!p_a3 ; now switch to kernel mode and store the others, then switch to the dispatcher *************** *** 530,534 **** .iff ! push p_pp1!p_t0!p_t1!p_t2!p_t3!p_t4!p_t5!p_t6!p_t8!p_a0!p_a1!p_a2!p_a3!p_a4!p_a5!p_fp!p_v0 switch_dispatcher pp0, ipc_send_eq, pp4, pp2; can optimise by going to kernel mode and coming back in kernel mode, then switching to pal... .endc --- 534,541 ---- .iff ! ;; see note about as to why we do them separately... ! push p_pp1 ! push p_a0!p_a1!p_a2!p_a3 ! push p_t0!p_t1!p_t2!p_t3!p_t4!p_t5!p_t6!p_t8!p_a4!p_a5!p_fp!p_v0 switch_dispatcher pp0, ipc_send_eq, pp4, pp2; can optimise by going to kernel mode and coming back in kernel mode, then switching to pal... .endc *************** *** 550,554 **** mode_pal ipc_send_eq_ev6: ! pop p_pp1!p_a0!p_a1!p_a2!p_a3 enable_int --- 557,562 ---- mode_pal ipc_send_eq_ev6: ! pop p_a0!p_a1!p_a2!p_a3 ! pop p_pp1 enable_int *************** *** 558,564 **** .if df ev4 create_PPR_context ! .endc ! ! pop p_pp1!p_t0!p_t1!p_t2!p_t3!p_t4!p_t5!p_t6!p_t8!p_a0!p_a1!p_a2!p_a3!p_a4!p_a5!p_fp!p_v0 .endc --- 566,573 ---- .if df ev4 create_PPR_context ! .endc ! pop p_t0!p_t1!p_t2!p_t3!p_t4!p_t5!p_t6!p_t8!p_a4!p_a5!p_fp!p_v0 ! pop p_a0!p_a1!p_a2!p_a3 ! pop p_pp1 .endc *************** *** 1017,1022 **** GET_16CONS v0, IPC_S_TIMEOUT ! lda sp, <16 * 8>(sp) ; was 14 ENDIF enable_int pp0 full_close_frame --- 1026,1042 ---- GET_16CONS v0, IPC_S_TIMEOUT ! ; now we unwind the stack ! .if df do_fast_asm_unfriendly_unstack ! lda sp, <17 * 8>(sp) ; was 16 was 14 ! .iff ! ;; This should be the same as ipc_send_eq unstacking... ! pop p_t0!p_t1!p_t2!p_t3!p_t4!p_t5!p_t6!p_t8!p_a4!p_a5!p_fp!p_v0 ! pop p_a0!p_a1!p_a2!p_a3 ! pop p_pp1 ! .endc ENDIF + + ;; Any other thread states we need to unstack for? + enable_int pp0 full_close_frame *************** *** 1044,1048 **** .endc enable_int pp0 ! pop p_v0 full_close_frame --- 1064,1068 ---- .endc enable_int pp0 ! pop p_v0 ; get failure result off stack full_close_frame Index: thread.mar =================================================================== RCS file: /cvsroot/l4alpha/L4Alpha/pal/thread.mar,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** thread.mar 2001/04/13 05:45:51 1.7 --- thread.mar 2002/01/02 04:08:46 1.8 *************** *** 515,523 **** ENDIF ;; Restart thread and mark it as runnable ! GET_16CONS t0, TFS_RUNNING ! stq t0, TCB_THREAD_STATE(t12) ! enqueue_busy t12, t0, t1, t2 lerk_out: pop p_ra --- 515,527 ---- ENDIF + ;; FIXME - commented out as threads appear to be already running... + ;; this has bad effects for register contents... danielp 20011220 + ;; Restart thread and mark it as runnable ! ; GET_16CONS t0, TFS_RUNNING ! ; stq t0, TCB_THREAD_STATE(t12) ! ; enqueue_busy t12, t0, t1, t2 + lerk_out: pop p_ra *************** *** 537,541 **** ALIGN_FETCH_BLOCK mode_normal ! lerk_remote: ;; Push PC, SP, Pager, leave room for tid. subq sp, #<3 * 8>, sp --- 541,545 ---- ALIGN_FETCH_BLOCK mode_normal ! lerk_remote: ;; Push PC, SP, Pager, leave room for tid. subq sp, #<3 * 8>, sp *************** *** 865,870 **** ALIGN_FETCH_BLOCK remote_abort: ! ; kmsg <"<L4> Remote Abort"<CR><LF>> ! ldl t0, TCB_LIST_STATE(t12) and t0, #LLS_SOON_WAKEUP_QUEUE, t1 --- 869,874 ---- ALIGN_FETCH_BLOCK remote_abort: ! ; kmsg <"Remote Abort"<CR><LF>> ! ldl t0, TCB_LIST_STATE(t12) and t0, #LLS_SOON_WAKEUP_QUEUE, t1 *************** *** 884,895 **** ldq t0, TCB_THREAD_STATE(t12) ! cmpeq t0, #TFS_RUNNING, t1 ! IF t1 ;; Thread was running, so we do nothing. return_pk ra XENDIF ! cmpeq t0, #TFS_POLLING, t1 ! IF t1 ; kmsg <"Removing polling thread"<CR><LF>> --- 888,899 ---- ldq t0, TCB_THREAD_STATE(t12) ! bic t0, #TFS_RUNNING, t1 ! IFZ t1 ;; Thread was running, so we do nothing. return_pk ra XENDIF ! bic t0, #TFS_POLLING, t1 ! IFZ t1 ; kmsg <"Removing polling thread"<CR><LF>> *************** *** 988,992 **** mov t1, a4 .endc ! addq a1, #1, t0 ldq t1, TCB_PAGER (t12) --- 992,996 ---- mov t1, a4 .endc ! addq a1, #1, t0 ldq t1, TCB_PAGER (t12) *************** *** 1005,1017 **** stq a2, TCB_STACK_PC(t12) ! lda t0, <TCB_STACKTOP - <3*8>>(t12) ! stq t0, TCB_KSP(t12) ! krn_addr t0, _thread_startup ! stq t0, TCB_RESTART(t12) ;; Update mode to user ! subq zero, #1, t0 ! stq t0, TCB_STACK_MODE(t12) ;; We need to delete the thread (update version etc.) so return 1. --- 1009,1021 ---- stq a2, TCB_STACK_PC(t12) ! ; lda t0, <TCB_STACKTOP - <3*8>>(t12) ! ; stq t0, TCB_KSP(t12) ! ; krn_addr t0, _thread_startup ! ; stq t0, TCB_RESTART(t12) ;; Update mode to user ! ; subq zero, #1, t0 ! ; stq t0, TCB_STACK_MODE(t12) ;; We need to delete the thread (update version etc.) so return 1. *************** *** 1305,1310 **** ; remove if polling ! and t2, #TFS_POLLING, t5 ; This may not be correct op ! IF t5 and t1, #LLS_POLLING_QUEUE, t5 ; is it really still there? --- 1309,1314 ---- ; remove if polling ! bic t2, #TFS_POLLING, t5 ; This may not be correct op ! IFZ t5 and t1, #LLS_POLLING_QUEUE, t5 ; is it really still there? |