xref: /netbsd-src/sys/arch/sparc/include/remote-sl.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: remote-sl.h,v 1.4 2005/12/11 12:19:06 christos Exp $ */
2274a9076Sderaadt 
34588caefSderaadt /*
44588caefSderaadt  * Copyright (c) 1992, 1993
54588caefSderaadt  *	The Regents of the University of California.  All rights reserved.
64588caefSderaadt  *
74588caefSderaadt  * This software was developed by the Computer Systems Engineering group
84588caefSderaadt  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
94588caefSderaadt  * contributed to Berkeley.
104588caefSderaadt  *
114588caefSderaadt  * All advertising materials mentioning features or use of this software
124588caefSderaadt  * must display the following acknowledgement:
134588caefSderaadt  *	This product includes software developed by the University of
144588caefSderaadt  *	California, Lawrence Berkeley Laboratory.
154588caefSderaadt  *
164588caefSderaadt  * Redistribution and use in source and binary forms, with or without
174588caefSderaadt  * modification, are permitted provided that the following conditions
184588caefSderaadt  * are met:
194588caefSderaadt  * 1. Redistributions of source code must retain the above copyright
204588caefSderaadt  *    notice, this list of conditions and the following disclaimer.
214588caefSderaadt  * 2. Redistributions in binary form must reproduce the above copyright
224588caefSderaadt  *    notice, this list of conditions and the following disclaimer in the
234588caefSderaadt  *    documentation and/or other materials provided with the distribution.
24aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
254588caefSderaadt  *    may be used to endorse or promote products derived from this software
264588caefSderaadt  *    without specific prior written permission.
274588caefSderaadt  *
284588caefSderaadt  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
294588caefSderaadt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
304588caefSderaadt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
314588caefSderaadt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
324588caefSderaadt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
334588caefSderaadt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
344588caefSderaadt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
354588caefSderaadt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
364588caefSderaadt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
374588caefSderaadt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
384588caefSderaadt  * SUCH DAMAGE.
394588caefSderaadt  *
404588caefSderaadt  *	@(#)remote-sl.h	8.1 (Berkeley) 6/11/93
414588caefSderaadt  */
424588caefSderaadt 
434588caefSderaadt /*
444588caefSderaadt  * These definitions are factored out into an include file so
454588caefSderaadt  * the kernel stub has access to them.
464588caefSderaadt  */
474588caefSderaadt #define FRAME_START		0xc1		/* Frame End */
484588caefSderaadt #define FRAME_END		0xc0		/* Frame End */
494588caefSderaadt #define FRAME_ESCAPE		0xdb		/* Frame Esc */
504588caefSderaadt #define TRANS_FRAME_START	0xde		/* transposed frame start */
514588caefSderaadt #define TRANS_FRAME_END		0xdc		/* transposed frame esc */
524588caefSderaadt #define TRANS_FRAME_ESCAPE	0xdd		/* transposed frame esc */
534588caefSderaadt 
544588caefSderaadt /*
554588caefSderaadt  * Message limits. SL_MAXDATA is the maximum number of bytes that can
564588caefSderaadt  * be read or written. SL_BUFSIZE is the maximum amount of data that
574588caefSderaadt  * can be passed across the serial link. The actual MTU is two times
584588caefSderaadt  * the max message (since each byte might be escaped), plus the two
594588caefSderaadt  * framing bytes. We add two to the message length to account for the
604588caefSderaadt  * type byte and checksum.
614588caefSderaadt  */
624588caefSderaadt #define SL_MAXDATA 62			/* max data that can be read */
634588caefSderaadt #define SL_RPCSIZE (1 + SL_MAXDATA)	/* errno byte + data */
644588caefSderaadt #define SL_MTU ((2 * (SL_RPCSIZE + 2) + 2))
65