Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

OSR Seminars


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 3  
09 Feb 18 18:40
PK
xxxxxx@gmail.com
Join Date: 23 Jan 2018
Posts To This List: 15
le32_to_cpu() required?

Hello, I read data from the SAS controller chip in my Windows7 driver. When I examine the values of the data that is read from the chip on Windbg watch window and compare it with the Linux "dmesg" command output for the same controller card, the values match. But in the Linux driver code for this controller, when they read the data from the chip, for some values, they use le32_to_cpu before it is saved onto variables in the kernel space. Both my Windows driver and the Linux driver are meant to be loaded on x86 PCs. So, in my Win 7 driver, do I have to convert the endianness of the value read from the chip before saving to kernel variables ? Thanks.
  Message 2 of 3  
09 Feb 18 18:54
Don Burn
xxxxxx@windrvr.com
Join Date: 23 Feb 2011
Posts To This List: 1407
le32_to_cpu() required?

Since Windows requires Little Endian you should be fine without the call. Don Burn Windows Driver Consulting Website: http://www.windrvr.com -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: Friday, February 09, 2018 6:40 PM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: [ntdev] le32_to_cpu() required? Hello, I read data from the SAS controller chip in my Windows7 driver. When I examine the values of the data that is read from the chip on Windbg watch window and compare it with the Linux "dmesg" command output for the same controller card, the values match. But in the Linux driver code for this controller, when they read the data from the chip, for some values, they use le32_to_cpu before it is saved onto variables in the kernel space. Both my Windows driver and the Linux driver are meant to be loaded on x86 PCs. So, in my Win 7 driver, do I have to convert the endianness of the value read from the chip before saving to kernel variables ? Thanks. --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer>
  Message 3 of 3  
09 Feb 18 19:03
PK
xxxxxx@gmail.com
Join Date: 23 Jan 2018
Posts To This List: 15
le32_to_cpu() required?

Thanks.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 06:50.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license