Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8549033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:37:58+00:00 2026-06-11T13:37:58+00:00

I have written a PCIe device driver and the read/write functions are not working

  • 0

I have written a PCIe device driver and the read/write functions are not working correctly. The device has 3 memory regions which begin at 0x10800000, 0x0c000000, and 0x80000000. Just for testing purposes, my read and write functions in the driver print out the address passed and return. If I call pread() or pwrite() from a user space app, I see the address passed for the first 2 memory regions, but if I make the call for the third memory region, I see nothing at all as if it didn’t even enter the driver read or write functions.

My driver works completely fine on a 64-bit machine running linux version 2.6.32. This other machine that it doesn’t work on is a 32-bit machine running linux version 2.6.25. My thought is that maybe 32-bit doesn’t like the 0x80000000 address, but I don’t know how to verify that or how to fix it if that is the case.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:37:59+00:00Added an answer on June 11, 2026 at 1:37 pm

    This is a pretty vague question (what file are you doing pread/pwrite on?) but since you say everything works on 64-bit and your driver doesn’t even get called on 32-bit, I’m guessing the issue is the size of off_t and the fact that 0x80000000 overflows 32 bits and becomes a huge negative number.

    What if you put

      #define _FILE_OFFSET_BITS 64
    

    as the first line of your userspace source code? (Or pass “-D_FILE_OFFSET_BITS=64” on the gcc command line)?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this little jquery, which has a nice hover effect. However, on
have written this little class, which generates a UUID every time an object of
I have written a bash script which installs a number of packages, however for
I have written a raw binary image file into a buffer which is an
have written a stochastic simulation in Java, which loads data from a few CSV
I have written a Java program which I package and run from a JAR
I have written a Windows Forms application and now I want to write some
I have written a PhaseListener in which I am checking for the Validations phase.
I have written a web-service (in Java) which produces as a result a (rather
I have written a simple WCF web service in C# which returns records from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.