Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Isa card access mapping
@ 1996-02-17 19:59 Yann Doussot
  0 siblings, 0 replies; 3+ messages in thread
From: Yann Doussot @ 1996-02-17 19:59 UTC (permalink / raw)


Hello,

	As our network is Token Ring based, we try to make a Linux Axp work 
with the IBM Token Ring Card. This Card works perfectly with Linux i386. 
The problem we met is the address mapping between i386 and Alpha 
platform. When the driver try to access to the mmio zone it either 
crashes or doesn't work (when we try to convert the address with 
phys_to_virt function). What should be the right way to convert physical 
addresses in the Alpha memory space ?

	Thanks.

		Yann Doussot (doussot@via.ecp.fr) 
		& Pascal Andre (andre@via.ecp.fr)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Isa card access mapping
@ 1996-02-17 20:46 David Mosberger-Tang
  0 siblings, 0 replies; 3+ messages in thread
From: David Mosberger-Tang @ 1996-02-17 20:46 UTC (permalink / raw)


>>>>> On Sat, 17 Feb 1996 20:59:06 +0100 (MET), Yann Doussot <doussot@via.ecp.fr> said:

  Yann> 	As our network is Token Ring based, we try to make a
  Yann> Linux Axp work with the IBM Token Ring Card. This Card works
  Yann> perfectly with Linux i386.  The problem we met is the address
  Yann> mapping between i386 and Alpha platform. When the driver try
  Yann> to access to the mmio zone it either crashes or doesn't work
  Yann> (when we try to convert the address with phys_to_virt
  Yann> function). What should be the right way to convert physical
  Yann> addresses in the Alpha memory space ?

It's not safe to directly access memory.  You'll have to change the
driver to use readb(), writeb() etc. (see include/asm-alpha/io.h).
You may also want to look at other drivers (e.g.,
drivers/char/console.c and drivers/char/selection.h).

When you get it working, please let me know so I can include it in the
FAQ.

	--david

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: ISA card access mapping
@ 1996-02-17 21:21 Jay A Estabrook
  0 siblings, 0 replies; 3+ messages in thread
From: Jay A Estabrook @ 1996-02-17 21:21 UTC (permalink / raw)


Yann,

>        As our network is Token Ring based, we try to make a Linux Axp work
>with the IBM Token Ring Card. This Card works perfectly with Linux i386.
>The problem we met is the address mapping between i386 and Alpha
>platform. When the driver try to access to the mmio zone it either
>crashes or doesn't work (when we try to convert the address with
>phys_to_virt function). What should be the right way to convert physical
>addresses in the Alpha memory space ?

It's probably worth taking a look at the drivers that have been ported
to Alpha, to get an idea about this. In the network area, the DE4X5 and
NE2000 drivers are known to work. But, for expediency's sake...

On the Alphas, you need to use other than just the physical address of a 
buffer, for the card to DMA from/to. For this purpose, the routine is called
"virt_to_bus()" and looks just like "virt_to_phys()", only it returns the
magic "cookie" which you give to the PCI/ISA device, for it to use to access
host memory. This *will* look different on different Alpha platforms, so it's
necessary to use that interface for portability. It is identical to the
"virt_to_phys()" for INTEL machines, don't know what is is for the others...

Good luck.

--Jay++

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-02-17 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-02-17 19:59 Isa card access mapping Yann Doussot
  -- strict thread matches above, loose matches on Subject: below --
1996-02-17 20:46 David Mosberger-Tang
1996-02-17 21:21 ISA " Jay A Estabrook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox