Re: writing/finding pci bar0
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Thu, 26 Oct 2006 06:44:06 GMT
gobo20@xxxxxxxxx wrote:
i'm struggling to learn/understand pci direct access from user space.
i have a test system, system board parallel port is disabled, and
a pci parallel port card is installed. using lspci i can see
base_address_0 as 0xfc98. i've written some code to wiggle bits
on that card by writing to 0xfc98. using setpci i can change
BAR0 address to 0x378. however, the card only responds for a
few minutes. if i rewrite base_address_0 back to card a few
times, it will come back for awhile. what am i doing wrong
here? can you not manually change the base address in this
manner?
No. The BAR addresses are assigned by the BIOS at boot time, and possibly
modified later by the Linux kernel.
when i look a the output of lspci -bvx, the value stored at
offset 0x10 is one higher than the actual base address. why
is this?
The low-order bit of the BAR registers say whether the address is in memory
space (0) or I/O port space (1). Parallel ports use I/O ports. That's why
you're able to tickle it from user mode (using outpb, right?). If it was a
memory address, you'd need to use a kernel driver.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- Follow-Ups:
- Re: writing/finding pci bar0
- From: gobo20
- Re: writing/finding pci bar0
- From: gil_hamilton@xxxxxxxxxxx
- Re: writing/finding pci bar0
- References:
- writing/finding pci bar0
- From: gobo20
- writing/finding pci bar0
- Prev by Date: writing/finding pci bar0
- Next by Date: Re: System calls parameter restrictions
- Previous by thread: writing/finding pci bar0
- Next by thread: Re: writing/finding pci bar0
- Index(es):
Relevant Pages
|