Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / hp700 / stand / common / machdep.c
blob2c67d8df6195b7a38110eb71e75d8f7a2ce6f44d
1 /* $NetBSD: machdep.c,v 1.3 2009/01/22 07:57:17 skrll Exp $ */
3 /* $OpenBSD: machdep.c,v 1.6 2001/06/04 22:25:52 mickey Exp $ */
5 /*
6 * Copyright (c) 1998-2004 Michael Shalayeff
7 * All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
22 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
31 #include <sys/param.h>
32 #include <sys/disklabel.h>
33 #include <sys/reboot.h>
34 #include "libsa.h"
35 #include <machine/iomod.h>
36 #include <machine/pdc.h>
38 #include "dev_hppa.h"
40 extern struct stable_storage sstor; /* contents of Stable Storage */
41 int howto;
42 btdev_t bootdev;
44 void
45 machdep(void)
47 pdc_init();
48 #ifdef notyet
49 debug_init();
50 #endif
51 cninit();
53 #ifdef PDCDEBUG
54 if (debug) {
55 int i;
57 printf("SSTOR:\n");
58 printf("pri_boot="); DEVPATH_PRINT(&sstor.ss_pri_boot);
59 printf("alt_boot="); DEVPATH_PRINT(&sstor.ss_alt_boot);
60 printf("console ="); DEVPATH_PRINT(&sstor.ss_console);
61 printf("keyboard="); DEVPATH_PRINT(&sstor.ss_keyboard);
62 printf("mem=%d, fn=%s, osver=%d\nos={",
63 sstor.ss_fast_size, sstor.ss_filenames,
64 sstor.ss_os_version);
65 for (i = 0; i < sizeof(sstor.ss_os); i++)
66 printf ("%x%c", sstor.ss_os[i], (i%8)? ',' : '\n');
68 printf("}\nPAGE0:\n");
69 printf("ivec=%x, pf=%p[%u], toc=%p[%u], rndz=%p, clk/10ms=%u\n",
70 PAGE0->ivec_special, PAGE0->ivec_mempf,
71 PAGE0->ivec_mempflen, PAGE0->ivec_toc,
72 PAGE0->ivec_toclen, PAGE0->ivec_rendz,
73 PAGE0->mem_10msec);
74 printf ("mem: cont=%u, phys=%u, pdc_spa=%u, resv=%u, free=%x\n"
75 "cpu_hpa=%x, pdc=%p, imm_hpa=%p[%u,%u], soft=%u\n",
76 PAGE0->memc_cont, PAGE0->memc_phsize, PAGE0->memc_adsize,
77 PAGE0->memc_resv, PAGE0->mem_free, PAGE0->mem_hpa,
78 PAGE0->mem_pdc, PAGE0->imm_hpa, PAGE0->imm_spa_size,
79 PAGE0->imm_max_mem, PAGE0->imm_soft_boot);
81 printf("console: "); PZDEV_PRINT(&PAGE0->mem_cons);
82 printf("boot: "); PZDEV_PRINT(&PAGE0->mem_boot);
83 printf("keyboard: "); PZDEV_PRINT(&PAGE0->mem_kbd);
85 #endif