2 * $FreeBSD: src/sys/boot/alpha/libalpha/OSFpal.c,v 1.2.2.1 2000/07/07 00:20:49 obrien Exp $
3 * $DragonFly: src/sys/boot/alpha/libalpha/Attic/OSFpal.c,v 1.2 2003/06/17 04:28:16 dillon Exp $
4 * From $NetBSD: OSFpal.c,v 1.5 1998/06/24 01:33:19 ross Exp $
8 * Copyright (c) 1994, 1996 Carnegie-Mellon University.
11 * Author: Keith Bostic
13 * Permission to use, copy, modify and distribute this software and
14 * its documentation is hereby granted, provided that both the copyright
15 * notice and this permission notice appear in all copies of the
16 * software, derivative works or modified versions, and any portions
17 * thereof, and that both notices appear in supporting documentation.
19 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
20 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
21 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
23 * Carnegie Mellon requests users of this software to return to
25 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
26 * School of Computer Science
27 * Carnegie Mellon University
28 * Pittsburgh PA 15213-3890
30 * any improvements or extensions that they make and grant Carnegie the
31 * rights to redistribute these changes.
34 #include <sys/types.h>
37 #include <machine/prom.h>
38 #include <machine/rpb.h>
39 #include <machine/alpha_cpu.h>
41 vm_offset_t ptbr_save;
51 r = (struct rpb *)HWRPB_ADDR;
53 * Note, cpu_number() is a VMS op, can't necessarily call it.
54 * Real fun: PAL_VMS_mfpr_whami == PAL_OSF1_rti...
55 * We might not be rpb_primary_cpu_id, but it is supposed to go
56 * first so the answer should apply to everyone.
58 p = LOCATE_PCS(r, r->rpb_primary_cpu_id);
60 printf("VMS PAL rev: 0x%lx\n", p->pcs_palrevisions[PALvar_OpenVMS]);
61 printf("OSF PAL rev: 0x%lx\n", p->pcs_palrevisions[PALvar_OSF1]);
63 if(p->pcs_pal_type==PAL_TYPE_OSF1) {
64 printf("OSF PAL code already running.\n");
65 ptbr_save = ((struct alpha_pcb *)p)->apcb_ptbr;
66 printf("PTBR is: 0x%lx\n", ptbr_save);
70 bcopy(&p->pcs_palrevisions[PALvar_OSF1], &p->pcs_pal_rev,
71 sizeof(p->pcs_pal_rev));
72 printf("Switch to OSF PAL code succeeded.\n");