Annotation of sys/arch/solbourne/include/prom.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: prom.h,v 1.1 2005/04/19 21:30:18 miod Exp $ */
! 2: /*
! 3: * Copyright (c) 2005, Miodrag Vallat
! 4: *
! 5: * Redistribution and use in source and binary forms, with or without
! 6: * modification, are permitted provided that the following conditions
! 7: * are met:
! 8: * 1. Redistributions of source code must retain the above copyright
! 9: * notice, this list of conditions and the following disclaimer.
! 10: * 2. Redistributions in binary form must reproduce the above copyright
! 11: * notice, this list of conditions and the following disclaimer in the
! 12: * documentation and/or other materials provided with the distribution.
! 13: *
! 14: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 15: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
! 16: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! 17: * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
! 18: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
! 19: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
! 20: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 21: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
! 22: * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
! 23: * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! 24: * POSSIBILITY OF SUCH DAMAGE.
! 25: */
! 26:
! 27: #ifndef _SOLBOURNE_PROM_H_
! 28: #define _SOLBOURNE_PROM_H_
! 29:
! 30: /*
! 31: * The following describes the PROM communication structure,
! 32: * which appears at the beginning of physical memory.
! 33: */
! 34:
! 35: #define PROM_CODE_PA 0x00000000
! 36: #define PROM_CODE_VA PTW0_BASE
! 37: #define PROM_DATA_PA PHYSMEM_BASE
! 38: #define PROM_DATA_VA PTW1_BASE
! 39:
! 40: struct sb_prom {
! 41: int sp_interface; /* interface version */
! 42: int (*sp_interp)(const char *); /* prom commands */
! 43: char sp_version[128]; /* prom version */
! 44: int (*sp_eval)(const char *); /* forth commands */
! 45: int sp_ramdisk; /* ramdisk size if any in MB */
! 46: int sp_promend; /* first available va */
! 47: int sp_memsize; /* memory size in pages... */
! 48: int sp_memsize_mb; /* ...and in MB */
! 49: int sp_reserve_start; /* reserved area (in pages) */
! 50: int sp_reserve_len; /* and length (in pages) */
! 51: vaddr_t sp_msgbufp; /* PROM msgbuf pointer */
! 52: int sp_sash_usrtrap;
! 53: int sp_rootnode;
! 54: int sp_validregs; /* nonzero if registers... */
! 55: int sp_regs[100]; /* ...array is valid */
! 56: int sp_revision; /* prom revision */
! 57: };
! 58:
! 59: #define PROM_INTERFACE 4
! 60:
! 61: /*
! 62: * Reset strings
! 63: */
! 64:
! 65: #define PROM_RESET_COLD "cold"
! 66: #define PROM_RESET_WARM "warm"
! 67: #define PROM_RESET_HALT "halt"
! 68:
! 69: /*
! 70: * Environment variables (all upper-case)
! 71: */
! 72:
! 73: #define ENV_ETHERADDR "ENETADDR"
! 74: #define ENV_INPUTDEVICE "INPUT-DEVICE"
! 75: #define ENV_MODEL "MODEL"
! 76: #define ENV_OUTPUTDEVICE "OUTPUT-DEVICE"
! 77: #define ENV_TTYA "TTYA_MODE"
! 78: #define ENV_TTYB "TTYB_MODE"
! 79:
! 80: /*
! 81: * Node structures
! 82: */
! 83:
! 84: struct prom_node {
! 85: int pn_sibling;
! 86: int pn_child;
! 87: vaddr_t pn_props;
! 88: char *pn_name;
! 89: };
! 90:
! 91: struct prom_prop {
! 92: struct prom_prop *pp_next;
! 93: size_t pp_size;
! 94: char pp_data[0];
! 95: };
! 96:
! 97: /*
! 98: * System model
! 99: */
! 100:
! 101: extern int sysmodel;
! 102:
! 103: #define SYS_S4000 0xf4
! 104: #define SYS_S4100 0xf5
! 105:
! 106: const char *prom_getenv(const char *);
! 107:
! 108: #endif /* _SOLBOURNE_PROM_H_ */
CVSweb