cca.h revision 1.2
11.2Smatt/* $NetBSD: cca.h,v 1.2 2008/03/11 05:34:02 matt 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.2Smatt struct cca *cca_base; /* Physical base address of block */ 411.2Smatt uint16_t cca_size; /* Size of this struct */ 421.2Smatt uint16_t cca_id; /* 'CC' */ 431.2Smatt uint8_t cca_maxcpu; /* max number of CPUs */ 441.2Smatt uint8_t cca_cksum; /* Checksum of all earlier bytes */ 451.2Smatt uint8_t cca_flags; 461.2Smatt uint8_t cca_revision; 471.1Sragge 481.2Smatt uint64_t cca_ready; /* Data ready? */ 491.2Smatt uint64_t cca_console; /* Processors in console mode */ 501.2Smatt uint64_t cca_enabled; /* enabled/disabled */ 511.2Smatt uint32_t cca_bitmapsz; /* Size of memory bitmap */ 521.2Smatt uint32_t cca_bitmap; /* Address of memory bitmap */ 531.2Smatt uint32_t cca_bmcksum; /* Bitmap checksum */ 541.2Smatt uint32_t cca_bootdev; /* Node numbers */ 551.2Smatt uint64_t cca_starting; /* Processors currently starting */ 561.2Smatt uint64_t cca_restart; /* Processors currently restarting */ 571.2Smatt uint32_t cca_pad1[3]; 581.2Smatt uint64_t cca_halted; /* Processors currently halted bny user */ 591.2Smatt uint8_t cca_sernum[8]; /* Serial number */ 601.2Smatt uint8_t cca_revs[16][8];/* CPU revisions */ 611.2Smatt uint64_t cca_vecenab; /* Processors with enabled vector processors */ 621.2Smatt uint64_t cca_vecwork; /* Processors with working vector processors */ 631.2Smatt uint32_t cca_vecrevs[16];/* Vector processor revisions */ 641.2Smatt uint8_t cca_pad2[208]; 651.1Sragge/* Inter-CPU communication structs */ 661.1Sragge struct { 671.2Smatt uint8_t cc_flags; /* Status flags */ 681.2Smatt uint8_t cc_to; /* Node sending to */ 691.2Smatt uint8_t cc_from; /* Node sending from */ 701.2Smatt uint8_t cc_pad; 711.2Smatt uint8_t cc_txlen; /* Length of transmit message */ 721.2Smatt uint8_t cc_rxlen; /* Length of receive message */ 731.2Smatt uint8_t 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