summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include/cpufunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/include/cpufunc.h')
-rw-r--r--sys/alpha/include/cpufunc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/alpha/include/cpufunc.h b/sys/alpha/include/cpufunc.h
index 98f72e8..96a91b6 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;
OpenPOWER on IntegriCloud