2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
34 * Copyright (c) 1990,1991,1992 The University of Utah and
35 * the Center for Software Science (CSS). All rights reserved.
37 * Permission to use, copy, modify and distribute this software is hereby
38 * granted provided that (1) source code retains these copyright, permission,
39 * and disclaimer notices, and (2) redistributions including binaries
40 * reproduce the notices in supporting documentation, and (3) all advertising
41 * materials mentioning features or use of this software display the following
42 * acknowledgement: ``This product includes software developed by the Center
43 * for Software Science at the University of Utah.''
45 * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
46 * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF
47 * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
49 * CSS requests users of this software to return to css-dist@cs.utah.edu any
50 * improvements that they make and grant CSS redistribution rights.
52 * Utah $Hdr: pcb.c 1.23 92/06/27$
59 #include <mach/mach_types.h>
60 #include <mach/thread_status.h>
62 #include <kern/kern_types.h>
63 #include <kern/task.h>
64 #include <kern/thread.h>
65 #include <kern/misc_protos.h>
66 #include <kern/mach_param.h>
69 #include <vm/vm_map.h>
70 #include <vm/vm_kern.h>
72 #include <ppc/misc_protos.h>
73 #include <ppc/cpu_internal.h>
74 #include <ppc/exception.h>
75 #include <ppc/proc_reg.h>
78 #include <ppc/mappings.h>
79 #include <ppc/savearea.h>
80 #include <ppc/Firmware.h>
82 #include <ppc/thread.h>
83 #include <ppc/vmachmon.h>
84 #include <ppc/low_trace.h>
85 #include <ppc/lowglobals.h>
87 #include <sys/kdebug.h>
89 void machine_act_terminate(thread_t
);
92 * These constants are dumb. They should not be in asm.h!
95 #define KF_SIZE (FM_SIZE+ARG_SIZE+FM_REDZONE)
98 int fpu_trap_count
= 0;
99 int fpu_switch_count
= 0;
100 int vec_trap_count
= 0;
101 int vec_switch_count
= 0;
105 * consider_machine_collect: try to collect machine-dependent pages
108 consider_machine_collect()
111 * none currently available
117 consider_machine_adjust()
119 consider_mapping_adjust();
123 * switch_context: Switch from one thread to another, needed for
128 machine_switch_context(
130 thread_continue_t continuation
,
133 register thread_t retval
;
135 facility_context
*fowner
;
136 struct per_proc_info
*ppinfo
;
139 panic("machine_switch_context");
141 ppinfo
= getPerProc(); /* Get our processor block */
143 ppinfo
->old_thread
= (unsigned int)old
;
144 ppinfo
->cpu_flags
&= ~traceBE
; /* disable branch tracing if on */
146 /* Our context might wake up on another processor, so we must
147 * not keep hot state in our FPU, it must go back to the pcb
148 * so that it can be found by the other if needed
150 if(real_ncpus
> 1) { /* This is potentially slow, so only do when actually SMP */
151 fowner
= ppinfo
->FPU_owner
; /* Cache this because it may change */
152 if(fowner
) { /* Is there any live context? */
153 if(fowner
->facAct
== old
) { /* Is it for us? */
154 fpu_save(fowner
); /* Yes, save it */
157 fowner
= ppinfo
->VMX_owner
; /* Cache this because it may change */
158 if(fowner
) { /* Is there any live context? */
159 if(fowner
->facAct
== old
) { /* Is it for us? */
160 vec_save(fowner
); /* Yes, save it */
166 * If old thread is running VM, save per proc userProtKey and FamVMmode spcFlags bits in the thread spcFlags
167 * This bits can be modified in the per proc without updating the thread spcFlags
169 if(old
->machine
.specFlags
& runningVM
) {
170 old
->machine
.specFlags
&= ~(userProtKey
|FamVMmode
);
171 old
->machine
.specFlags
|= (ppinfo
->spcFlags
) & (userProtKey
|FamVMmode
);
173 old
->machine
.specFlags
&= ~OnProc
;
174 new->machine
.specFlags
|= OnProc
;
177 * We do not have to worry about the PMAP module, so switch.
179 * We must not use thread->map since this may not be the actual
180 * task map, but the map being used for a klcopyin/out.
183 if(new->machine
.specFlags
& runningVM
) { /* Is the new guy running a VM? */
184 pmap_switch(new->machine
.vmmCEntry
->vmmPmap
); /* Switch to the VM's pmap */
185 ppinfo
->VMMareaPhys
= new->machine
.vmmCEntry
->vmmContextPhys
;
186 ppinfo
->VMMXAFlgs
= new->machine
.vmmCEntry
->vmmXAFlgs
;
187 ppinfo
->FAMintercept
= new->machine
.vmmCEntry
->vmmFAMintercept
;
189 else { /* otherwise, we use the task's pmap */
190 new_pmap
= new->task
->map
->pmap
;
191 if ((old
->task
->map
->pmap
!= new_pmap
) || (old
->machine
.specFlags
& runningVM
)) {
192 pmap_switch(new_pmap
); /* Switch if there is a change */
196 if(old
->machine
.umwSpace
!= invalSpace
) { /* Does our old guy have an active window? */
197 old
->machine
.umwSpace
|= umwSwitchAway
; /* Show we switched away from this guy */
198 hw_blow_seg(lowGlo
.lgUMWvaddr
); /* Blow off the first segment */
199 hw_blow_seg(lowGlo
.lgUMWvaddr
+ 0x10000000ULL
); /* Blow off the second segment */
202 KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED
,MACH_SCHED
) | DBG_FUNC_NONE
,
203 old
->reason
, (int)new, old
->sched_pri
, new->sched_pri
, 0);
205 retval
= Switch_context(old
, continuation
, new);
206 assert(retval
!= NULL
);
208 if (branch_tracing_enabled()) {
209 ppinfo
= getPerProc(); /* Get our processor block */
210 ppinfo
->cpu_flags
|= traceBE
; /* restore branch tracing */
213 /* We've returned from having switched context, so we should be
214 * back in the original context.
221 * Initialize the machine-dependent state for a new thread.
224 machine_thread_create(
228 savearea
*sv
; /* Pointer to newly allocated savearea */
229 unsigned int *CIsTooLimited
, i
;
231 hw_atomic_add((uint32_t *)&saveanchor
.savetarget
, 4); /* Account for the number of saveareas we think we "need"
232 for this activation */
233 assert(thread
->machine
.pcb
== (savearea
*)0); /* Make sure there was no previous savearea */
235 sv
= save_alloc(); /* Go get us a savearea */
237 bzero((char *)((unsigned int)sv
+ sizeof(savearea_comm
)), (sizeof(savearea
) - sizeof(savearea_comm
))); /* Clear it */
239 sv
->save_hdr
.save_prev
= 0; /* Clear the back pointer */
240 sv
->save_hdr
.save_flags
= (sv
->save_hdr
.save_flags
& ~SAVtype
) | (SAVgeneral
<< SAVtypeshft
); /* Mark as in use */
241 sv
->save_hdr
.save_act
= thread
; /* Set who owns it */
242 thread
->machine
.pcb
= sv
; /* Point to the save area */
243 thread
->machine
.curctx
= &thread
->machine
.facctx
; /* Initialize facility context */
244 thread
->machine
.facctx
.facAct
= thread
; /* Initialize facility context pointer to activation */
245 thread
->machine
.umwSpace
= invalSpace
; /* Initialize user memory window space to invalid */
246 thread
->machine
.preemption_count
= 0; /* Initialize preemption counter */
249 * User threads will pull their context from the pcb when first
250 * returning to user mode, so fill in all the necessary values.
251 * Kernel threads are initialized from the save state structure
252 * at the base of the kernel stack (see stack_attach()).
255 thread
->machine
.upcb
= sv
; /* Set user pcb */
256 sv
->save_srr1
= (uint64_t)MSR_EXPORT_MASK_SET
; /* Set the default user MSR */
257 if(task_has_64BitAddr(task
)) sv
->save_srr1
|= (uint64_t)MASK32(MSR_SF
) << 32; /* If 64-bit task, force 64-bit mode */
258 sv
->save_fpscr
= 0; /* Clear all floating point exceptions */
259 sv
->save_vrsave
= 0; /* Set the vector save state */
260 sv
->save_vscr
[0] = 0x00000000;
261 sv
->save_vscr
[1] = 0x00000000;
262 sv
->save_vscr
[2] = 0x00000000;
263 sv
->save_vscr
[3] = 0x00010000; /* Disable java mode and clear saturated */
265 return(KERN_SUCCESS
);
269 * Machine-dependent cleanup prior to destroying a thread
272 machine_thread_destroy(
275 register savearea
*pcb
, *ppsv
;
276 register savearea_vec
*vsv
, *vpsv
;
277 register savearea_fpu
*fsv
, *fpsv
;
278 register savearea
*svp
;
283 * This function will release all context.
286 machine_act_terminate(thread
); /* Make sure all virtual machines are dead first */
290 * Walk through and release all floating point and vector contexts. Also kill live context.
294 intr
= ml_set_interrupts_enabled(FALSE
); /* Disable for interruptions */
296 toss_live_vec(thread
->machine
.curctx
); /* Dump live vectors */
298 vsv
= thread
->machine
.curctx
->VMXsave
; /* Get the top vector savearea */
300 while(vsv
) { /* Any VMX saved state? */
301 vpsv
= vsv
; /* Remember so we can toss this */
302 vsv
= CAST_DOWN(savearea_vec
*, vsv
->save_hdr
.save_prev
); /* Get one underneath our's */
303 save_release((savearea
*)vpsv
); /* Release it */
306 thread
->machine
.curctx
->VMXsave
= 0; /* Kill chain */
308 toss_live_fpu(thread
->machine
.curctx
); /* Dump live float */
310 fsv
= thread
->machine
.curctx
->FPUsave
; /* Get the top float savearea */
312 while(fsv
) { /* Any float saved state? */
313 fpsv
= fsv
; /* Remember so we can toss this */
314 fsv
= CAST_DOWN(savearea_fpu
*, fsv
->save_hdr
.save_prev
); /* Get one underneath our's */
315 save_release((savearea
*)fpsv
); /* Release it */
318 thread
->machine
.curctx
->FPUsave
= 0; /* Kill chain */
321 * free all regular saveareas.
324 pcb
= thread
->machine
.pcb
; /* Get the general savearea */
326 while(pcb
) { /* Any float saved state? */
327 ppsv
= pcb
; /* Remember so we can toss this */
328 pcb
= CAST_DOWN(savearea
*, pcb
->save_hdr
.save_prev
); /* Get one underneath our's */
329 save_release(ppsv
); /* Release it */
332 hw_atomic_sub((uint32_t *)&saveanchor
.savetarget
, 4); /* Unaccount for the number of saveareas we think we "need" */
334 (void) ml_set_interrupts_enabled(intr
); /* Restore interrupts if enabled */
339 * act_machine_sv_free
340 * release saveareas associated with an act. if flag is true, release
341 * user level savearea(s) too, else don't
343 * This code must run with interruptions disabled because an interrupt handler could use
344 * floating point and/or vectors. If this happens and the thread we are blowing off owns
345 * the facility, we can deadlock.
348 act_machine_sv_free(thread_t act
)
350 register savearea
*pcb
, *userpcb
;
351 register savearea_vec
*vsv
, *vpst
, *vsvt
;
352 register savearea_fpu
*fsv
, *fpst
, *fsvt
;
353 register savearea
*svp
;
358 * This function will release all non-user state context.
363 * Walk through and release all floating point and vector contexts that are not
364 * user state. We will also blow away live context if it belongs to non-user state.
365 * Note that the level can not change while we are in this code. Nor can another
366 * context be pushed on the stack.
368 * We do nothing here if the current level is user. Otherwise,
369 * the live context is cleared. Then we find the user saved context.
370 * Next, we take the sync lock (to keep us from munging things in *_switch).
371 * The level is set to 0 and all stacked context other than user is dequeued.
372 * Then we unlock. Next, all of the old kernel contexts are released.
376 intr
= ml_set_interrupts_enabled(FALSE
); /* Disable for interruptions */
378 if(act
->machine
.curctx
->VMXlevel
) { /* Is the current level user state? */
380 toss_live_vec(act
->machine
.curctx
); /* Dump live vectors if is not user */
382 if(!hw_lock_to((hw_lock_t
)&act
->machine
.curctx
->VMXsync
, LockTimeOut
)) { /* Get the sync lock */
383 panic("act_machine_sv_free - timeout getting VMX sync lock\n"); /* Tell all and die */
386 vsv
= act
->machine
.curctx
->VMXsave
; /* Get the top vector savearea */
387 while(vsv
&& vsv
->save_hdr
.save_level
) vsv
= (savearea_vec
*)vsv
->save_hdr
.save_prev
; /* Find user context if any */
389 vsvt
= act
->machine
.curctx
->VMXsave
; /* Get the top of the chain */
390 act
->machine
.curctx
->VMXsave
= vsv
; /* Point to the user context */
391 act
->machine
.curctx
->VMXlevel
= 0; /* Set the level to user */
392 hw_lock_unlock((hw_lock_t
)&act
->machine
.curctx
->VMXsync
); /* Unlock */
394 while(vsvt
) { /* Clear any VMX saved state */
395 if (vsvt
== vsv
) break; /* Done when hit user if any */
396 vpst
= vsvt
; /* Remember so we can toss this */
397 vsvt
= (savearea_vec
*)vsvt
->save_hdr
.save_prev
; /* Get one underneath our's */
398 save_ret((savearea
*)vpst
); /* Release it */
403 if(act
->machine
.curctx
->FPUlevel
) { /* Is the current level user state? */
405 toss_live_fpu(act
->machine
.curctx
); /* Dump live floats if is not user */
407 if(!hw_lock_to((hw_lock_t
)&act
->machine
.curctx
->FPUsync
, LockTimeOut
)) { /* Get the sync lock */
408 panic("act_machine_sv_free - timeout getting FPU sync lock\n"); /* Tell all and die */
411 fsv
= act
->machine
.curctx
->FPUsave
; /* Get the top floats savearea */
412 while(fsv
&& fsv
->save_hdr
.save_level
) fsv
= (savearea_fpu
*)fsv
->save_hdr
.save_prev
; /* Find user context if any */
414 fsvt
= act
->machine
.curctx
->FPUsave
; /* Get the top of the chain */
415 act
->machine
.curctx
->FPUsave
= fsv
; /* Point to the user context */
416 act
->machine
.curctx
->FPUlevel
= 0; /* Set the level to user */
417 hw_lock_unlock((hw_lock_t
)&act
->machine
.curctx
->FPUsync
); /* Unlock */
419 while(fsvt
) { /* Clear any VMX saved state */
420 if (fsvt
== fsv
) break; /* Done when hit user if any */
421 fpst
= fsvt
; /* Remember so we can toss this */
422 fsvt
= (savearea_fpu
*)fsvt
->save_hdr
.save_prev
; /* Get one underneath our's */
423 save_ret((savearea
*)fpst
); /* Release it */
429 * free all regular saveareas except a user savearea, if any
432 pcb
= act
->machine
.pcb
; /* Get the general savearea */
433 userpcb
= 0; /* Assume no user context for now */
435 while(pcb
) { /* Any float saved state? */
436 if (pcb
->save_srr1
& MASK(MSR_PR
)) { /* Is this a user savearea? */
437 userpcb
= pcb
; /* Remember so we can toss this */
440 svp
= pcb
; /* Remember this */
441 pcb
= CAST_DOWN(savearea
*, pcb
->save_hdr
.save_prev
); /* Get one underneath our's */
442 save_ret(svp
); /* Release it */
445 act
->machine
.pcb
= userpcb
; /* Chain in the user if there is one, or 0 if not */
446 (void) ml_set_interrupts_enabled(intr
); /* Restore interrupts if enabled */
451 machine_act_terminate(
454 if(act
->machine
.bbDescAddr
) { /* Check if the Blue box assist is active */
455 disable_bluebox_internal(act
); /* Kill off bluebox */
458 if(act
->machine
.vmmControl
) { /* Check if VMM is active */
459 vmm_tear_down_all(act
); /* Kill off all VMM contexts */
464 machine_thread_terminate_self(void)
466 machine_act_terminate(current_thread());
470 machine_thread_init(void)
473 #if KERNEL_STACK_SIZE > PPC_PGBYTES
474 panic("KERNEL_STACK_SIZE can't be greater than PPC_PGBYTES\n");
482 dump_thread(thread_t th
)
484 printf(" thread @ 0x%x:\n", th
);
488 dump_act(thread_t thr_act
)
493 printf("thread(0x%x)(%d): task=%x(%d)\n",
494 thr_act
, thr_act
->ref_count
,
495 thr_act
->task
, thr_act
->task
? thr_act
->task
->ref_count
: 0);
497 printf("\tsusp=%x active=%x\n",
498 thr_act
->suspend_count
, thr_act
->active
);
500 return((int)thr_act
);
508 return(current_thread()->machine
.upcb
->save_srr0
);
512 * detach and return a kernel stack from a thread
516 machine_stack_detach(
521 KERNEL_DEBUG(MACHDBG_CODE(DBG_MACH_SCHED
,MACH_STACK_DETACH
),
522 thread
, thread
->priority
,
523 thread
->sched_pri
, 0, 0);
525 act_machine_sv_free(thread
);
527 stack
= thread
->kernel_stack
;
528 thread
->kernel_stack
= 0;
533 * attach a kernel stack to a thread and initialize it
535 * attaches a stack to a thread. if there is no save
536 * area we allocate one. the top save area is then
537 * loaded with the pc (continuation address), the initial
538 * stack pointer, and a std kernel MSR. if the top
539 * save area is the user save area bad things will
545 machine_stack_attach(
552 KERNEL_DEBUG(MACHDBG_CODE(DBG_MACH_SCHED
,MACH_STACK_ATTACH
),
553 thread
, thread
->priority
,
554 thread
->sched_pri
, 0, 0);
557 kss
= (unsigned int *)STACK_IKS(stack
);
558 thread
->kernel_stack
= stack
;
560 /* during initialization we sometimes do not have an
561 activation. in that case do not do anything */
562 sv
= save_get(); /* cannot block */
563 sv
->save_hdr
.save_flags
= (sv
->save_hdr
.save_flags
& ~SAVtype
) | (SAVgeneral
<< SAVtypeshft
); /* Mark as in use */
564 sv
->save_hdr
.save_act
= thread
;
565 sv
->save_hdr
.save_prev
= (addr64_t
)((uintptr_t)thread
->machine
.pcb
);
566 thread
->machine
.pcb
= sv
;
568 sv
->save_srr0
= (unsigned int)thread_continue
;
569 /* sv->save_r3 = ARG ? */
570 sv
->save_r1
= (vm_offset_t
)((int)kss
- KF_SIZE
);
571 sv
->save_srr1
= MSR_SUPERVISOR_INT_OFF
;
572 sv
->save_fpscr
= 0; /* Clear all floating point exceptions */
573 sv
->save_vrsave
= 0; /* Set the vector save state */
574 sv
->save_vscr
[3] = 0x00010000; /* Supress java mode */
575 *(CAST_DOWN(int *, sv
->save_r1
)) = 0;
577 thread
->machine
.ksp
= 0;
581 * move a stack from old to new thread
585 machine_stack_handoff(
592 facility_context
*fowner
;
594 struct per_proc_info
*ppinfo
;
600 panic("machine_stack_handoff");
602 stack
= machine_stack_detach(old
);
603 new->kernel_stack
= stack
;
604 if (stack
== old
->reserved_stack
) {
605 assert(new->reserved_stack
);
606 old
->reserved_stack
= new->reserved_stack
;
607 new->reserved_stack
= stack
;
610 ppinfo
= getPerProc(); /* Get our processor block */
612 ppinfo
->cpu_flags
&= ~traceBE
; /* Turn off special branch trace */
614 if(real_ncpus
> 1) { /* This is potentially slow, so only do when actually SMP */
615 fowner
= ppinfo
->FPU_owner
; /* Cache this because it may change */
616 if(fowner
) { /* Is there any live context? */
617 if(fowner
->facAct
== old
) { /* Is it for us? */
618 fpu_save(fowner
); /* Yes, save it */
621 fowner
= ppinfo
->VMX_owner
; /* Cache this because it may change */
622 if(fowner
) { /* Is there any live context? */
623 if(fowner
->facAct
== old
) { /* Is it for us? */
624 vec_save(fowner
); /* Yes, save it */
630 * If old thread is running VM, save per proc userProtKey and FamVMmode spcFlags bits in the thread spcFlags
631 * This bits can be modified in the per proc without updating the thread spcFlags
633 if(old
->machine
.specFlags
& runningVM
) { /* Is the current thread running a VM? */
634 old
->machine
.specFlags
&= ~(userProtKey
|FamVMmode
);
635 old
->machine
.specFlags
|= (ppinfo
->spcFlags
) & (userProtKey
|FamVMmode
);
637 old
->machine
.specFlags
&= ~OnProc
;
638 new->machine
.specFlags
|= OnProc
;
640 KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED
,MACH_STACK_HANDOFF
) | DBG_FUNC_NONE
,
641 old
->reason
, (int)new, old
->sched_pri
, new->sched_pri
, 0);
644 if(new->machine
.specFlags
& runningVM
) { /* Is the new guy running a VM? */
645 pmap_switch(new->machine
.vmmCEntry
->vmmPmap
); /* Switch to the VM's pmap */
646 ppinfo
->VMMareaPhys
= new->machine
.vmmCEntry
->vmmContextPhys
;
647 ppinfo
->VMMXAFlgs
= new->machine
.vmmCEntry
->vmmXAFlgs
;
648 ppinfo
->FAMintercept
= new->machine
.vmmCEntry
->vmmFAMintercept
;
650 else { /* otherwise, we use the task's pmap */
651 new_pmap
= new->task
->map
->pmap
;
652 if ((old
->task
->map
->pmap
!= new_pmap
) || (old
->machine
.specFlags
& runningVM
)) {
653 pmap_switch(new_pmap
);
657 machine_set_current_thread(new);
658 ppinfo
->Uassist
= new->machine
.cthread_self
;
660 ppinfo
->ppbbTaskEnv
= new->machine
.bbTaskEnv
;
661 ppinfo
->spcFlags
= new->machine
.specFlags
;
663 old
->machine
.umwSpace
|= umwSwitchAway
; /* Show we switched away from this guy */
664 mp
= (mapping_t
*)&ppinfo
->ppUMWmp
;
665 mp
->mpSpace
= invalSpace
; /* Since we can't handoff in the middle of copy in/out, just invalidate */
667 if (branch_tracing_enabled())
668 ppinfo
->cpu_flags
|= traceBE
;
670 if(trcWork
.traceMask
) dbgTrace(0x9903, (unsigned int)old
, (unsigned int)new, 0, 0); /* Cut trace entry if tracing */
676 * clean and initialize the current kernel stack and go to
677 * the given continuation routine
682 thread_continue_t continuation
,
684 wait_result_t wresult
)
686 thread_t self
= current_thread();
690 assert(self
->kernel_stack
);
691 kss
= (unsigned int *)STACK_IKS(self
->kernel_stack
);
692 assert(continuation
);
694 tsp
= (vm_offset_t
)((int)kss
- KF_SIZE
);
698 Call_continuation(continuation
, parameter
, wresult
, tsp
);