diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 2000-07-04 01:50:24 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 2000-07-04 01:50:24 +0000 |
| commit | a962db4085c65ce7811b80d8688ae54e5762c5c5 (patch) | |
| tree | 8748e238c293b94e7d1e4b7868b45d2dee9cd5b9 /sys/alpha | |
| parent | 2f309218d7c9f1ab62112f75d091fdf316fca206 (diff) | |
Notes
Diffstat (limited to 'sys/alpha')
| -rw-r--r-- | sys/alpha/include/cpufunc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/alpha/include/cpufunc.h b/sys/alpha/include/cpufunc.h index 98f72e85d046..96a91b6419ff 100644 --- a/sys/alpha/include/cpufunc.h +++ b/sys/alpha/include/cpufunc.h @@ -61,6 +61,13 @@ breakpoint(void) /* * Bulk i/o (for IDE driver). */ +static __inline void insb(u_int32_t port, void *buffer, size_t count) +{ + u_int8_t *p = (u_int8_t *) buffer; + while (count--) + *p++ = inb(port); +} + static __inline void insw(u_int32_t port, void *buffer, size_t count) { u_int16_t *p = (u_int16_t *) buffer; @@ -75,6 +82,13 @@ static __inline void insl(u_int32_t port, void *buffer, size_t count) *p++ = inl(port); } +static __inline void outsb(u_int32_t port, const void *buffer, size_t count) +{ + const u_int8_t *p = (const u_int8_t *) buffer; + while (count--) + outb(port, *p++); +} + static __inline void outsw(u_int32_t port, const void *buffer, size_t count) { const u_int16_t *p = (const u_int16_t *) buffer; |
