1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
.\" $OpenBSD: fga.4,v 1.12 2011/09/03 22:59:07 jmc Exp $
.\"
.\" Copyright (c) 1999 Jason L. Wright (jason@thought.net)
.\" All rights reserved.
.\"
.\" This software was developed by Jason L. Wright under contract with
.\" RTMX Incorporated (http://www.rtmx.com).
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 3 2011 $
.Dt FGA 4 sparc
.Os
.Sh NAME
.Nm fga
.Nd SPARC Force FGA5000 VME/SBus bridge driver
.Sh SYNOPSIS
.Cd "fga0 at iommu0"
.Cd "fvme* at fga0"
.Sh DESCRIPTION
The
.Nm
driver provides a bridge between SBus and VME interfaces.
It has support for accessing VME address and data spaces as if they
were SBus address ranges, and mapping of VME interrupt levels to
SBus interrupts.
The
.Nm
also provides a set of semaphores and mailboxes which are accessible
from user programs via
.Xr ioctl 2 .
.Pp
VME devices are attached to the
.Nm fvme
pseudo-devices, which provide an interface for drivers to establish
VME level/vectored interrupts and map address ranges.
By default the following address ranges are established:
.Bl -column "256MB" "SBus Slot" "SBus Offset" "VME Space" "VME Offset" -offset indent
.It Sy "Size" Ta Sy "SBus Slot" Ta Sy "SBus Offset" Ta Sy "VME Space" Ta Sy "VME Offset"
.It "256MB" Ta "1" Ta "0x0000000" Ta "A32/D32" Ta "0xf0000000"
.It "256MB" Ta "4" Ta "0x0000000" Ta "A32/D16" Ta "0xf0000000"
.It "16MB" Ta "5" Ta "0xe000000" Ta "A24/D16" Ta "0x000000"
.It "64KB" Ta "5" Ta "0xffc0000" Ta "A16/D8" Ta "0x0000"
.It "64KB" Ta "5" Ta "0xffd0000" Ta "A16/D16" Ta "0x0000"
.It "64KB" Ta "5" Ta "0xffe0000" Ta "A16/D32" Ta "0x0000"
.El
.Pp
The abort switch on the FORCE CPU boards is also controlled by the
.Nm fga ,
and is enabled if the eeprom variable
.Pa abort-ena?\&
is set to
.Pa true .
Toggling the switch when enabled stops the kernel and starts the
kernel debugger
.Xr ddb 4 .
.Sh IOCTLS
The
.Nm fga
device responds to the following
.Xr ioctl 2
calls defined in
.Aq Pa machine/fgaio.h :
.Bl -tag -width FGAIOCSEM
.It Dv FGAIOCSEM
.Pq Li "struct fga_sem"
Clear (release) the semaphore
.Ar fgasem_num .
The argument structure is defined as follows:
.Bd -literal -offset indent
struct fga_sem {
u_int8_t fgasem_num; /* semaphore number */
u_int8_t fgasem_val; /* semaphore value */
};
.Ed
.It Dv FGAIOSSEM
.Pq Li "struct fga_sem"
Set (attempt to get) the semaphore
.Ar fgasem_num .
If successful,
.Ar fgasem_val
will have a value of 1, otherwise it will have a value of 0.
.It Dv FGAIOCMBX
.Pq Li "struct fga_sem"
Clear (release) the mailbox
.Ar fgasem_num .
.It Dv FGAIOSMBX
.Pq Li "struct fga_sem"
Set (attempt to get) the mailbox
.Ar fgasem_num .
If successful,
.Ar fgasem_val
will have a value of 1, otherwise it will have a value of 0.
.El
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr ddb 4 ,
.Xr intro 4 ,
.Xr eeprom 8
.Sh HISTORY
.Ox
support for the
.Nm
first appeared in
.Ox 2.6 .
.Sh AUTHORS
The driver for the
.Nm fga
was written by
.An Jason L. Wright Aq jason@thought.net
under contract with
RTMX Incorporated.
.Sh BUGS
There are several features provided by the FGA5000 that are not implemented
in the driver.
Most notably, VME slave ranges are not mapped and the DMA
engine is not used.
Also, several VME interrupts are not handled: SYSFAIL and ACFAIL.
|