1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Add macros for accessing device memory.

This commit is contained in:
Doug Rabson 1998-08-17 08:57:05 +00:00
parent 744857bc1c
commit e31fa854a0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38392
2 changed files with 18 additions and 2 deletions

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cpufunc.h,v 1.79 1998/05/17 18:53:08 tegge Exp $
* $Id: cpufunc.h,v 1.80 1998/07/11 04:58:25 bde Exp $
*/
/*
@ -49,6 +49,14 @@
extern int tlb_flush_count;
#endif
#define readb(va) (*(volatile u_int8_t *) (va))
#define readw(va) (*(volatile u_int16_t *) (va))
#define readl(va) (*(volatile u_int32_t *) (va))
#define writeb(va, d) (*(volatile u_int8_t *) (va) = (d))
#define writew(va, d) (*(volatile u_int16_t *) (va) = (d))
#define writel(va, d) (*(volatile u_int32_t *) (va) = (d))
#ifdef __GNUC__
static __inline void

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cpufunc.h,v 1.79 1998/05/17 18:53:08 tegge Exp $
* $Id: cpufunc.h,v 1.80 1998/07/11 04:58:25 bde Exp $
*/
/*
@ -49,6 +49,14 @@
extern int tlb_flush_count;
#endif
#define readb(va) (*(volatile u_int8_t *) (va))
#define readw(va) (*(volatile u_int16_t *) (va))
#define readl(va) (*(volatile u_int32_t *) (va))
#define writeb(va, d) (*(volatile u_int8_t *) (va) = (d))
#define writew(va, d) (*(volatile u_int16_t *) (va) = (d))
#define writel(va, d) (*(volatile u_int32_t *) (va) = (d))
#ifdef __GNUC__
static __inline void