1 /* $NetBSD: cca.h,v 1.1 2000/07/06 17:34:29 ragge Exp $ */ 2 3 /* 4 * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed at Ludd, University of 17 * Lule}, Sweden and its contributors. 18 * 4. The name of the author may not be used to endorse or promote products 19 * derived from this software without specific prior written permission 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 /* 34 * Console Communication Area (CCA) layout description. 35 * OBS! This is incomplete and should be filled out if someone 36 * find docs for it. 37 */ 38 39 struct cca { 40 struct cca *cca_base; /* Physical base address of block */ 41 short cca_size; /* Size of this struct */ 42 short cca_id; /* 'CC' */ 43 char cca_maxcpu; /* max number of CPUs */ 44 char cca_cksum; /* Checksum of all earlier bytes */ 45 char cca_flags; 46 char cca_revision; 47 48 u_int64_t cca_ready; /* Data ready? */ 49 u_int64_t cca_console; /* Processors in console mode */ 50 u_int64_t cca_enabled; /* enabled/disabled */ 51 long cca_bitmapsz; /* Size of memory bitmap */ 52 long cca_bitmap; /* Address of memory bitmap */ 53 long cca_bmcksum; /* Bitmap checksum */ 54 long cca_bootdev; /* Node numbers */ 55 u_int64_t cca_starting; /* Processors currently starting */ 56 u_int64_t cca_restart; /* Processors currently restarting */ 57 long cca_pad1[3]; 58 u_int64_t cca_halted; /* Processors currently halted bny user */ 59 char cca_sernum[8]; /* Serial number */ 60 char cca_revs[16][8];/* CPU revisions */ 61 u_int64_t cca_vecenab; /* Processors with enabled vector processors */ 62 u_int64_t cca_vecwork; /* Processors with working vector processors */ 63 long cca_vecrevs[16];/* Vector processor revisions */ 64 char cca_pad2[208]; 65 /* Inter-CPU communication structs */ 66 struct { 67 char cc_flags; /* Status flags */ 68 char cc_to; /* Node sending to */ 69 char cc_from; /* Node sending from */ 70 char cc_pad; 71 char cc_txlen; /* Length of transmit message */ 72 char cc_rxlen; /* Length of receive message */ 73 char cc_unbuf; 74 char cc_txbuf[80]; /* Transmit buffer */ 75 char cc_rxbuf[80]; /* Receive buffer */ 76 } cca_cc[64]; 77 }; 78 79 #ifdef _KERNEL 80 extern struct cca *cca; 81 #endif 82