diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-07-01 21:56:39 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-07-01 21:56:39 +0000 |
commit | 120e4235c1e0f40a9d9a2b0db84f1dbc97912bc3 (patch) | |
tree | 502c4209de3d0aba95950eeb456805f7630a5771 /sys/arch/sgi/xbow/xbow.h | |
parent | 0d94a2f192e73199851c56fe6342bcdb84e8fb9a (diff) |
The widget mapping code has been written back when I was only working on
Octane support. The Octane being a single-node system, address space is
ludicrous enough to allow the whole address space of every widget to be
directly accessible in whole, using the address bits reserved to nasid.
However, on IP27 and IP35, things do not work this way - while we still have
the low 16MB address space of each widget available (the so-called
``short window''), access to other parts of the wiget address space is done
through translation slots (IOTTE) at the Hub I/O space level, on a per-node
basis.
Given the imminent release lock, give up completely on ``large'' mappings
of widgets, and restrict ourselves to short window operation, all the time
(thus reinforcing the use of devio registers to map pci resources on xbridge).
A proper interface to request mappings of specific widget areas, either
directly on Octane, or through IOTTE if available on Origin, will appear
post-release.
No functional change (except from silently repairing Octane support which the
previous xbridge commit silently broke).
Diffstat (limited to 'sys/arch/sgi/xbow/xbow.h')
-rw-r--r-- | sys/arch/sgi/xbow/xbow.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/arch/sgi/xbow/xbow.h b/sys/arch/sgi/xbow/xbow.h index d7f0e5337b6..545c355a688 100644 --- a/sys/arch/sgi/xbow/xbow.h +++ b/sys/arch/sgi/xbow/xbow.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xbow.h,v 1.4 2009/06/13 21:48:03 miod Exp $ */ +/* $OpenBSD: xbow.h,v 1.5 2009/07/01 21:56:38 miod Exp $ */ /* * Copyright (c) 2008 Miodrag Vallat. @@ -39,9 +39,7 @@ * two parameters needed to map a widget. */ -extern paddr_t (*xbow_widget_short)(int16_t, u_int); -extern paddr_t (*xbow_widget_long)(int16_t, u_int); -extern unsigned int xbow_long_shift; +extern paddr_t (*xbow_widget_base)(int16_t, u_int); extern int (*xbow_widget_id)(int16_t, u_int, uint32_t *); extern int xbow_intr_widget; @@ -115,21 +113,24 @@ struct xbow_attach_args { uint32_t xaa_product; uint32_t xaa_revision; - bus_space_tag_t xaa_short_tag; - bus_space_tag_t xaa_long_tag; + bus_space_tag_t xaa_iot; }; -void xbow_build_bus_space(struct mips_bus_space *, int, int, int); +void xbow_build_bus_space(struct mips_bus_space *, int, int); int xbow_intr_register(int, int, int *); int xbow_intr_establish(int (*)(void *), void *, int, int, const char *); void xbow_intr_disestablish(int); -int xbow_space_map_short(bus_space_tag_t, bus_addr_t, bus_size_t, int, +int xbow_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); uint8_t xbow_read_1(bus_space_tag_t, bus_space_handle_t, bus_size_t); uint16_t xbow_read_2(bus_space_tag_t, bus_space_handle_t, bus_size_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_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, uint8_t); void xbow_write_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, uint16_t); +void xbow_write_raw_2(bus_space_tag_t, bus_space_handle_t, bus_addr_t, + const uint8_t *, bus_size_t); #endif /* _XBOW_H_ */ |