diff options
-rw-r--r-- | sys/dev/fb/fbreg.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h index c607337..f17e362 100644 --- a/sys/dev/fb/fbreg.h +++ b/sys/dev/fb/fbreg.h @@ -43,7 +43,33 @@ #define fillw_io(p, d, c) fillw((p), (void *)(d), (c)) void generic_bcopy(const void *s, void *d, size_t c); void generic_bzero(void *d, size_t c); -#else /* !__i386__ */ +#elif __ia64__ +#include <machine/bus.h> +#define bcopy_fromio(s, d, c) \ + bus_space_read_region_1(IA64_BUS_SPACE_MEM, s, 0, (void*)(d), c) +#define bcopy_io(s, d, c) \ + bus_space_copy_region_1(IA64_BUS_SPACE_MEM, s, 0, d, 0, c) +#define bcopy_toio(s, d, c) \ + bus_space_write_region_1(IA64_BUS_SPACE_MEM, d, 0, (void*)(s), c) +#define bzero_io(d, c) \ + bus_space_set_region_1(IA64_BUS_SPACE_MEM, d, 0, 0, c) +#define fill_io(p, d, c) \ + bus_space_set_region_1(IA64_BUS_SPACE_MEM, d, 0, p, c) +#define fillw_io(p, d, c) \ + bus_space_set_region_2(IA64_BUS_SPACE_MEM, d, 0, p, c) +#define readw(a) \ + bus_space_read_2(IA64_BUS_SPACE_MEM, a, 0) +#define writew(a, v) \ + bus_space_write_2(IA64_BUS_SPACE_MEM, a, 0, v) +#define writel(a, v) \ + bus_space_write_4(IA64_BUS_SPACE_MEM, a, 0, v) +static __inline void +fillw(int val, uint16_t *buf, size_t size) +{ + while (size--) + *buf++ = val; +} +#else /* !__i386__ && !__ia64__ */ #define bcopy_io(s, d, c) memcpy_io((d), (s), (c)) #define bcopy_toio(s, d, c) memcpy_toio((d), (void *)(s), (c)) #define bcopy_fromio(s, d, c) memcpy_fromio((void *)(d), (s), (c)) |