PERFORCE change 29106 for review
Marcel Moolenaar
marcel at FreeBSD.org
Thu Apr 17 00:14:51 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=29106
Change 29106 by marcel at marcel_nfs on 2003/04/17 00:14:14
Use ar.k5 and not ar.k3 to pass the EPC gateway page to userland.
Using ar.k3 is slightly less optimal in that we have to make sure
ar.k3 is defined is we jump into user space because it can be
clobbered by PAL code on exception. By using ar.k5 we make it an
invariant register, which means we don't have to worry about it.
Of course, using ar.k5 takes up one of the preserved kernel regs,
which means that we don't have any left. I tried to avoid that,
but the reduced complexity is slightly more pleasing now...
Oh: minor style change (initialize ar.k4 immediately after we
define pcpup) and remove a space.
Affected files ...
.. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#12 edit
Differences ...
==== //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#12 (text+ko) ====
@@ -389,8 +389,8 @@
__asm __volatile("mov psr.l=%0" :: "r" (psr));
__asm __volatile("srlz.i");
- /* Expose the mapping to userland in ar.k3 */
- ia64_set_k3(VM_MAX_ADDRESS);
+ /* Expose the mapping to userland in ar.k5 */
+ ia64_set_k5(VM_MAX_ADDRESS);
}
static void
@@ -715,9 +715,9 @@
/*
* Setup the global data for the bootstrap cpu.
*/
- pcpup = (struct pcpu *) pmap_steal_memory(PAGE_SIZE);
+ pcpup = (struct pcpu *)pmap_steal_memory(PAGE_SIZE);
+ ia64_set_k4((u_int64_t)pcpup);
pcpu_init(pcpup, 0, PAGE_SIZE);
- ia64_set_k4((u_int64_t) pcpup);
PCPU_SET(curthread, &thread0);
/*
More information about the p4-projects
mailing list