endianness conversion on pci bridges.
ok deraadt@ jsing@
-/* $OpenBSD: bus.h,v 1.9 2008/03/30 20:14:38 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.10 2008/07/30 17:37:44 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB Sweden. All rights reserved.
bus_size_t);
void (*_space_write_8)(bus_space_tag_t , bus_space_handle_t,
bus_size_t, u_int64_t);
+ void (*_space_read_raw_2)(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+ void (*_space_write_raw_2)(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+ void (*_space_read_raw_4)(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+ void (*_space_write_raw_4)(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+ void (*_space_read_raw_8)(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+ void (*_space_write_raw_8)(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
int (*_space_map)(bus_space_tag_t , bus_addr_t,
bus_size_t, int, bus_space_handle_t *);
void (*_space_unmap)(bus_space_tag_t, bus_space_handle_t,
#define bus_space_write_4(t, h, o, v) (*(t)->_space_write_4)((t), (h), (o), (v))
#define bus_space_write_8(t, h, o, v) (*(t)->_space_write_8)((t), (h), (o), (v))
+#define bus_space_read_raw_multi_2(t, h, a, b, l) \
+ (*(t)->_space_read_raw_2)((t), (h), (a), (b), (l))
+#define bus_space_read_raw_multi_4(t, h, a, b, l) \
+ (*(t)->_space_read_raw_4)((t), (h), (a), (b), (l))
+#define bus_space_read_raw_multi_8(t, h, a, b, l) \
+ (*(t)->_space_read_raw_8)((t), (h), (a), (b), (l))
+
+#define bus_space_write_raw_multi_2(t, h, a, b, l) \
+ (*(t)->_space_write_raw_2)((t), (h), (a), (b), (l))
+#define bus_space_write_raw_multi_4(t, h, a, b, l) \
+ (*(t)->_space_write_raw_4)((t), (h), (a), (b), (l))
+#define bus_space_write_raw_multi_8(t, h, a, b, l) \
+ (*(t)->_space_write_raw_8)((t), (h), (a), (b), (l))
+
#define bus_space_map(t, o, s, c, p) (*(t)->_space_map)((t), (o), (s), (c), (p))
#define bus_space_unmap(t, h, s) (*(t)->_space_unmap)((t), (h), (s))
#define bus_space_subregion(t, h, o, s, p) \
bus_space_set_region(4,32)
bus_space_set_region(8,64)
-/*----------------------------------------------------------------------------*/
-#define bus_space_read_raw_multi(n,m,l) \
-static __inline void \
-CAT(bus_space_read_raw_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_addr_t ba, u_int8_t *buf, bus_size_t cnt) \
-{ \
- CAT(bus_space_read_multi_,n)(bst, bsh, ba, (CAT3(u_int,m,_t) *)buf, \
- cnt >> l); \
-}
-
-bus_space_read_raw_multi(2,16,1)
-bus_space_read_raw_multi(4,32,2)
-bus_space_read_raw_multi(8,64,3)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_write_raw_multi(n,m,l) \
-static __inline void \
-CAT(bus_space_write_raw_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh,\
- bus_addr_t ba, const u_int8_t *buf, bus_size_t cnt) \
-{ \
- CAT(bus_space_write_multi_,n)(bst, bsh, ba, \
- (const CAT3(u_int,m,_t) *)buf, cnt >> l); \
-}
-
-bus_space_write_raw_multi(2,16,1)
-bus_space_write_raw_multi(4,32,2)
-bus_space_write_raw_multi(8,64,3)
-
/*----------------------------------------------------------------------------*/
static __inline void
bus_space_copy_1(void *v, bus_space_handle_t h1, bus_size_t o1,
-/* $OpenBSD: macebus.c,v 1.36 2008/04/07 22:34:23 miod Exp $ */
+/* $OpenBSD: macebus.c,v 1.37 2008/07/30 17:37:46 miod Exp $ */
/*
* Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se)
void mace_write_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t);
void mace_write_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t);
+void mace_read_raw_2(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+void mace_write_raw_2(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+void mace_read_raw_4(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+void mace_write_raw_4(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+void mace_read_raw_8(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+void mace_write_raw_8(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+
int mace_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *);
void mace_space_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t);
int mace_space_region(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *);
mace_read_2, mace_write_2,
mace_read_4, mace_write_4,
mace_read_8, mace_write_8,
+ mace_read_raw_2, mace_write_raw_2,
+ mace_read_raw_4, mace_write_raw_4,
+ mace_read_raw_8, mace_write_raw_8,
mace_space_map, mace_space_unmap, mace_space_region,
mace_space_vaddr
};
mace_read_2, mace_write_2,
mace_read_4, mace_write_4,
mace_read_8, mace_write_8,
+ mace_read_raw_2, mace_write_raw_2,
+ mace_read_raw_4, mace_write_raw_4,
+ mace_read_raw_8, mace_write_raw_8,
mace_space_map, mace_space_unmap, mace_space_region,
mace_space_vaddr
};
*(volatile u_int64_t *)(h + o) = v;
}
+void
+mace_read_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ u_int8_t *buf, bus_size_t len)
+{
+ panic(__func__);
+}
+
+void
+mace_write_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const u_int8_t *buf, bus_size_t len)
+{
+ panic(__func__);
+}
+
+void
+mace_read_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int32_t *addr = (volatile u_int32_t *)(h + o);
+ len >>= 2;
+ while (len-- != 0) {
+ *(u_int32_t *)buf = *addr;
+ buf += 4;
+ }
+}
+
+void
+mace_write_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int32_t *addr = (volatile u_int32_t *)(h + o);
+ len >>= 2;
+ while (len-- != 0) {
+ *addr = *(u_int32_t *)buf;
+ buf += 4;
+ }
+}
+
+void
+mace_read_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int64_t *addr = (volatile u_int64_t *)(h + o);
+ len >>= 3;
+ while (len-- != 0) {
+ *(u_int64_t *)buf = *addr;
+ buf += 8;
+ }
+}
+
+void
+mace_write_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int64_t *addr = (volatile u_int64_t *)(h + o);
+ len >>= 3;
+ while (len-- != 0) {
+ *addr = *(u_int64_t *)buf;
+ buf += 8;
+ }
+}
+
extern int extent_malloc_flags;
int
-/* $OpenBSD: macepcibridge.c,v 1.16 2008/07/30 17:32:30 miod Exp $ */
+/* $OpenBSD: macepcibridge.c,v 1.17 2008/07/30 17:37:46 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se)
mace_pcib_read_2, mace_pcib_write_2,
mace_pcib_read_4, mace_pcib_write_4,
mace_pcib_read_8, mace_pcib_write_8,
+ mace_pcib_read_raw_2, mace_pcib_write_raw_2,
+ mace_pcib_read_raw_4, mace_pcib_write_raw_4,
+ mace_pcib_read_raw_8, mace_pcib_write_raw_8,
mace_pcib_space_map, mace_pcib_space_unmap, mace_pcib_space_region,
};
mace_pcib_read_2, mace_pcib_write_2,
mace_pcib_read_4, mace_pcib_write_4,
mace_pcib_read_8, mace_pcib_write_8,
+ mace_pcib_read_raw_2, mace_pcib_write_raw_2,
+ mace_pcib_read_raw_4, mace_pcib_write_raw_4,
+ mace_pcib_read_raw_8, mace_pcib_write_raw_8,
mace_pcib_space_map, mace_pcib_space_unmap, mace_pcib_space_region,
};
*(volatile u_int64_t *)(h + o) = v;
}
+void
+mace_pcib_read_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int16_t *addr = (volatile u_int16_t *)(h + (o | 2) - (o & 3));
+ len >>= 1;
+ while (len-- != 0) {
+ *(u_int16_t *)buf = letoh16(*addr);
+ buf += 2;
+ }
+}
+
+void
+mace_pcib_write_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int16_t *addr = (volatile u_int16_t *)(h + (o | 2) - (o & 3));
+ len >>= 1;
+ while (len-- != 0) {
+ *addr = htole16(*(u_int16_t *)buf);
+ buf += 2;
+ }
+}
+
+void
+mace_pcib_read_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int32_t *addr = (volatile u_int32_t *)(h + o);
+ len >>= 2;
+ while (len-- != 0) {
+ *(u_int32_t *)buf = letoh32(*addr);
+ buf += 4;
+ }
+}
+
+void
+mace_pcib_write_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int32_t *addr = (volatile u_int32_t *)(h + o);
+ len >>= 2;
+ while (len-- != 0) {
+ *addr = htole32(*(u_int32_t *)buf);
+ buf += 4;
+ }
+}
+
+void
+mace_pcib_read_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int64_t *addr = (volatile u_int64_t *)(h + o);
+ len >>= 3;
+ while (len-- != 0) {
+ *(u_int64_t *)buf = letoh64(*addr);
+ buf += 8;
+ }
+}
+
+void
+mace_pcib_write_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const u_int8_t *buf, bus_size_t len)
+{
+ volatile u_int64_t *addr = (volatile u_int64_t *)(h + o);
+ len >>= 3;
+ while (len-- != 0) {
+ *addr = htole64(*(u_int64_t *)buf);
+ buf += 8;
+ }
+}
+
extern int extent_malloc_flags;
int
-/* $OpenBSD: macepcibrvar.h,v 1.3 2004/10/20 12:49:15 pefo Exp $ */
+/* $OpenBSD: macepcibrvar.h,v 1.4 2008/07/30 17:37:46 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se)
void mace_pcib_write_8(bus_space_tag_t, bus_space_handle_t, bus_size_t,
u_int64_t);
+void mace_pcib_read_raw_2(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+void mace_pcib_write_raw_2(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+void mace_pcib_read_raw_4(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+void mace_pcib_write_raw_4(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+void mace_pcib_read_raw_8(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, u_int8_t *, bus_size_t);
+void mace_pcib_write_raw_8(bus_space_tag_t, bus_space_handle_t,
+ bus_addr_t, const u_int8_t *, bus_size_t);
+
int mace_pcib_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int,
bus_space_handle_t *);
void mace_pcib_space_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-/* $OpenBSD: xbow.c,v 1.1 2008/04/07 22:47:40 miod Exp $ */
+/* $OpenBSD: xbow.c,v 1.2 2008/07/30 17:37:46 miod Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
uint32_t xbow_read_4(bus_space_tag_t, bus_space_handle_t, bus_size_t);
uint64_t xbow_read_8(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-void xbow_write_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint32_t);
-void xbow_write_8(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint64_t);
+void xbow_write_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, uint32_t);
+void xbow_write_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, uint64_t);
+void xbow_read_raw_2(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ uint8_t *, bus_size_t);
+void xbow_write_raw_2(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ const uint8_t *, bus_size_t);
+void xbow_read_raw_4(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ uint8_t *, bus_size_t);
+void xbow_write_raw_4(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ const uint8_t *, bus_size_t);
+void xbow_read_raw_8(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ uint8_t *, bus_size_t);
+void xbow_write_raw_8(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ const uint8_t *, bus_size_t);
+
int xbow_space_map_short(bus_space_tag_t, bus_addr_t, bus_size_t, int,
bus_space_handle_t *);
int xbow_space_map_long(bus_space_tag_t, bus_addr_t, bus_size_t, int,
xbow_write_4,
xbow_read_8,
xbow_write_8,
+ xbow_read_raw_2,
+ xbow_write_raw_2,
+ xbow_read_raw_4,
+ xbow_write_raw_4,
+ xbow_read_raw_8,
+ xbow_write_raw_8,
xbow_space_map_short,
xbow_space_unmap,
xbow_space_region_short
xbow_write_4,
xbow_read_8,
xbow_write_8,
+ xbow_read_raw_2,
+ xbow_write_raw_2,
+ xbow_read_raw_4,
+ xbow_write_raw_4,
+ xbow_read_raw_8,
+ xbow_write_raw_8,
xbow_space_map_long,
xbow_space_unmap,
xbow_space_region_long
*(volatile uint64_t *)(h + o) = v;
}
+void
+xbow_read_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ uint8_t *buf, bus_size_t len)
+{
+ len >>= 1;
+ while (len-- != 0) {
+ *(uint16_t *)buf = *(volatile uint16_t *)(h + o);
+ buf += 2;
+ }
+}
+
+void
+xbow_write_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const uint8_t *buf, bus_size_t len)
+{
+ len >>= 1;
+ while (len-- != 0) {
+ *(volatile uint16_t *)(h + o) = *(uint16_t *)buf;
+ buf += 2;
+ }
+}
+
+void
+xbow_read_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ uint8_t *buf, bus_size_t len)
+{
+ len >>= 2;
+ while (len-- != 0) {
+ *(uint32_t *)buf = *(volatile uint32_t *)(h + o);
+ buf += 4;
+ }
+}
+
+void
+xbow_write_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const uint8_t *buf, bus_size_t len)
+{
+ len >>= 2;
+ while (len-- != 0) {
+ *(volatile uint32_t *)(h + o) = *(uint32_t *)buf;
+ buf += 4;
+ }
+}
+
+void
+xbow_read_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ uint8_t *buf, bus_size_t len)
+{
+ len >>= 3;
+ while (len-- != 0) {
+ *(uint64_t *)buf = *(volatile uint64_t *)(h + o);
+ buf += 8;
+ }
+}
+
+void
+xbow_write_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const uint8_t *buf, bus_size_t len)
+{
+ len >>= 3;
+ while (len-- != 0) {
+ *(volatile uint64_t *)(h + o) = *(uint64_t *)buf;
+ buf += 8;
+ }
+}
+
int
xbow_space_map_short(bus_space_tag_t t, bus_addr_t offs, bus_size_t size,
int cacheable, bus_space_handle_t *bshp)
-/* $OpenBSD: xbridge.c,v 1.2 2008/07/28 18:50:59 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.3 2008/07/30 17:37:46 miod Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
uint8_t);
void xbridge_write_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
uint16_t);
+void xbow_read_raw_2(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ uint8_t *, bus_size_t);
+void xbow_write_raw_2(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ const uint8_t *, bus_size_t);
+void xbow_read_raw_4(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ uint8_t *, bus_size_t);
+void xbow_write_raw_4(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ const uint8_t *, bus_size_t);
+void xbow_read_raw_8(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ uint8_t *, bus_size_t);
+void xbow_write_raw_8(bus_space_tag_t, bus_space_handle_t, bus_addr_t,
+ const uint8_t *, bus_size_t);
bus_addr_t xbridge_pa_to_device(paddr_t);
paddr_t xbridge_device_to_pa(bus_addr_t);
sc->sc_io_bus_space->_space_read_2 = xbridge_read_2;
sc->sc_io_bus_space->_space_write_1 = xbridge_write_1;
sc->sc_io_bus_space->_space_write_2 = xbridge_write_2;
+ sc->sc_io_bus_space->_space_read_raw_2 = xbridge_read_raw_2;
+ sc->sc_io_bus_space->_space_write_raw_2 = xbridge_write_raw_2;
+ sc->sc_io_bus_space->_space_read_raw_4 = xbridge_read_raw_4;
+ sc->sc_io_bus_space->_space_write_raw_4 = xbridge_write_raw_4;
+ sc->sc_io_bus_space->_space_read_raw_8 = xbridge_read_raw_8;
+ sc->sc_io_bus_space->_space_write_raw_8 = xbridge_write_raw_8;
sc->sc_mem_bus_space->_space_read_1 = xbridge_read_1;
sc->sc_mem_bus_space->_space_read_2 = xbridge_read_2;
sc->sc_mem_bus_space->_space_write_1 = xbridge_write_1;
sc->sc_mem_bus_space->_space_write_2 = xbridge_write_2;
+ sc->sc_mem_bus_space->_space_read_raw_2 = xbridge_read_raw_2;
+ sc->sc_mem_bus_space->_space_write_raw_2 = xbridge_write_raw_2;
+ sc->sc_mem_bus_space->_space_read_raw_4 = xbridge_read_raw_4;
+ sc->sc_mem_bus_space->_space_write_raw_4 = xbridge_write_raw_4;
+ sc->sc_mem_bus_space->_space_read_raw_8 = xbridge_read_raw_8;
+ sc->sc_mem_bus_space->_space_write_raw_8 = xbridge_write_raw_8;
/*
* Initialize PCI methods.
*(volatile uint16_t *)((h + o) ^ 2) = v;
}
+void
+xbridge_read_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ uint8_t *buf, bus_size_t len)
+{
+ volatile uint16_t *addr = (volatile uint16_t *)((h + o) ^ 2);
+ len >>= 1;
+ while (len-- != 0) {
+ *(uint16_t *)buf = *addr;
+ buf += 2;
+ }
+}
+
+void
+xbridge_write_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const uint8_t *buf, bus_size_t len)
+{
+ volatile uint16_t *addr = (volatile uint16_t *)((h + o) ^ 2);
+ len >>= 1;
+ while (len-- != 0) {
+ *addr = *(uint16_t *)buf;
+ buf += 2;
+ }
+}
+
+void
+xbridge_read_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ uint8_t *buf, bus_size_t len)
+{
+ volatile uint32_t *addr = (volatile uint32_t *)(h + o);
+ len >>= 2;
+ while (len-- != 0) {
+ *(uint32_t *)buf = *addr;
+ buf += 4;
+ }
+}
+
+void
+xbridge_write_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const uint8_t *buf, bus_size_t len)
+{
+ volatile uint32_t *addr = (volatile uint32_t *)(h + o);
+ len >>= 2;
+ while (len-- != 0) {
+ *addr = *(uint32_t *)buf;
+ buf += 4;
+ }
+}
+
+void
+xbridge_read_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ uint8_t *buf, bus_size_t len)
+{
+ volatile uint64_t *addr = (volatile uint64_t *)(h + o);
+ len >>= 3;
+ while (len-- != 0) {
+ *(uint64_t *)buf = *addr;
+ buf += 8;
+ }
+}
+
+void
+xbridge_write_raw_8(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
+ const uint8_t *buf, bus_size_t len)
+{
+ volatile uint64_t *addr = (volatile uint64_t *)(h + o);
+ len >>= 3;
+ while (len-- != 0) {
+ *addr = *(uint64_t *)buf;
+ buf += 8;
+ }
+}
+
/*
* bus_dma helpers
*/