NetBSD Problem Report #12155

Received: (qmail 1512 invoked from network); 8 Feb 2001 18:48:49 -0000
From: rjs@genrad.co.uk
Reply-To: rjs@fdy2.demon.co.uk
To: gnats-bugs@gnats.netbsd.org
Subject: read buffer support
X-Send-Pr-Version: 3.95

>Number:         12155
>Category:       port-arm
>Synopsis:       Add libarch support for flushing the read buffer
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 08 18:49:00 +0000 2001
>Closed-Date:    Sat Apr 12 12:15:47 +0000 2003
>Last-Modified:  Sat Apr 12 12:15:47 +0000 2003
>Originator:     Robert Swindells
>Release:        05-02-2001
>Organization:
GenRad Ltd

>Environment:

System: NetBSD cats.uk.genrad.com 1.5I NetBSD 1.5I (MYCATS) #4: Fri Nov 10 17:08:19 GMT 2000 bin@cats.uk.genrad.com:/u21/src/sys/arch/arm32/compile/MYCATS arm32
Architecture: arm32
Machine: arm32
>Description:
	Later members of the StrongARM family have support for flushing the
	read buffer as well as the write buffer.

	This patch provides the userland interface to this feature.

	The kernel support to flush the buffer itself will form part of
	the SA-11x0 support.

>How-To-Repeat:
	N/A

>Fix:


------- File: arm32_drain_readbuf.2 -----
.\" Copyright (c) 2000 Robert Swindells
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by Robert Swindells
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	$NetBSD: $
.\"
.Dd June 21, 2000
.Dt ARM32_DRAIN_READBUF 2
.Os
.Sh NAME
.Nm arm32_drain_readbuf
.Nd drains the cpu read buffer
.Sh LIBRARY
.Lb libarm32
.Sh SYNOPSIS
.Fd #include <machine/sysarch.h>
.Ft int
.Fn arm32_drain_readbuf
.Sh DESCRIPTION
.Fn arm32_drain_readbuf
will make sure that all the entries in the processor read buffer are
flushed.
.Pp
Not all processors support this operation (currently only the SA1100
and SA1110).
Those processors that do not treat this function as a null-op.
.Sh ERRORS
.Fn arm32_drain_readbuf
will never fail so will always return 0.
.Sh REFERENCES
StrongARM Data Sheet
----- File: arm32_drain_readbuf.c -------
/*	$NetBSD: $ */

/*
 * Copyright (c) 2000 Robert Swindells.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by Robert Swindells
 * 4. The name of the company nor the name of the author may be used to
 *    endorse or promote products derived from this software without specific
 *    prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <sys/cdefs.h>
#include <sys/types.h>

#include <machine/sysarch.h>

int
arm32_drain_readbuf()
{
	return sysarch(ARM32_DRAIN_READBUF, (void *)0);
}

Index: Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libarch/arm32/Makefile.inc,v
retrieving revision 1.5
diff -r1.5 Makefile.inc
4c4
< SRCS+=	arm32_sync_icache.c arm32_drain_writebuf.c
---
> SRCS+=	arm32_sync_icache.c arm32_drain_writebuf.c arm32_drain_readbuf.c
7c7
< MAN+=	arm32_sync_icache.2 arm32_drain_writebuf.2
---
> MAN+=	arm32_sync_icache.2 arm32_drain_writebuf.2 arm32_drain_readbuf.2
Index: arm32_drain_writebuf.2
===================================================================
RCS file: /cvsroot/basesrc/lib/libarch/arm32/arm32_drain_writebuf.2,v
retrieving revision 1.3
diff -r1.3 arm32_drain_writebuf.2
50,51c50,52
< Not all processors support this operation (currently only the SA110).
< Those processes that do not treat this function as a null-op.
---
> Not all processors support this operation (currently only the SA110, SA1100
> and SA1110).
> Those processors that do not treat this function as a null-op.
Index: arm32_sync_icache.2
===================================================================
RCS file: /cvsroot/basesrc/lib/libarch/arm32/arm32_sync_icache.2,v
retrieving revision 1.5
diff -r1.5 arm32_sync_icache.2
50,51c50,51
< Some ARM processors (e.g SA110) have separate instruction and data
< caches thus any dynamically generated or modified code needs to be
---
> Some ARM processors (e.g SA110, SA1100 and SA1110) have separate instruction
> and data caches thus any dynamically generated or modified code needs to be
Index: sysarch.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm32/include/sysarch.h,v
retrieving revision 1.5
diff -r1.5 sysarch.h
43a44
> #define ARM32_DRAIN_READBUF	2
52a54
> int arm32_drain_readbuf		__P((void));

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-arm32-maintainer->port-arm-maintainer 
Responsible-Changed-By: bjh21 
Responsible-Changed-When: Mon Aug 5 17:48:12 PDT 2002 
Responsible-Changed-Why:  
The arm32 port has disappeared. 
State-Changed-From-To: open->closed 
State-Changed-By: rjs 
State-Changed-When: Sat Apr 12 05:13:38 PDT 2003 
State-Changed-Why:  
Couldn't think of a good use for the suggested feature. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.