T.R | Title | User | Personal Name | Date | Lines |
---|
3681.1 | | HYDRA::AXPDEVELOPER | Alpha Developer support | Thu May 29 1997 18:13 | 49 |
| From: YV Rao <[email protected]>
To: alpha-developer <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Queries on device driver porting to Digital Unix 4.0B
Date: Thu, 29 May 1997 11:33:18 -0400
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi,
We are having IVR system running on Unixware/HPUX. We are
in the process of porting the source code to Digital Unix 4.0B.
Our application does a lot of memory and I/O access of ISA
boards from user space. To achieve this functionality we have
written device drivers, which allows us to map the physical
memory and I/O space to user space.
After going through the device driver tutorial document, we are
slightly confused how this functionality can be achieved on
Digital Unix, since the document says that some of the Alpha
processors do not support memory mapping. Any suggestions
from you regarding achieving this functionality would be of great
help. Also give us some answers for the following queries.
1. Where would I get information regarding EISA address
mapping for Alpha AXP SB21064 processor.
2. The documentation says that some Alpha processors do not
support memory mapping. What happens if I register a xxmmap
function in the device driver and invoke mmap system call with
the device descriptor? Will the device driver mmap entry point
gets invoked?
3. Is it possible to achieve memory mapping in the following
way.
- Map eisa address space to kernel memory
- pass the starting address of the mapped kernel address to
user space
- open /dev/kmem and do a mmap of the pages which map to
eisa address space (which is already mapped)
Please let us know if it would be possible to access the isa
devices from user space. We intend to do this on SB21064
Alpha AXP processor. Be as technical as possible in your
replies.
Yv Rao
|
3681.2 | | HYDRA::AXPDEVELOPER | Alpha Developer support | Fri May 30 1997 11:14 | 79 |
| Hi,
This comes from the driver support group and I hope that it provides
some help for you:
.0> We are having IVR system running on Unixware/HPUX. We are
.0> in the process of porting the source code to Digital Unix 4.0B.
.0> Our application does a lot of memory and I/O access of ISA
.0> boards from user space. To achieve this functionality we have
.0> written device drivers, which allows us to map the physical
.0> memory and I/O space to user space.
.0> After going through the device driver tutorial document, we are
.0> slightly confused how this functionality can be achieved on
.0> Digital Unix, since the document says that some of the Alpha
.0> processors do not support memory mapping. Any suggestions
.0> from you regarding achieving this functionality would be of great
.0> help. Also give us some answers for the following queries.
Actually, mmap(2) is technically not supported for use with character
device drivers on Alpha processors. But, I'll be kind and say the doc
is a little ambiguous on this topic! (See page 8-15 in the Tutorial).
However, it does work in many cases - especially with VME device drivers.
With EISA/ISA/PCI it has been problematic and very much platform specific.
If you do not need to make any xfers less than 32 bits then it should be
easier. If you do need to make some 8 or 16 bit xfers, then you will need
to use SPARSE space mapping instead of DENSE space and that's a bit more
complex and platform specific. The stride between SPARSE space addresses
is not always the same on different platforms.
.0> 1. Where would I get information regarding EISA address
.0> mapping for Alpha AXP SB21064 processor.
You would use the get_config() kernel call to get the EISA address
mapping for you device. See chapter 5 of the "Writing EISA and ISA
Bus Device Drivers" manual for examples.
.0> 2. The documentation says that some Alpha processors do not
.0> support memory mapping. What happens if I register a xxmmap
.0> function in the device driver and invoke mmap system call with
.0> the device descriptor? Will the device driver mmap entry point
.0> gets invoked?
Yes, but it won't get called until the memory is
actually accessed. That's generated a few calls for us!
.0> 3. Is it possible to achieve memory mapping in the following
.0> way.
.0> - Map eisa address space to kernel memory
.0> - pass the starting address of the mapped kernel address to
.0> user space
.0> - open /dev/kmem and do a mmap of the pages which map to
.0> eisa address space (which is already mapped)
Possibly, but I don't think I'd do it that way. I think you should
check out /usr/examples/devdriver/lh100/lhdriver.c and lh_test.c. This
is an example VMEbus device driver that contains an mmap() routine and
the user level code contains macros that will allow you to perform byte
and word xfers using SPARSE space - if you need to. If you don't, then
it also shows how to perform xfers to/from DENSE space. If using DENSE
space, be sure to call mb() after writes - see the macros in lh_test.c
for examples.
.0> Please let us know if it would be possible to access the isa
.0> devices from user space. Be as technical as possible in your
.0> replies.
I hope I was technical enough. :-) Seriously, if you run into problems,
I'd be willing to try to help a little - but, be prepared to come up
with a backup plan.
If you have any more queries, please give us a call back at 1-800-332-4786
or email to [email protected]. Please reference call number
1997-3681.
Thanks,
Gerrit Saylor
Alpha Developer Support
|
3681.3 | new mail in today | HYDRA::AXPDEVELOPER | Alpha Developer support | Fri May 30 1997 13:28 | 138 |
| #3 30-MAY-1997 12:04:10.24
MAIL
From: SMTP%"[email protected]"
To: [email protected]
CC: [email protected]
Subj: FWD: Re: Queries on device driver porting to Digital Unix 4.0B
-Reply
Return-Path: [email protected]
Received: by vaxsim.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
Fri, 30 May 1997 12:04:07 -0400
Received: from intervoice.com by mail12.digital.com (8.7.5/UNX
1.5/1.0/WV)
id LAA10933; Fri, 30 May 1997 11:59:02 -0400 (EDT)
Received: from intervoice.com by intervoice.com with smtp
(Smail3.1.29.1 #2) id m0wXTuh-0002ldC; Fri, 30 May 97 10:48 CDT
Received: from INTERVOICE-Message_Server by intervoice.com
with Novell_GroupWise; Fri, 30 May 1997 10:47:52 -0500
Message-Id: <[email protected]>
X-Mailer: Novell GroupWise 4.1
Date: Fri, 30 May 1997 10:44:33 -0500
From: YV Rao <[email protected]>
To: [email protected]
Press RETURN for more...
MAIL>
#3 30-MAY-1997 12:04:10.24
MAIL
Cc: [email protected]
Subject: FWD: Re: Queries on device driver porting to Digital Unix 4.0B
-Reply
Gerrit,
Thanks for your immediate reply. Your mail has brought us
some clarity. I have a few follow up questions on your replies.
*******************************
Actually, mmap(2) is technically not supported for use with
character
device drivers on Alpha processors. But, I'll be kind and say the
doc
is a little ambiguous on this topic! (See page 8-15 in the
Tutorial).
However, it does work in many cases - especially with VME
device drivers.
With EISA/ISA/PCI it has been problematic and very much
Press RETURN for more...
MAIL>
#3 30-MAY-1997 12:04:10.24
MAIL
platform specific.
*******************************
1.
We are planning to use SB21064 Alpha AXP processor. Would
you be having any information on the behaviour of memory
mapping of ISA addresses on this processor?
*****************************
If you do not need to make any xfers less than 32 bits then it
should be
easier. If you do need to make some 8 or 16 bit xfers, then you
will need
to use SPARSE space mapping instead of DENSE space and
that's a bit more
complex and platform specific. The stride between SPARSE
space addresses
is not always the same on different platforms.
************************
Press RETURN for more...
MAIL>
#3 30-MAY-1997 12:04:10.24
MAIL
2.
Our application uses a combination of 16-bit and 32-bit
memory and 8-bit and 16-bit I/O. Would it be possible for you to
send us the details of the stride between SPARSE space
addresses for SB21064 Alpha AXP processor.
*******************
This
is an example VMEbus device driver that contains an mmap()
routine and
the user level code contains macros that will allow you to
perform byte
and word xfers using SPARSE space - if you need to. If you don't,
then
it also shows how to perform xfers to/from DENSE space. If
using DENSE
space, be sure to call mb() after writes - see the macros in
lh_test.c
for examples.
Press RETURN for more...
MAIL>
#3 30-MAY-1997 12:04:10.24
MAIL
****************************
3.
Will these macros also work for memory mapped ISA /EISA
addresses, if not where do I get the information to write such a
macros. Will the macros be same for I/O and memory or will it
have to be different. Any information on SPARSE address
access would be of great help for us.
4.
I am having a hard time trying to find out routines to use which
will allow me to map EISA/ISA bus address to kernel space.
Please let us know which calls we should be using for mapping
I/O and memory addresses form bus to kernel.
Many thanks in advance.
5. HPUX provides an IOMAP driver, which allows us to map the
physical memory and I/O address range to user space. We are
trying to write a driver on Digital Unix to provide us with the same
Press RETURN for more...
MAIL>
#3 30-MAY-1997 12:04:10.24
MAIL
functionality. I guess this would give you a better idea of our
purpose.
Yv Rao
972-454-8077
[email protected]
|
3681.4 | | HYDRA::AXPDEVELOPER | Alpha Developer support | Fri May 30 1997 14:51 | 65 |
| Some more info from the driver support group:
.
.
.
> 1.
> We are planning to use SB21064 Alpha AXP processor. Would
> you be having any information on the behaviour of memory
> mapping of ISA addresses on this processor?
No, I'm sorry but I've never heard of that one. Do
you maybe mean a 21064 SBC ? What's the system type or code
name?
> 2.
> Our application uses a combination of 16-bit and 32-bit
> memory and 8-bit and 16-bit I/O. Would it be possible for you to
> send us the details of the stride between SPARSE space
> addresses for SB21064 Alpha AXP processor.
Maybe once I find out what it is. Perhaps someone in the UNIX hardware
support group will enlighten us. You will need to use SPARSE space.
The macros in lh_test.c should work ok. If they don't, then we will
have to fix them up so they do...
> 3.
> Will these macros also work for memory mapped ISA /EISA
> addresses, if not where do I get the information to write such a
> macros. Will the macros be same for I/O and memory or will it
> have to be different. Any information on SPARSE address
> access would be of great help for us.
The macros should be ok. You probably will just have to try it and
see. As mentioned above, it should be a fairly small task to fix them
so they work.
> 4.
> I am having a hard time trying to find out routines to use which
> will allow me to map EISA/ISA bus address to kernel space.
> Please let us know which calls we should be using for mapping
> I/O and memory addresses from bus to kernel.
I already did. Have you looked at the lhdriver and user level code?
The "Writing EISA/ISA Bus Drivers" would also be a good start. If you
need an example EISA/ISA driver, let me know and I'll see what I can
come up with.
> 5. HPUX provides an IOMAP driver, which allows us to map the
> physical memory and I/O address range to user space. We are
> trying to write a driver on Digital Unix to provide us with the same
> functionality. I guess this would give you a better idea of our
> purpose.
How is the board layed out? Is the memory at an offset from the board
registers? I hope so because if not, then calling mmap(2) a second time
will undo the first mapping. You can only have one active mapping at a
time. You could have a second "driver" or instance of the driver with
a different minor number to get around that, I think.
.
.
.
Please get back in touch with me concerning anything else.
Gerrit Saylor
|
3681.5 | | HYDRA::AXPDEVELOPER | Alpha Developer support | Fri May 30 1997 16:56 | 132 |
| Return-Path: [email protected]
Received: by vaxsim.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
Fri, 30 May 1997 15:53:56 -0400
Received: from ivgate.intervoice.com by mail2.digital.com (5.65 EXP 4/12/95 for
V3.2/1.0/WV)
id AA30963; Fri, 30 May 1997 12:41:52 -0700
Received: from intervoice.com by intervoice.com with smtp
(Smail3.1.29.1 #2) id m0wXXOK-000395C; Fri, 30 May 97 14:31 CDT
Received: from INTERVOICE-Message_Server by intervoice.com
with Novell_GroupWise; Fri, 30 May 1997 14:30:45 -0500
Message-Id: <[email protected]>
X-Mailer: Novell GroupWise 4.1
Date: Fri, 30 May 1997 14:27:24 -0500
From: YV Rao <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Ref No : 1997-3681 : Queries on device driver porting to
Digital Unix 4.0B
Gerrit,
The system we are using is a Single Board Computer put into a
passive back plane. I am reproducing the description of the
system as given in the product manual supplied by ICS.
The SB21064 is an industrialized single board Reduced
Instruction Set Computer (RISC), using a 275 Mhz or 300MHz
Digital Alpha Processor. The CPU board uses the Peripheral
Component Interconnect (PCI) bus to communicate with the
onboard features. The external bus architecture complies with
the ISA architecture with a PCI bus extension. The PCI bus
extension supports the DEC bridge chip, allowing additional
peripherals on the PCI bus with backwards and forwards
compatibility. Processor used is Dec Alpha AXP 21064A".
As for the our boards, they all are ISAPNP boards. We read the
base memory and I/O addresses from the other PNP cards and
locate our boards in the unused slots. This is done after the boot
time, by obtaining access to the I/O registers of the PNP parts of
the other cards from user space. During runtime of our software,
we get access to the board's DSP memory to perform read/write
operations.
Our plan is to write a generic device driver associated with no
actual device (probably a pseudo driver), which given a EISA/ISA
memory or I/O address, maps it to user space and return us the
pointer for access. Any sample EISA/ISA driver would really help
us understand issues much better.
I have looked into lhdriver source code, but it works for VME bus
only. Internally it used vba_map_csr to map physical from bus
address space to kernel space. I do not find any corresponding
call for EISA/ISA bus. My understanding is the vba_map_csr only
works for VME bus. Please clarify.
Yv Rao
Yv Rao
> 1.
> We are planning to use SB21064 Alpha AXP processor.
Would
> you be having any information on the behaviour of memory
> mapping of ISA addresses on this processor?
No, I'm sorry but I've never heard of that one. Do
you maybe mean a 21064 SBC ? What's the system type or code
name?
> 2.
> Our application uses a combination of 16-bit and 32-bit
> memory and 8-bit and 16-bit I/O. Would it be possible for you to
> send us the details of the stride between SPARSE space
> addresses for SB21064 Alpha AXP processor.
Maybe once I find out what it is. Perhaps someone in the UNIX
hardware
support group will enlighten us. You will need to use SPARSE
space.
The macros in lh_test.c should work ok. If they don't, then we will
have to fix them up so they do...
> 3.
> Will these macros also work for memory mapped ISA /EISA
> addresses, if not where do I get the information to write such a
> macros. Will the macros be same for I/O and memory or will it
> have to be different. Any information on SPARSE address
> access would be of great help for us.
The macros should be ok. You probably will just have to try it and
see. As mentioned above, it should be a fairly small task to fix
them
so they work.
> 4.
> I am having a hard time trying to find out routines to use which
> will allow me to map EISA/ISA bus address to kernel space.
> Please let us know which calls we should be using for
mapping
> I/O and memory addresses from bus to kernel.
I already did. Have you looked at the lhdriver and user level
code?
The "Writing EISA/ISA Bus Drivers" would also be a good start. If
you
need an example EISA/ISA driver, let me know and I'll see what I
can
come up with.
> 5. HPUX provides an IOMAP driver, which allows us to map the
> physical memory and I/O address range to user space. We are
> trying to write a driver on Digital Unix to provide us with the
same
> functionality. I guess this would give you a better idea of our
> purpose.
How is the board layed out? Is the memory at an offset from the
board
registers? I hope so because if not, then calling mmap(2) a
second time
will undo the first mapping. You can only have one active
mapping at a
time. You could have a second "driver" or instance of the driver
with
a different minor number to get around that, I think.
.
.
.
Please get back in touch with me concerning anything else.
Gerrit Saylor
Alpha Developer Support
|
3681.6 | new mail today | HYDRA::AXPDEVELOPER | Alpha Developer support | Fri May 30 1997 18:21 | 217 |
| #1 30-MAY-1997 17:00:28.19
NEWMAIL
From: SMTP%"[email protected]"
To: "[email protected]"
<[email protected]>
CC: alpha-developer <[email protected]>
Subj: Ref No : 1997-3681 : Queries on device driver porting toDigital
Unix 4.0
B
Return-Path: [email protected]
Received: by asimov.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
Fri, 30 May 1997 17:00:26 -0400
Received: from pobox1.pa.dec.com by fluid.mro.dec.com
(5.65v4.0/1.1.8.2/19Nov96-
0448PM)
id AA18296; Fri, 30 May 1997 17:00:23 -0400
Received: by pobox1.pa.dec.com; id AA27958; Fri, 30 May 97 14:00:23
-0700
Received: by pkohub1.athena.pko.dec.com with SMTP (Microsoft Exchange
Server Int
ernet Mail Connector Version 4.0.996.15)
id <[email protected]>; Fri, 30 May
1997 17:0
2:36 -0400
Received: from mail13.digital.com by pkohub1.athena.pko.dec.com with
SMTP (Micro
soft Exchange Internet Mail Connector Version 4.0.996.15)
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
id MLFTCC7G; Fri, 30 May 1997 16:58:10 -0400
Received: from intervoice.com by mail13.digital.com (8.7.5/UNX
1.5/1.0/WV)
id QAA15558; Fri, 30 May 1997 16:48:48 -0400 (EDT)
Received: from intervoice.com by intervoice.com with smtp
(Smail3.1.29.1 #2) id m0wXXOJ-00032HC; Fri, 30 May 97 14:31 CDT
Received: from INTERVOICE-Message_Server by intervoice.com
with Novell_GroupWise; Fri, 30 May 1997 14:30:45 -0500
Message-Id:
<c=US%a=_%p=Digital%[email protected]
ec.com>
From: YV Rao <[email protected]>
To: "[email protected]" <[email protected]>
Cc: alpha-developer <[email protected]>
Subject: Ref No : 1997-3681 : Queries on device driver porting
toDigital Unix 4.
0B
Date: Fri, 30 May 1997 15:27:24 -0400
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version
4.0.996.15
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
Gerrit,
The system we are using is a Single Board Computer put into a
passive back plane. I am reproducing the description of the
system as given in the product manual supplied by ICS.
The SB21064 is an industrialized single board Reduced
Instruction Set Computer (RISC), using a 275 Mhz or 300MHz
Digital Alpha Processor. The CPU board uses the Peripheral
Component Interconnect (PCI) bus to communicate with the
onboard features. The external bus architecture complies with
the ISA architecture with a PCI bus extension. The PCI bus
extension supports the DEC bridge chip, allowing additional
peripherals on the PCI bus with backwards and forwards
compatibility. Processor used is Dec Alpha AXP 21064A".
As for the our boards, they all are ISAPNP boards. We read the
base memory and I/O addresses from the other PNP cards and
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
locate our boards in the unused slots. This is done after the boot
time, by obtaining access to the I/O registers of the PNP parts of
the other cards from user space. During runtime of our software,
we get access to the board's DSP memory to perform read/write
operations.
Our plan is to write a generic device driver associated with no
actual device (probably a pseudo driver), which given a EISA/ISA
memory or I/O address, maps it to user space and return us the
pointer for access. Any sample EISA/ISA driver would really help
us understand issues much better.
I have looked into lhdriver source code, but it works for VME bus
only. Internally it used vba_map_csr to map physical from bus
address space to kernel space. I do not find any corresponding
call for EISA/ISA bus. My understanding is the vba_map_csr only
works for VME bus. Please clarify.
Yv Rao
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
Yv Rao
> 1.
> We are planning to use SB21064 Alpha AXP processor.
Would
> you be having any information on the behaviour of memory
> mapping of ISA addresses on this processor?
No, I'm sorry but I've never heard of that one. Do
you maybe mean a 21064 SBC ? What's the system type or code
name?
> 2.
> Our application uses a combination of 16-bit and 32-bit
> memory and 8-bit and 16-bit I/O. Would it be possible for you to
> send us the details of the stride between SPARSE space
> addresses for SB21064 Alpha AXP processor.
Maybe once I find out what it is. Perhaps someone in the UNIX
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
hardware
support group will enlighten us. You will need to use SPARSE
space.
The macros in lh_test.c should work ok. If they don't, then we will
have to fix them up so they do...
> 3.
> Will these macros also work for memory mapped ISA /EISA
> addresses, if not where do I get the information to write such a
> macros. Will the macros be same for I/O and memory or will it
> have to be different. Any information on SPARSE address
> access would be of great help for us.
The macros should be ok. You probably will just have to try it and
see. As mentioned above, it should be a fairly small task to fix
them
so they work.
> 4.
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
> I am having a hard time trying to find out routines to use which
> will allow me to map EISA/ISA bus address to kernel space.
> Please let us know which calls we should be using for
mapping
> I/O and memory addresses from bus to kernel.
I already did. Have you looked at the lhdriver and user level
code?
The "Writing EISA/ISA Bus Drivers" would also be a good start. If
you
need an example EISA/ISA driver, let me know and I'll see what I
can
come up with.
> 5. HPUX provides an IOMAP driver, which allows us to map the
> physical memory and I/O address range to user space. We are
> trying to write a driver on Digital Unix to provide us with the
same
> functionality. I guess this would give you a better idea of our
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
> purpose.
How is the board layed out? Is the memory at an offset from the
board
registers? I hope so because if not, then calling mmap(2) a
second time
will undo the first mapping. You can only have one active
mapping at a
time. You could have a second "driver" or instance of the driver
with
a different minor number to get around that, I think.
.
.
.
Please get back in touch with me concerning anything else.
Gerrit Saylor
Alpha Developer Support
Press RETURN for more...
MAIL>
#1 30-MAY-1997 17:00:28.19
NEWMAIL
MAIL>
|