1 /* $NetBSD: cca.h,v 1.3 2017/05/22 17:12:11 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 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27 /* 28 * Console Communication Area (CCA) layout description. 29 * OBS! This is incomplete and should be filled out if someone 30 * find docs for it. 31 */ 32 33 struct cca { 34 struct cca *cca_base; /* Physical base address of block */ 35 uint16_t cca_size; /* Size of this struct */ 36 uint16_t cca_id; /* 'CC' */ 37 uint8_t cca_maxcpu; /* max number of CPUs */ 38 uint8_t cca_cksum; /* Checksum of all earlier bytes */ 39 uint8_t cca_flags; 40 uint8_t cca_revision; 41 42 uint64_t cca_ready; /* Data ready? */ 43 uint64_t cca_console; /* Processors in console mode */ 44 uint64_t cca_enabled; /* enabled/disabled */ 45 uint32_t cca_bitmapsz; /* Size of memory bitmap */ 46 uint32_t cca_bitmap; /* Address of memory bitmap */ 47 uint32_t cca_bmcksum; /* Bitmap checksum */ 48 uint32_t cca_bootdev; /* Node numbers */ 49 uint64_t cca_starting; /* Processors currently starting */ 50 uint64_t cca_restart; /* Processors currently restarting */ 51 uint32_t cca_pad1[3]; 52 uint64_t cca_halted; /* Processors currently halted bny user */ 53 uint8_t cca_sernum[8]; /* Serial number */ 54 uint8_t cca_revs[16][8];/* CPU revisions */ 55 uint64_t cca_vecenab; /* Processors with enabled vector processors */ 56 uint64_t cca_vecwork; /* Processors with working vector processors */ 57 uint32_t cca_vecrevs[16];/* Vector processor revisions */ 58 uint8_t cca_pad2[208]; 59 /* Inter-CPU communication structs */ 60 struct { 61 uint8_t cc_flags; /* Status flags */ 62 uint8_t cc_to; /* Node sending to */ 63 uint8_t cc_from; /* Node sending from */ 64 uint8_t cc_pad; 65 uint8_t cc_txlen; /* Length of transmit message */ 66 uint8_t cc_rxlen; /* Length of receive message */ 67 uint8_t cc_unbuf; 68 char cc_txbuf[80]; /* Transmit buffer */ 69 char cc_rxbuf[80]; /* Receive buffer */ 70 } cca_cc[64]; 71 }; 72 73 #ifdef _KERNEL 74 extern struct cca *cca; 75 #endif 76