cca.h revision 1.1
11.1Sragge/* $NetBSD: cca.h,v 1.1 2000/07/06 17:34:29 ragge Exp $ */ 21.1Sragge 31.1Sragge/* 41.1Sragge * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. 51.1Sragge * 61.1Sragge * Redistribution and use in source and binary forms, with or without 71.1Sragge * modification, are permitted provided that the following conditions 81.1Sragge * are met: 91.1Sragge * 1. Redistributions of source code must retain the above copyright 101.1Sragge * notice, this list of conditions and the following disclaimer. 111.1Sragge * 2. Redistributions in binary form must reproduce the above copyright 121.1Sragge * notice, this list of conditions and the following disclaimer in the 131.1Sragge * documentation and/or other materials provided with the distribution. 141.1Sragge * 3. All advertising materials mentioning features or use of this software 151.1Sragge * must display the following acknowledgement: 161.1Sragge * This product includes software developed at Ludd, University of 171.1Sragge * Lule}, Sweden and its contributors. 181.1Sragge * 4. The name of the author may not be used to endorse or promote products 191.1Sragge * derived from this software without specific prior written permission 201.1Sragge * 211.1Sragge * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Sragge * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Sragge * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Sragge * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Sragge * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Sragge * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Sragge * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Sragge * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Sragge * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 301.1Sragge * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Sragge */ 321.1Sragge 331.1Sragge/* 341.1Sragge * Console Communication Area (CCA) layout description. 351.1Sragge * OBS! This is incomplete and should be filled out if someone 361.1Sragge * find docs for it. 371.1Sragge */ 381.1Sragge 391.1Sraggestruct cca { 401.1Sragge struct cca *cca_base; /* Physical base address of block */ 411.1Sragge short cca_size; /* Size of this struct */ 421.1Sragge short cca_id; /* 'CC' */ 431.1Sragge char cca_maxcpu; /* max number of CPUs */ 441.1Sragge char cca_cksum; /* Checksum of all earlier bytes */ 451.1Sragge char cca_flags; 461.1Sragge char cca_revision; 471.1Sragge 481.1Sragge u_int64_t cca_ready; /* Data ready? */ 491.1Sragge u_int64_t cca_console; /* Processors in console mode */ 501.1Sragge u_int64_t cca_enabled; /* enabled/disabled */ 511.1Sragge long cca_bitmapsz; /* Size of memory bitmap */ 521.1Sragge long cca_bitmap; /* Address of memory bitmap */ 531.1Sragge long cca_bmcksum; /* Bitmap checksum */ 541.1Sragge long cca_bootdev; /* Node numbers */ 551.1Sragge u_int64_t cca_starting; /* Processors currently starting */ 561.1Sragge u_int64_t cca_restart; /* Processors currently restarting */ 571.1Sragge long cca_pad1[3]; 581.1Sragge u_int64_t cca_halted; /* Processors currently halted bny user */ 591.1Sragge char cca_sernum[8]; /* Serial number */ 601.1Sragge char cca_revs[16][8];/* CPU revisions */ 611.1Sragge u_int64_t cca_vecenab; /* Processors with enabled vector processors */ 621.1Sragge u_int64_t cca_vecwork; /* Processors with working vector processors */ 631.1Sragge long cca_vecrevs[16];/* Vector processor revisions */ 641.1Sragge char cca_pad2[208]; 651.1Sragge/* Inter-CPU communication structs */ 661.1Sragge struct { 671.1Sragge char cc_flags; /* Status flags */ 681.1Sragge char cc_to; /* Node sending to */ 691.1Sragge char cc_from; /* Node sending from */ 701.1Sragge char cc_pad; 711.1Sragge char cc_txlen; /* Length of transmit message */ 721.1Sragge char cc_rxlen; /* Length of receive message */ 731.1Sragge char cc_unbuf; 741.1Sragge char cc_txbuf[80]; /* Transmit buffer */ 751.1Sragge char cc_rxbuf[80]; /* Receive buffer */ 761.1Sragge } cca_cc[64]; 771.1Sragge}; 781.1Sragge 791.1Sragge#ifdef _KERNEL 801.1Sraggeextern struct cca *cca; 811.1Sragge#endif 82