#define HWRPB_ADDR 0x10000000
#ifndef ASSEMBLER
struct rpb {
u_int64_t rpb_phys;
char rpb_magic[8];
u_int64_t rpb_version;
u_int64_t rpb_size;
u_int64_t rpb_primary_cpu_id;
u_int64_t rpb_page_size;
u_int32_t rpb_phys_addr_size;
u_int32_t rpb_extended_va_size;
u_int64_t rpb_max_asn;
char rpb_ssn[16];
#define ST_ADU 1
#define ST_DEC_4000 2
#define ST_DEC_7000 3
#define ST_DEC_3000_500 4
#define ST_DEC_2000_300 6
#define ST_DEC_3000_300 7
#define ST_AVALON_A12 8
#define ST_DEC_2100_A500 9
#define ST_DEC_APXVME_64 10
#define ST_DEC_AXPPCI_33 11
#define ST_DEC_21000 12
#define ST_DEC_2100_A50 13
#define ST_DEC_MUSTANG 14
#define ST_DEC_KN20AA 15
#define ST_DEC_1000 17
#define ST_EB66 19
#define ST_EB64P 20
#define ST_ALPHABOOK1 21
#define ST_DEC_4100 22
#define ST_DEC_EV45_PBP 23
#define ST_DEC_2100A_A500 24
#define ST_EB164 26
#define ST_DEC_1000A 27
#define ST_DEC_ALPHAVME_224 28
#define ST_DEC_550 30
#define ST_DEC_EV56_PBP 32
#define ST_DEC_ALPHAVME_320 33
#define ST_DEC_6600 34
#define ST_DEC_WILDFIRE 35
#define ST_DEC_CUSCO 36
#define ST_DEC_EIGER 37
#define ST_DEC_TITAN 38
#define ST_DEC_MARVEL 39
#define ST_API_NAUTILUS 201
u_int64_t rpb_type;
#define SV_MPCAP 0x00000001
#define SV_CONSOLE 0x0000001e
#define SV_CONSOLE_DETACHED 0x00000002
#define SV_CONSOLE_EMBEDDED 0x00000004
#define SV_POWERFAIL 0x000000e0
#define SV_PF_UNITED 0x00000020
#define SV_PF_SEPARATE 0x00000040
#define SV_PF_BBACKUP 0x00000060
#define SV_PF_ACTION 0x00000100
#define SV_GRAPHICS 0x00000200
#define SV_ST_MASK 0x0000fc00
#define SV_ST_RESERVED 0x00000000
#define SV_ST_SANDPIPER 0x00000400
#define SV_ST_FLAMINGO 0x00000800
#define SV_ST_HOTPINK 0x00000c00
#define SV_ST_FLAMINGOPLUS 0x00001000
#define SV_ST_ULTRA 0x00001400
#define SV_ST_SANDPLUS 0x00001800
#define SV_ST_SANDPIPER45 0x00001c00
#define SV_ST_FLAMINGO45 0x00002000
#define SV_ST_SABLE 0x00000400
#define SV_ST_PELICAN 0x00000000
#define SV_ST_PELICA 0x00000400
#define SV_ST_PELICANPLUS 0x00000800
#define SV_ST_PELICAPLUS 0x00000c00
#define SV_ST_AVANTI 0x00000000
#define SV_ST_MUSTANG2_4_166 0x00000800
#define SV_ST_MUSTANG2_4_233 0x00001000
#define SV_ST_AVANTI_XXX 0x00001400
#define SV_ST_AVANTI_4_266 0x00002000
#define SV_ST_MUSTANG2_4_100 0x00002400
#define SV_ST_AVANTI_4_233 0x0000a800
#define SV_ST_KN20AA 0x00000400
#define SV_ST_AXPVME_64 0x00000000
#define SV_ST_AXPVME_160 0x00000400
#define SV_ST_AXPVME_100 0x00000c00
#define SV_ST_AXPVME_230 0x00001000
#define SV_ST_AXPVME_66 0x00001400
#define SV_ST_AXPVME_166 0x00001800
#define SV_ST_AXPVME_264 0x00001c00
#define SV_ST_EB164_266 0x00000400
#define SV_ST_EB164_300 0x00000800
#define SV_ST_ALPHAPC164_366 0x00000c00
#define SV_ST_ALPHAPC164_400 0x00001000
#define SV_ST_ALPHAPC164_433 0x00001400
#define SV_ST_ALPHAPC164_466 0x00001800
#define SV_ST_ALPHAPC164_500 0x00001c00
#define SV_ST_ALPHAPC164LX_400 0x00002000
#define SV_ST_ALPHAPC164LX_466 0x00002400
#define SV_ST_ALPHAPC164LX_533 0x00002800
#define SV_ST_ALPHAPC164LX_600 0x00002c00
#define SV_ST_ALPHAPC164SX_400 0x00003000
#define SV_ST_ALPHAPC164SX_466 0x00003400
#define SV_ST_ALPHAPC164SX_533 0x00003800
#define SV_ST_ALPHAPC164SX_600 0x00003c00
#define SV_ST_MIATA_1_5 0x00004c00
u_int64_t rpb_variation;
char rpb_revision[8];
u_int64_t rpb_intr_freq;
u_int64_t rpb_cc_freq;
u_long rpb_vptb;
u_int64_t rpb_reserved_arch;
u_long rpb_tbhint_off;
u_int64_t rpb_pcs_cnt;
u_int64_t rpb_pcs_size;
u_long rpb_pcs_off;
u_int64_t rpb_ctb_cnt;
u_int64_t rpb_ctb_size;
u_long rpb_ctb_off;
u_long rpb_crb_off;
u_long rpb_memdat_off;
u_long rpb_condat_off;
u_long rpb_fru_off;
u_int64_t rpb_save_term;
u_int64_t rpb_save_term_val;
u_int64_t rpb_rest_term;
u_int64_t rpb_rest_term_val;
u_int64_t rpb_restart;
u_int64_t rpb_restart_val;
u_int64_t rpb_reserve_os;
u_int64_t rpb_reserve_hw;
u_int64_t rpb_checksum;
u_int64_t rpb_rxrdy;
u_int64_t rpb_txrdy;
u_long rpb_dsrdb_off;
u_int64_t rpb_tbhint[8];
};
#define LOCATE_PCS(h,cpunumber) ((struct pcs *) \
((char *)(h) + (h)->rpb_pcs_off + ((cpunumber) * (h)->rpb_pcs_size)))
struct pcs {
u_int8_t pcs_hwpcb[128];
#define PCS_BIP 0x000001
#define PCS_RC 0x000002
#define PCS_PA 0x000004
#define PCS_PP 0x000008
#define PCS_OH 0x000010
#define PCS_CV 0x000020
#define PCS_PV 0x000040
#define PCS_PMV 0x000080
#define PCS_PL 0x000100
#define PCS_HALT_REQ 0xff0000
#define PCS_HALT_DEFAULT 0x000000
#define PCS_HALT_SAVE_EXIT 0x010000
#define PCS_HALT_COLD_BOOT 0x020000
#define PCS_HALT_WARM_BOOT 0x030000
#define PCS_HALT_STAY_HALTED 0x040000
#define PCS_mbz 0xffffffffff000000
u_int64_t pcs_flags;
u_int64_t pcs_pal_memsize;
u_int64_t pcs_pal_scrsize;
u_long pcs_pal_memaddr;
u_long pcs_pal_scraddr;
struct {
u_int64_t
minorrev : 8,
majorrev : 8,
#define PAL_TYPE_STANDARD 0
#define PAL_TYPE_VMS 1
#define PAL_TYPE_OSF1 2
pal_type : 8,
sbz1 : 8,
compatibility : 16,
proc_cnt : 16;
} pcs_pal_rev;
#define pcs_minorrev pcs_pal_rev.minorrev
#define pcs_majorrev pcs_pal_rev.majorrev
#define pcs_pal_type pcs_pal_rev.pal_type
#define pcs_compatibility pcs_pal_rev.compatibility
#define pcs_proc_cnt pcs_pal_rev.proc_cnt
u_int64_t pcs_proc_type;
#define PCS_PROC_EV3 1
#define PCS_PROC_EV4 2
#define PCS_PROC_SIMULATION 3
#define PCS_PROC_LCA4 4
#define PCS_PROC_EV5 5
#define PCS_PROC_EV45 6
#define PCS_PROC_EV56 7
#define PCS_PROC_EV6 8
#define PCS_PROC_PCA56 9
#define PCS_PROC_PCA57 10
#define PCS_PROC_EV67 11
#define PCS_PROC_EV68CB 12
#define PCS_PROC_EV68AL 13
#define PCS_PROC_EV68CX 14
#define PCS_CPU_MAJORTYPE(p) ((p)->pcs_proc_type & 0xffffffff)
#define PCS_CPU_MINORTYPE(p) ((p)->pcs_proc_type >> 32)
u_int64_t pcs_proc_var;
#define PCS_VAR_VAXFP 0x0000000000000001
#define PCS_VAR_IEEEFP 0x0000000000000002
#define PCS_VAR_PE 0x0000000000000004
#define PCS_VAR_RESERVED 0xfffffffffffffff8
char pcs_proc_revision[8];
char pcs_proc_sn[16];
u_long pcs_machcheck;
u_int64_t pcs_machcheck_len;
u_long pcs_halt_pcbb;
u_long pcs_halt_pc;
u_int64_t pcs_halt_ps;
u_int64_t pcs_halt_r25;
u_int64_t pcs_halt_r26;
u_int64_t pcs_halt_r27;
#define PCS_HALT_RESERVED 0
#define PCS_HALT_POWERUP 1
#define PCS_HALT_CONSOLE_HALT 2
#define PCS_HALT_CONSOLE_CRASH 3
#define PCS_HALT_KERNEL_MODE 4
#define PCS_HALT_KERNEL_STACK_INVALID 5
#define PCS_HALT_DOUBLE_ERROR_ABORT 6
#define PCS_HALT_SCBB 7
#define PCS_HALT_PTBR 8
u_int64_t pcs_halt_reason;
u_int64_t pcs_reserved_soft;
struct {
u_int iccb_rxlen;
u_int iccb_txlen;
char iccb_rxbuf[80];
char iccb_txbuf[80];
} pcs_iccb;
#define PALvar_reserved 0
#define PALvar_OpenVMS 1
#define PALvar_OSF1 2
u_int64_t pcs_palrevisions[16];
u_int64_t pcs_reserved_arch[6];
};
struct ctb {
u_int64_t ctb_type;
u_int64_t ctb_unit;
u_int64_t ctb_reserved;
u_int64_t ctb_len;
u_int64_t ctb_ipl;
u_long ctb_tintr_vec;
u_long ctb_rintr_vec;
#define CTB_NONE 0x00
#define CTB_SERVICE 0x01
#define CTB_PRINTERPORT 0x02
#define CTB_GRAPHICS 0x03
#define CTB_TYPE4 0x04
#define CTB_NETWORK 0xC0
u_int64_t ctb_term_type;
u_int64_t ctb_keybd_type;
u_long ctb_keybd_trans;
u_long ctb_keybd_map;
u_int64_t ctb_keybd_state;
u_int64_t ctb_keybd_last;
u_long ctb_font_us;
u_long ctb_font_mcs;
u_int64_t ctb_font_width;
u_int64_t ctb_font_height;
u_int64_t ctb_mon_width;
u_int64_t ctb_mon_height;
u_int64_t ctb_dpi;
u_int64_t ctb_planes;
u_int64_t ctb_cur_width;
u_int64_t ctb_cur_height;
u_int64_t ctb_head_cnt;
u_int64_t ctb_opwindow;
u_long ctb_head_offset;
u_long ctb_putchar;
u_int64_t ctb_io_state;
u_int64_t ctb_listen_state;
u_long ctb_xaddr;
u_int64_t ctb_turboslot;
u_int64_t ctb_server_off;
u_int64_t ctb_line_off;
u_int8_t ctb_csd;
};
struct ctb_tt {
u_int64_t ctb_type;
u_int64_t ctb_unit;
u_int64_t ctb_reserved;
u_int64_t ctb_length;
u_int64_t ctb_csr;
u_int64_t ctb_tivec;
u_int64_t ctb_rivec;
u_int64_t ctb_baud;
u_int64_t ctb_put_sts;
u_int64_t ctb_get_sts;
u_int64_t ctb_reserved0;
};
#define CTB_TURBOSLOT_CHANNEL(x) (((x) >> 32) & 0xff)
#define CTB_TURBOSLOT_HOSE(x) (((x) >> 24) & 0xff)
#define CTB_TURBOSLOT_TYPE(x) (((x) >> 16) & 0xff)
#define CTB_TURBOSLOT_BUS(x) (((x) >> 8) & 0xff)
#define CTB_TURBOSLOT_SLOT(x) ((x) & 0xff)
#define CTB_TURBOSLOT_TYPE_TC 0
#define CTB_TURBOSLOT_TYPE_ISA 1
#define CTB_TURBOSLOT_TYPE_EISA 2
#define CTB_TURBOSLOT_TYPE_PCI 3
struct crd {
int64_t descriptor;
u_int64_t entry_va;
};
struct crb {
struct crd *crb_v_dispatch;
u_long crb_p_dispatch;
struct crd *crb_v_fixup;
u_long crb_p_fixup;
u_int64_t crb_map_cnt;
u_int64_t crb_page_cnt;
};
struct mddt {
int64_t mddt_cksum;
u_long mddt_physaddr;
u_int64_t mddt_cluster_cnt;
struct mddt_cluster {
u_long mddt_pfn;
u_int64_t mddt_pg_cnt;
u_int64_t mddt_pg_test;
u_long mddt_v_bitaddr;
u_long mddt_p_bitaddr;
int64_t mddt_bit_cksum;
#define MDDT_NONVOLATILE 0x02
#define MDDT_PALCODE 0x01
#define MDDT_SYSTEM 0x00
#define MDDT_mbz 0xfffffffffffffffc
int64_t mddt_usage;
} mddt_clusters[1];
};
struct dsrdb {
int64_t dsr_smm;
u_int64_t dsr_lurt_off;
u_int64_t dsr_sysname_off;
};
#define HWRPB_DSRDB_MINVERS 5
#ifdef _KERNEL
extern int cputype;
extern struct rpb *hwrpb;
#endif
#endif