1139738Simp/*-
2110211Smarcel * Copyright (c) 2003 Marcel Moolenaar
3110211Smarcel * Copyright (c) 2001 Doug Rabson
4110211Smarcel * All rights reserved.
5110211Smarcel *
6110211Smarcel * Redistribution and use in source and binary forms, with or without
7110211Smarcel * modification, are permitted provided that the following conditions
8110211Smarcel * are met:
9110211Smarcel *
10110211Smarcel * 1. Redistributions of source code must retain the above copyright
11110211Smarcel *    notice, this list of conditions and the following disclaimer.
12110211Smarcel * 2. Redistributions in binary form must reproduce the above copyright
13110211Smarcel *    notice, this list of conditions and the following disclaimer in the
14110211Smarcel *    documentation and/or other materials provided with the distribution.
15110211Smarcel *
16110211Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17110211Smarcel * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18110211Smarcel * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19110211Smarcel * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20110211Smarcel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21110211Smarcel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22110211Smarcel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23110211Smarcel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24110211Smarcel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25110211Smarcel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26110211Smarcel * SUCH DAMAGE.
27110211Smarcel *
28110211Smarcel * $FreeBSD$
29110211Smarcel */
30110211Smarcel
31110211Smarcel#include <machine/asm.h>
32110211Smarcel
33110211Smarcel	.text
34110211SmarcelENTRY(PalProc, 0)
35110211Smarcel	cmp.eq		p6,p0=6,r28		// PAL_PTCE_INFO
36110211Smarcel(p6)	br.cond.dptk	pal_ptce_info
37110211Smarcel	;;
38110211Smarcel	cmp.eq		p6,p0=8,r28		// PAL_VM_SUMMARY
39110211Smarcel(p6)	br.cond.dptk	pal_vm_summary
40110211Smarcel	;;
41110211Smarcel	cmp.eq		p6,p0=14,r28		// PAL_FREQ_RATIOS
42110211Smarcel(p6)	br.cond.dptk	pal_freq_ratios
43110211Smarcel	;;
44122351Smarcel	cmp.eq		p6,p0=29,r28		// PAL_HALT_LIGHT
45122351Smarcel(p6)	br.cond.dptk	pal_halt_light
46122351Smarcel	;;
47110211Smarcel	mov		r15=66			// EXIT
48110211Smarcel	break.i		0x80000			// SSC
49110211Smarcel	;;
50110211Smarcelpal_ptce_info:
51110211Smarcel	mov		r8=0
52110211Smarcel	mov		r9=0			// base
53110211Smarcel	movl		r10=0x0000000100000001	// loop counts (outer|inner)
54110211Smarcel	mov		r11=0x0000000000000000	// loop strides (outer|inner)
55110211Smarcel	br.sptk		b0
56110211Smarcelpal_vm_summary:
57110211Smarcel	mov		r8=0
58110211Smarcel	movl		r9=(8<<40)|(8<<32)	// VM info 1
59110211Smarcel	mov		r10=(18<<8)|(41<<0)	// VM info 2
60110211Smarcel	mov		r11=0
61110211Smarcel	br.sptk		b0
62110211Smarcelpal_freq_ratios:
63110211Smarcel	mov		r8=0
64110211Smarcel	movl		r9=0x0000000B00000002	// processor ratio 11/2
65110211Smarcel	movl		r10=0x0000000100000001	// bus ratio 1/1
66110211Smarcel	movl		r11=0x0000000B00000002	// ITC ratio 11/2
67110211Smarcel	br.sptk		b0
68122351Smarcelpal_halt_light:
69122351Smarcel	mov		r8=0
70122351Smarcel	mov		r9=0
71122351Smarcel	mov		r10=0
72122351Smarcel	mov		r11=0
73122351Smarcel	br.sptk		b0
74110211SmarcelEND(PalProc)
75