cca.h revision 1.3
11.3Sragge/* $NetBSD: cca.h,v 1.3 2017/05/22 17:12:11 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 * 151.1Sragge * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 161.1Sragge * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 171.1Sragge * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 181.1Sragge * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 191.1Sragge * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 201.1Sragge * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 211.1Sragge * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 221.1Sragge * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 231.1Sragge * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 241.1Sragge * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 251.1Sragge */ 261.1Sragge 271.1Sragge/* 281.1Sragge * Console Communication Area (CCA) layout description. 291.1Sragge * OBS! This is incomplete and should be filled out if someone 301.1Sragge * find docs for it. 311.1Sragge */ 321.1Sragge 331.1Sraggestruct cca { 341.2Smatt struct cca *cca_base; /* Physical base address of block */ 351.2Smatt uint16_t cca_size; /* Size of this struct */ 361.2Smatt uint16_t cca_id; /* 'CC' */ 371.2Smatt uint8_t cca_maxcpu; /* max number of CPUs */ 381.2Smatt uint8_t cca_cksum; /* Checksum of all earlier bytes */ 391.2Smatt uint8_t cca_flags; 401.2Smatt uint8_t cca_revision; 411.1Sragge 421.2Smatt uint64_t cca_ready; /* Data ready? */ 431.2Smatt uint64_t cca_console; /* Processors in console mode */ 441.2Smatt uint64_t cca_enabled; /* enabled/disabled */ 451.2Smatt uint32_t cca_bitmapsz; /* Size of memory bitmap */ 461.2Smatt uint32_t cca_bitmap; /* Address of memory bitmap */ 471.2Smatt uint32_t cca_bmcksum; /* Bitmap checksum */ 481.2Smatt uint32_t cca_bootdev; /* Node numbers */ 491.2Smatt uint64_t cca_starting; /* Processors currently starting */ 501.2Smatt uint64_t cca_restart; /* Processors currently restarting */ 511.2Smatt uint32_t cca_pad1[3]; 521.2Smatt uint64_t cca_halted; /* Processors currently halted bny user */ 531.2Smatt uint8_t cca_sernum[8]; /* Serial number */ 541.2Smatt uint8_t cca_revs[16][8];/* CPU revisions */ 551.2Smatt uint64_t cca_vecenab; /* Processors with enabled vector processors */ 561.2Smatt uint64_t cca_vecwork; /* Processors with working vector processors */ 571.2Smatt uint32_t cca_vecrevs[16];/* Vector processor revisions */ 581.2Smatt uint8_t cca_pad2[208]; 591.1Sragge/* Inter-CPU communication structs */ 601.1Sragge struct { 611.2Smatt uint8_t cc_flags; /* Status flags */ 621.2Smatt uint8_t cc_to; /* Node sending to */ 631.2Smatt uint8_t cc_from; /* Node sending from */ 641.2Smatt uint8_t cc_pad; 651.2Smatt uint8_t cc_txlen; /* Length of transmit message */ 661.2Smatt uint8_t cc_rxlen; /* Length of receive message */ 671.2Smatt uint8_t cc_unbuf; 681.1Sragge char cc_txbuf[80]; /* Transmit buffer */ 691.1Sragge char cc_rxbuf[80]; /* Receive buffer */ 701.1Sragge } cca_cc[64]; 711.1Sragge}; 721.1Sragge 731.1Sragge#ifdef _KERNEL 741.1Sraggeextern struct cca *cca; 751.1Sragge#endif 76