diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1999-11-09 04:13:55 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1999-11-09 04:13:55 +0000 |
commit | 03d4fb716427823837399569ed28e97ba72a2c87 (patch) | |
tree | 1cc2a7d33389cbb734eeebdfadf25b3aa635df9b /sys/arch/powerpc/include/pio.h | |
parent | 5e5bf313585557019b4eca25c977aa529dd6e86e (diff) |
autoconf.h
add mac hooks to the powerpc config structure, probably
a hack, and certainly needs to be cleaned up.
bus.h
p4e_ -> ppc_X
add write_multi and prototypes for bus_space_X_raw_multi functions.
intr.h
add structure for interrupt handler.
pio.h
remove the unnecessary and slowing "sync" instruction from
each pio access.
remove unnecessary newline characters from the generated asm.
eieio after writes, but before reads.
types.h
formatting change
vmparam.h
change powerpc kernel virtual memory sizing from a fixed segment
to a variable, initialized with a segment size, this is
so that the pmap allocator can steal virtual memory, if vm
is not yet set up. Necessary for mapping devices before the
kernel vm structures are initialized.
Diffstat (limited to 'sys/arch/powerpc/include/pio.h')
-rw-r--r-- | sys/arch/powerpc/include/pio.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sys/arch/powerpc/include/pio.h b/sys/arch/powerpc/include/pio.h index 4d411f3bef6..90be285be5e 100644 --- a/sys/arch/powerpc/include/pio.h +++ b/sys/arch/powerpc/include/pio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pio.h,v 1.3 1998/08/25 07:45:28 pefo Exp $ */ +/* $OpenBSD: pio.h,v 1.4 1999/11/09 04:13:54 rahnds Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA. @@ -37,6 +37,7 @@ /* * I/O macros. */ +void *mapiodev(paddr_t pa, psize_t len); static __inline void __outb(a,v) @@ -44,7 +45,7 @@ __outb(a,v) int v; { *a = v; - __asm__ volatile("eieio\n sync"); + __asm__ volatile("eieio"); } static __inline void @@ -53,7 +54,7 @@ __outw(a,v) u_int16_t v; { *a = v; - __asm__ volatile("eieio\n sync"); + __asm__ volatile("eieio"); } static __inline void @@ -62,7 +63,7 @@ __outl(a,v) int v; { *a = v; - __asm__ volatile("eieio\n sync"); + __asm__ volatile("eieio"); } static __inline void @@ -72,8 +73,8 @@ __outwrb(a,v) { u_int32_t _p_ = (u_int32_t)a; - __asm__ volatile("sthbrx %0, 0, %1\n" :: "r"(v), "r"(_p_)); - __asm__ volatile("eieio\n sync"); + __asm__ volatile("sthbrx %0, 0, %1" :: "r"(v), "r"(_p_)); + __asm__ volatile("eieio"); } static __inline void @@ -83,8 +84,8 @@ __outlrb(a,v) { u_int32_t _p_ = (u_int32_t)a; - __asm__ volatile("stwbrx %0, 0, %1\n" :: "r"(v), "r"(_p_)); - __asm__ volatile("eieio\n sync"); + __asm__ volatile("stwbrx %0, 0, %1" :: "r"(v), "r"(_p_)); + __asm__ volatile("eieio"); } static __inline u_int8_t @@ -93,8 +94,8 @@ __inb(a) { u_int8_t _v_; + __asm__ volatile("eieio"); _v_ = *a; - __asm__ volatile("eieio\n sync"); return _v_; } @@ -104,8 +105,8 @@ __inw(a) { u_int16_t _v_; + __asm__ volatile("eieio"); _v_ = *a; - __asm__ volatile("eieio\n sync"); return _v_; } @@ -115,8 +116,8 @@ __inl(a) { u_int32_t _v_; + __asm__ volatile("eieio"); _v_ = *a; - __asm__ volatile("eieio\n sync"); return _v_; } @@ -127,8 +128,8 @@ __inwrb(a) u_int16_t _v_; u_int32_t _p_ = (u_int32_t)a; - __asm__ volatile("lhbrx %0, 0, %1\n" : "=r"(_v_) : "r"(_p_)); - __asm__ volatile("eieio\n sync"); + __asm__ volatile("eieio"); + __asm__ volatile("lhbrx %0, 0, %1" : "=r"(_v_) : "r"(_p_)); return _v_; } @@ -139,8 +140,8 @@ __inlrb(a) u_int32_t _v_; u_int32_t _p_ = (u_int32_t)a; - __asm__ volatile("lwbrx %0, 0, %1\n" : "=r"(_v_) : "r"(_p_)); - __asm__ volatile("eieio\n sync"); + __asm__ volatile("eieio"); + __asm__ volatile("lwbrx %0, 0, %1" : "=r"(_v_) : "r"(_p_)); return _v_; } |