Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583780 > unrolled thread

Userspace mmap to PCI is failing

Started bylex000luthor <lex000luthor@gmail.com>
First post2017-02-17 23:30 +0100
Last post2017-02-17 23:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  Userspace mmap to PCI is failing lex000luthor <lex000luthor@gmail.com> - 2017-02-17 23:30 +0100

#1583780 — Userspace mmap to PCI is failing

Fromlex000luthor <lex000luthor@gmail.com>
Date2017-02-17 23:30 +0100
SubjectUserspace mmap to PCI is failing
Message-ID<tbZcm-1Pb-11@gated-at.bofh.it>
Hello,

I am trying to mmap a PCI device, but it fails with EINVAL.

<snip>
...
fd = open("/dev/mem", O_RDWR | O_SYNC);
...
rv = mmap64(0, size, PROT_READ, MAP_SHARED, fd, pci_addr);
...
<snip>

The pci_addr is the address obtained from lspci output which is a 64 bit
address.
The pci_addr has a value of 0x121ffb000000, is that weird?

Kernel is 3.4.10 64 bit and User space is 32 bit.


regards,
Lex

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web