xref: /netbsd-src/sys/arch/vax/include/cca.h (revision 6a6027692662ba623e7bf5274322989a7b5d1440)
1*6a602769Sragge /*	$NetBSD: cca.h,v 1.3 2017/05/22 17:12:11 ragge Exp $	*/
25c501166Sragge 
35c501166Sragge /*
45c501166Sragge  * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
55c501166Sragge  *
65c501166Sragge  * Redistribution and use in source and binary forms, with or without
75c501166Sragge  * modification, are permitted provided that the following conditions
85c501166Sragge  * are met:
95c501166Sragge  * 1. Redistributions of source code must retain the above copyright
105c501166Sragge  *    notice, this list of conditions and the following disclaimer.
115c501166Sragge  * 2. Redistributions in binary form must reproduce the above copyright
125c501166Sragge  *    notice, this list of conditions and the following disclaimer in the
135c501166Sragge  *    documentation and/or other materials provided with the distribution.
145c501166Sragge  *
155c501166Sragge  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
165c501166Sragge  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
175c501166Sragge  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
185c501166Sragge  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
195c501166Sragge  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
205c501166Sragge  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
215c501166Sragge  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
225c501166Sragge  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
235c501166Sragge  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
245c501166Sragge  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
255c501166Sragge  */
265c501166Sragge 
275c501166Sragge /*
285c501166Sragge  * Console Communication Area (CCA) layout description.
295c501166Sragge  * OBS! This is incomplete and should be filled out if someone
305c501166Sragge  * find docs for it.
315c501166Sragge  */
325c501166Sragge 
335c501166Sragge struct cca {
345c501166Sragge 	struct cca *cca_base;	/* Physical base address of block */
35dfba8166Smatt 	uint16_t cca_size;	/* Size of this struct */
36dfba8166Smatt 	uint16_t cca_id;	/* 'CC' */
37dfba8166Smatt 	uint8_t  cca_maxcpu;	/* max number of CPUs */
38dfba8166Smatt 	uint8_t  cca_cksum;	/* Checksum of all earlier bytes */
39dfba8166Smatt 	uint8_t  cca_flags;
40dfba8166Smatt 	uint8_t  cca_revision;
415c501166Sragge 
42dfba8166Smatt 	uint64_t cca_ready;	/* Data ready? */
43dfba8166Smatt 	uint64_t cca_console;	/* Processors in console mode */
44dfba8166Smatt 	uint64_t cca_enabled;	/* enabled/disabled */
45dfba8166Smatt 	uint32_t cca_bitmapsz;	/* Size of memory bitmap */
46dfba8166Smatt 	uint32_t cca_bitmap;	/* Address of memory bitmap */
47dfba8166Smatt 	uint32_t cca_bmcksum;	/* Bitmap checksum */
48dfba8166Smatt 	uint32_t cca_bootdev;	/* Node numbers */
49dfba8166Smatt 	uint64_t cca_starting;	/* Processors currently starting */
50dfba8166Smatt 	uint64_t cca_restart;	/* Processors currently restarting */
51dfba8166Smatt 	uint32_t cca_pad1[3];
52dfba8166Smatt 	uint64_t cca_halted;	/* Processors currently halted bny user */
53dfba8166Smatt 	uint8_t  cca_sernum[8];	/* Serial number */
54dfba8166Smatt 	uint8_t  cca_revs[16][8];/* CPU revisions */
55dfba8166Smatt 	uint64_t cca_vecenab;	/* Processors with enabled vector processors */
56dfba8166Smatt 	uint64_t cca_vecwork;	/* Processors with working vector processors */
57dfba8166Smatt 	uint32_t cca_vecrevs[16];/* Vector processor revisions */
58dfba8166Smatt 	uint8_t  cca_pad2[208];
595c501166Sragge /* Inter-CPU communication structs */
605c501166Sragge 	struct {
61dfba8166Smatt 		uint8_t	cc_flags;	/* Status flags */
62dfba8166Smatt 		uint8_t	cc_to;		/* Node sending to */
63dfba8166Smatt 		uint8_t	cc_from;	/* Node sending from */
64dfba8166Smatt 		uint8_t	cc_pad;
65dfba8166Smatt 		uint8_t	cc_txlen;	/* Length of transmit message */
66dfba8166Smatt 		uint8_t	cc_rxlen;	/* Length of receive message */
67dfba8166Smatt 		uint8_t	cc_unbuf;
685c501166Sragge 		char	cc_txbuf[80];	/* Transmit buffer */
695c501166Sragge 		char	cc_rxbuf[80];	/* Receive buffer */
705c501166Sragge 	} cca_cc[64];
715c501166Sragge };
725c501166Sragge 
735c501166Sragge #ifdef _KERNEL
745c501166Sragge extern	struct cca *cca;
755c501166Sragge #endif
76