Re: writing/finding pci bar0



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.
.



Relevant Pages

  • Re: IBM 4019 Laser printer
    ... I purchased a PCI Express parallel port card ... PCI: 1 Slot ... Windows Printing Team ... While I haven't installed a Parallel port card in Vista, ...
    (microsoft.public.windows.vista.print_fax_scan)
  • Re: [PATCH] Netmos parallel/serial/combo support
    ... my 9835 card now works when loading 8250_pci ... parport_pc finds one parallel port -- on this netmos ... serial ports it detected previously: ...
    (Linux-Kernel)
  • aditional parallel port problems
    ... circuit that works with the orders of a parallel port ... With this orders, the circuit turn on/off ... a PCI Multio I/O card with NM9835CV chip. ... some devices turn on and other turn off. ...
    (Linux-Kernel)
  • SOLVED_aditional parallel port problems
    ... The solution was that the parallel port of the card ... ports and they both have a ground pin. ... With this orders, the circuit turn on/off ...
    (Linux-Kernel)
  • Re: Apple II Parallel Cards
    ... Apple parallel cards were designed before there *was* a PC! ... IBM chose not to adhere to the Apple standard. ... but this was not strictly speaking a parallel comms card of course. ... the "IBM PC" parallel port was not two-way for a long time. ...
    (comp.sys.apple2)