Hi everybody,

shock and horror around the IIep camp... I saw this on the linux-kernel:

--------------
From: Benjamin LaHaise [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 25, 1999 11:30 AM
To: WANG,YIDING (HP-SanJose,ex1)
Cc: 'linux_kernel'
Subject: Re: FW: pci_find_device returned value?

On Fri, 25 Jun 1999, WANG,YIDING (HP-SanJose,ex1) wrote:

> One question now. When call pci_find_device(), the returned base address
> are:
> base[0]= 0 (Reserved, in our case) 
> base[1]= 6501 (Low IO Address)
> base[2]= 6601 (Hi IO Address) 
> base[3]= e10600000 (MEM Base)
> base[4]= e10000008 (RAM Base)
> base[5]= e10400000 (SROM Base)
> 
> The base address 3, 4, 5 look like virtual address. Is that true? 
> 
> In my driver, after I get those address, it was converted to virtual
address
> with bus_to_virt() function call. If the returned address is virtual,
then
> no need to convert.

They're actually physical addresses that you need to call ioremap() on in
order to get a kernel mapping to access them. Ioremap takes the address
and size (see Documentation/IO-mapping.txt for more details). Note that
since they're coming directly from the PCI base, you'll have to mask off
the low four bits as those are flags (prefetchable and io space are the
two I remember off the top of my head). One other item to consider is
that PCI address ranges are allocated based on their size, so if you have
a memory range that's less than PAGE_SIZE, you can't pass it on to ioremap
without fiddling first. =)

-ben
--------------

Is that true?!! If they are physical (by Linus) then sparc arch is
into a serious rewrite because Gleb made them virtual! His pcic.c
silently replaces these addresses with virtual ones and drivers
"just use" them.

--Pete
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of the message to [EMAIL PROTECTED]

Reply via email to