How to read the contents of memory mapped device from a Windows XP program

Hello

I have a problem that I need help from the list.

The device is a custom motherboard with Intel processor that contains a
chip, which controls various operations of the device such as fans,
temperature sensors.

The onboard chip is a memory mapped. There are no BIOS. Hence, I need to
read the fan and temperature sensor data using the physical memory address
that is available with me. Now, I have to communicate with this device from
my Windows XP application using virtual device framework. I am not sure how
to achieve this.

I have the physical memory location of the device and the offsets to read
data of fans and temperature sensors.

My requirement is to just read that location and fetch the data, how do I
achieve this. Please advice.

Regards,

Sivakumar Jayapal
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and intended for the

named recipient(s) only. It shall not attach any liability on the originator or HCL or its

affiliates. Any views or opinions presented in this email are solely those of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction,

dissemination, copying, disclosure, modification, distribution and / or publication of this

message without the prior written consent of the author of this e-mail is strictly

prohibited. If you have received this email in error please delete it and notify the sender

immediately. Before opening any mail and attachments please check them for viruses and

defect.

You need a device driver. Probably a pretty simple one, that just gets the
data in an IOCTL or two.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
news:xxxxx@ntdev…

Hello

I have a problem that I need help from the list.

The device is a custom motherboard with Intel processor that contains a
chip, which controls various operations of the device such as fans,
temperature sensors.

The onboard chip is a memory mapped. There are no BIOS. Hence, I need to
read the fan and temperature sensor data using the physical memory address
that is available with me. Now, I have to communicate with this device from
my Windows XP application using virtual device framework. I am not sure how
to achieve this.

I have the physical memory location of the device and the offsets to read
data of fans and temperature sensors.

My requirement is to just read that location and fetch the data, how do I
achieve this. Please advice.

Regards,

Sivakumar Jayapal
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and
intended for the

named recipient(s) only. It shall not attach any liability on the originator
or HCL or its

affiliates. Any views or opinions presented in this email are solely those
of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any form
of reproduction,

dissemination, copying, disclosure, modification, distribution and / or
publication of this

message without the prior written consent of the author of this e-mail is
strictly

prohibited. If you have received this email in error please delete it and
notify the sender

immediately. Before opening any mail and attachments please check them for
viruses and

defect.

Can it be done through without a driver?? May be mapping the physical
memory to virtual address space with NtmapViewOfSection API? Is this is
an authentic way or not?

Thanks and Regards
~Neer

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 5:50 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device
from a Windows XP program

You need a device driver. Probably a pretty simple one, that just gets
the
data in an IOCTL or two.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
news:xxxxx@ntdev…

Hello

I have a problem that I need help from the list.

The device is a custom motherboard with Intel processor that contains a
chip, which controls various operations of the device such as fans,
temperature sensors.

The onboard chip is a memory mapped. There are no BIOS. Hence, I need
to
read the fan and temperature sensor data using the physical memory
address
that is available with me. Now, I have to communicate with this device
from
my Windows XP application using virtual device framework. I am not sure
how
to achieve this.

I have the physical memory location of the device and the offsets to
read
data of fans and temperature sensors.

My requirement is to just read that location and fetch the data, how do
I
achieve this. Please advice.

Regards,

Sivakumar Jayapal
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and
intended for the

named recipient(s) only. It shall not attach any liability on the
originator
or HCL or its

affiliates. Any views or opinions presented in this email are solely
those
of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any
form
of reproduction,

dissemination, copying, disclosure, modification, distribution and / or
publication of this

message without the prior written consent of the author of this e-mail
is
strictly

prohibited. If you have received this email in error please delete it
and
notify the sender

immediately. Before opening any mail and attachments please check them
for
viruses and

defect.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Nope you need a driver to do the mapping, if you do the mapping you open a
security hole in the OS and the code to do the mapping is more complex than
the driver that does it correctly!


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Ladkani, Neeraj” wrote in message
news:xxxxx@ntdev…
Can it be done through without a driver?? May be mapping the physical
memory to virtual address space with NtmapViewOfSection API? Is this is
an authentic way or not?

Thanks and Regards
~Neer

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 5:50 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device
from a Windows XP program

You need a device driver. Probably a pretty simple one, that just gets
the
data in an IOCTL or two.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
news:xxxxx@ntdev…

Hello

I have a problem that I need help from the list.

The device is a custom motherboard with Intel processor that contains a
chip, which controls various operations of the device such as fans,
temperature sensors.

The onboard chip is a memory mapped. There are no BIOS. Hence, I need
to
read the fan and temperature sensor data using the physical memory
address
that is available with me. Now, I have to communicate with this device
from
my Windows XP application using virtual device framework. I am not sure
how
to achieve this.

I have the physical memory location of the device and the offsets to
read
data of fans and temperature sensors.

My requirement is to just read that location and fetch the data, how do
I
achieve this. Please advice.

Regards,

Sivakumar Jayapal
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and
intended for the

named recipient(s) only. It shall not attach any liability on the
originator
or HCL or its

affiliates. Any views or opinions presented in this email are solely
those
of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any
form
of reproduction,

dissemination, copying, disclosure, modification, distribution and / or
publication of this

message without the prior written consent of the author of this e-mail
is
strictly

prohibited. If you have received this email in error please delete it
and
notify the sender

immediately. Before opening any mail and attachments please check them
for
viruses and

defect.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Don,

I would request you to elaborate more on the below statement

Regards,
Sivakumar Jayapal

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 5:50 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device from a
Windows XP program

You need a device driver. Probably a pretty simple one, that just gets the
data in an IOCTL or two.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
news:xxxxx@ntdev…

Hello

I have a problem that I need help from the list.

The device is a custom motherboard with Intel processor that contains a
chip, which controls various operations of the device such as fans,
temperature sensors.

The onboard chip is a memory mapped. There are no BIOS. Hence, I need to
read the fan and temperature sensor data using the physical memory address
that is available with me. Now, I have to communicate with this device from
my Windows XP application using virtual device framework. I am not sure how
to achieve this.

I have the physical memory location of the device and the offsets to read
data of fans and temperature sensors.

My requirement is to just read that location and fetch the data, how do I
achieve this. Please advice.

Regards,

Sivakumar Jayapal
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and
intended for the

named recipient(s) only. It shall not attach any liability on the originator

or HCL or its

affiliates. Any views or opinions presented in this email are solely those
of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any form
of reproduction,

dissemination, copying, disclosure, modification, distribution and / or
publication of this

message without the prior written consent of the author of this e-mail is
strictly

prohibited. If you have received this email in error please delete it and
notify the sender

immediately. Before opening any mail and attachments please check them for
viruses and

defect.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
> I would request you to elaborate more on the below statement

You can do a very simple driver. I would use KMDF for this, it could be
based on the simple version of the toaster function driver, with the read
and write stuff removed and some additional routines to support mapping and
unmapping the hardware. The driver would provide one or more IOCTL’s that
when called would read the register state and return it to the user
application. This is a pretty simple driver, the toaster sample driver is
about 400 lines with comments, I would expect something in that range for
this driver.

You will need an INF file to specify the range of the memory to map.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

Thanks…

You are correct, that’s why I wrote a simple driver .

Thanks and Regards
~Neer

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 6:27 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device
from a Windows XP program

Nope you need a driver to do the mapping, if you do the mapping you open
a
security hole in the OS and the code to do the mapping is more complex
than
the driver that does it correctly!


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Ladkani, Neeraj” wrote in message
news:xxxxx@ntdev…
Can it be done through without a driver?? May be mapping the physical
memory to virtual address space with NtmapViewOfSection API? Is this is
an authentic way or not?

Thanks and Regards
~Neer

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 5:50 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device
from a Windows XP program

You need a device driver. Probably a pretty simple one, that just gets
the
data in an IOCTL or two.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
news:xxxxx@ntdev…

Hello

I have a problem that I need help from the list.

The device is a custom motherboard with Intel processor that contains a
chip, which controls various operations of the device such as fans,
temperature sensors.

The onboard chip is a memory mapped. There are no BIOS. Hence, I need
to
read the fan and temperature sensor data using the physical memory
address
that is available with me. Now, I have to communicate with this device
from
my Windows XP application using virtual device framework. I am not sure
how
to achieve this.

I have the physical memory location of the device and the offsets to
read
data of fans and temperature sensors.

My requirement is to just read that location and fetch the data, how do
I
achieve this. Please advice.

Regards,

Sivakumar Jayapal
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and
intended for the

named recipient(s) only. It shall not attach any liability on the
originator
or HCL or its

affiliates. Any views or opinions presented in this email are solely
those
of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any
form
of reproduction,

dissemination, copying, disclosure, modification, distribution and / or
publication of this

message without the prior written consent of the author of this e-mail
is
strictly

prohibited. If you have received this email in error please delete it
and
notify the sender

immediately. Before opening any mail and attachments please check them
for
viruses and

defect.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks very much, Don for your timely help.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 7:08 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device from a
Windows XP program

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
> I would request you to elaborate more on the below statement

You can do a very simple driver. I would use KMDF for this, it could be
based on the simple version of the toaster function driver, with the read
and write stuff removed and some additional routines to support mapping and
unmapping the hardware. The driver would provide one or more IOCTL’s that
when called would read the register state and return it to the user
application. This is a pretty simple driver, the toaster sample driver is
about 400 lines with comments, I would expect something in that range for
this driver.

You will need an INF file to specify the range of the memory to map.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and intended for the

named recipient(s) only. It shall not attach any liability on the originator or HCL or its

affiliates. Any views or opinions presented in this email are solely those of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction,

dissemination, copying, disclosure, modification, distribution and / or publication of this

message without the prior written consent of the author of this e-mail is strictly

prohibited. If you have received this email in error please delete it and notify the sender

immediately. Before opening any mail and attachments please check them for viruses and

defect.

Hello,

http://www.almico.com/sfdownload.php
I downloaded the exe speedfan and executed it. This exe gave me the fan
details. I don’t know if it is using any device driver to read the fan and
temperature details of a custom motherboard.
I got the log file generated from speedfan that gave the details of the chip
that stores the fan and temperature details.

Here is the log:
A)
When ran SpeedFan Application in My Desktop
Linked ISA BUS at $0290
Linked Intel 82801DB ICH4 SMBUS at $5000
SuperIO Chip=IT8712F
Scanning Intel SMBus at $5000…
SMART Enabled for drive 0
Found ST340015A (40.0GB)
End of detection
CLOCK GENERATOR set to ICS 9248-90

B)
When We ran SpeedFan Application in Actual Environment
Linked ISA Bus at $0290
Linked Intel 82801FB ICH6 SMBus at $0290
Winbond W83627HF (ID=$21) found on ISA at $290
SuperIO chip = Winbond W83627HF (This is the chip that I am interested in)

Also, I tried to find if it is already using any standard windows device
driver by running the dumpbin.exe.

I need to do the same thing as SpeedFan exe is doing. Please advice.

Regards,
Sivakumar Jayapal

Dumpbin log when Speedfan was executing:

Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file C:\Program Files\SpeedFan\speedfan.exe

File Type: EXECUTABLE IMAGE

Section contains the following imports:

kernel32.dll
5F81CC Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 DeleteCriticalSection
0 LeaveCriticalSection
0 EnterCriticalSection
0 InitializeCriticalSection
0 VirtualFree
0 VirtualAlloc
0 LocalFree
0 LocalAlloc
0 GetVersion
0 GetCurrentThreadId
0 InterlockedDecrement
0 InterlockedIncrement
0 VirtualQuery
0 WideCharToMultiByte
0 MultiByteToWideChar
0 lstrlenA
0 lstrcpynA
0 LoadLibraryExA
0 GetThreadLocale
0 GetStartupInfoA
0 GetProcAddress
0 GetModuleHandleA
0 GetModuleFileNameA
0 GetLocaleInfoA
0 GetLastError
0 GetCommandLineA
0 FreeLibrary
0 FindFirstFileA
0 FindClose
0 ExitProcess
0 ExitThread
0 CreateThread
0 WriteFile
0 UnhandledExceptionFilter
0 SetFilePointer
0 SetEndOfFile
0 RtlUnwind
0 ReadFile
0 RaiseException
0 GetStdHandle
0 GetFileSize
0 GetFileType
0 CreateFileA
0 CloseHandle

user32.dll
5F8280 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 GetKeyboardType
0 LoadStringA
0 MessageBoxA
0 CharNextA

advapi32.dll
5F8294 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 RegQueryValueExA
0 RegOpenKeyExA
0 RegCloseKey

oleaut32.dll
5F82A4 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 SysFreeString
0 SysReAllocStringLen
0 SysAllocStringLen

kernel32.dll
5F82B4 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 TlsSetValue
0 TlsGetValue
0 LocalAlloc
0 GetModuleHandleA

advapi32.dll
5F82C8 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 SetSecurityDescriptorDacl
0 RegSetValueExA
0 RegQueryValueExA
0 RegQueryValueA
0 RegQueryInfoKeyA
0 RegOpenKeyExA
0 RegFlushKey
0 RegEnumKeyExA
0 RegDeleteValueA
0 RegDeleteKeyA
0 RegCreateKeyExA
0 RegCloseKey
0 InitializeSecurityDescriptor
0 GetUserNameA

kernel32.dll
5F8304 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 lstrlenW
0 lstrcpyA
0 lstrcmpA
0 WriteProcessMemory
0 WritePrivateProfileStringA
0 WriteFile
0 WinExec
0 WaitForSingleObject
0 VirtualQuery
0 VirtualProtect
0 VirtualAlloc
0 UnmapViewOfFile
0 SystemTimeToFileTime
0 SuspendThread
0 Sleep
0 SizeofResource
0 SetThreadPriority
0 SetThreadLocale
0 SetPriorityClass
0 SetFilePointer
0 SetEvent
0 SetErrorMode
0 SetEndOfFile
0 ResumeThread
0 ResetEvent
0 ReleaseMutex
0 ReadFile
0 QueryPerformanceFrequency
0 QueryPerformanceCounter
0 MultiByteToWideChar
0 MulDiv
0 MoveFileA
0 MapViewOfFile
0 LockResource
0 LocalAlloc
0 LoadResource
0 LoadLibraryA
0 LeaveCriticalSection
0 IsValidLocale
0 InitializeCriticalSection
0 GlobalUnlock
0 GlobalSize
0 GlobalReAlloc
0 GlobalHandle
0 GlobalLock
0 GlobalFree
0 GlobalFindAtomA
0 GlobalDeleteAtom
0 GlobalAlloc
0 GlobalAddAtomA
0 GetWindowsDirectoryA
0 GetVersionExA
0 GetVersion
0 GetTimeZoneInformation
0 GetTickCount
0 GetThreadPriority
0 GetThreadLocale
0 GetTempPathA
0 GetSystemPowerStatus
0 GetSystemInfo
0 GetSystemDirectoryA
0 GetStringTypeExA
0 GetStdHandle
0 GetProfileStringA
0 GetProcessAffinityMask
0 GetProcAddress
0 GetPrivateProfileStringA
0 GetPriorityClass
0 GetModuleHandleA
0 GetModuleFileNameA
0 GetLocaleInfoA
0 GetLocalTime
0 GetLastError
0 GetFullPathNameA
0 GetExitCodeThread
0 GetEnvironmentStringsA
0 GetDiskFreeSpaceA
0 GetDateFormatA
0 GetCurrentThreadId
0 GetCurrentThread
0 GetCurrentProcessId
0 GetCurrentProcess
0 GetComputerNameA
0 GetCPInfo
0 GetACP
0 FreeResource
0 InterlockedIncrement
0 InterlockedExchange
0 InterlockedDecrement
0 FreeLibrary
0 FreeEnvironmentStringsA
0 FormatMessageA
0 FlushInstructionCache
0 FindResourceA
0 FindNextFileA
0 FindFirstFileA
0 FindClose
0 FileTimeToLocalFileTime
0 FileTimeToDosDateTime
0 EnumCalendarInfoA
0 EnterCriticalSection
0 DeviceIoControl
0 DeleteFileA
0 DeleteCriticalSection
0 CreateThread
0 CreateMutexA
0 CreateFileMappingA
0 CreateFileA
0 CreateEventA
0 CopyFileA
0 CompareStringA
0 CloseHandle
0 Beep

version.dll
5F84CC Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 VerQueryValueA
0 GetFileVersionInfoSizeA
0 GetFileVersionInfoA

gdi32.dll
5F84DC Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 UnrealizeObject
0 StretchDIBits
0 StretchBlt
0 SetWindowOrgEx
0 SetWinMetaFileBits
0 SetViewportOrgEx
0 SetTextColor
0 SetTextAlign
0 SetStretchBltMode
0 SetROP2
0 SetPixel
0 SetMapMode
0 SetEnhMetaFileBits
0 SetDIBits
0 SetDIBColorTable
0 SetBrushOrgEx
0 SetBkMode
0 SetBkColor
0 SelectPalette
0 SelectObject
0 SelectClipRgn
0 SaveDC
0 RoundRect
0 RestoreDC
0 Rectangle
0 RectVisible
0 RealizePalette
0 Polyline
0 Polygon
0 PlayEnhMetaFile
0 PatBlt
0 OffsetRgn
0 MoveToEx
0 MaskBlt
0 LineTo
0 LPtoDP
0 IntersectClipRect
0 GetWindowOrgEx
0 GetWinMetaFileBits
0 GetTextMetricsA
0 GetTextExtentPointA
0 GetTextExtentPoint32W
0 GetTextExtentPoint32A
0 GetTextColor
0 GetTextAlign
0 GetSystemPaletteEntries
0 GetStockObject
0 GetPixel
0 GetPaletteEntries
0 GetObjectA
0 GetNearestColor
0 GetMapMode
0 GetEnhMetaFilePaletteEntries
0 GetEnhMetaFileHeader
0 GetEnhMetaFileBits
0 GetDeviceCaps
0 GetDIBits
0 GetDIBColorTable
0 GetDCOrgEx
0 GetCurrentPositionEx
0 GetCurrentObject
0 GetClipRgn
0 GetClipBox
0 GetBrushOrgEx
0 GetBkColor
0 GetBitmapBits
0 GdiFlush
0 ExtTextOutW
0 ExtTextOutA
0 ExcludeClipRect
0 EnumFontFamiliesExA
0 EndPage
0 EndDoc
0 Ellipse
0 DeleteObject
0 DeleteEnhMetaFile
0 DeleteDC
0 CreateSolidBrush
0 CreateRectRgnIndirect
0 CreateRectRgn
0 CreatePenIndirect
0 CreatePen
0 CreatePatternBrush
0 CreatePalette
0 CreateICA
0 CreateHalftonePalette
0 CreateFontIndirectA
0 CreateDIBitmap
0 CreateDIBSection
0 CreateDCA
0 CreateCompatibleDC
0 CreateCompatibleBitmap
0 CreateBrushIndirect
0 CreateBitmap
0 CopyEnhMetaFileA
0 CombineRgn
0 BitBlt

user32.dll
5F8664 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 CreateWindowExA
0 WindowFromPoint
0 WinHelpA
0 WaitMessage
0 ValidateRect
0 UpdateWindow
0 UnregisterClassA
0 UnionRect
0 UnhookWindowsHookEx
0 TranslateMessage
0 TranslateMDISysAccel
0 TrackPopupMenu
0 ToAscii
0 SystemParametersInfoA
0 SubtractRect
0 ShowWindow
0 ShowScrollBar
0 ShowOwnedPopups
0 ShowCursor
0 SetWindowRgn
0 SetWindowsHookExA
0 SetWindowTextA
0 SetWindowPos
0 SetWindowPlacement
0 SetWindowLongA
0 SetTimer
0 SetScrollRange
0 SetScrollPos
0 SetScrollInfo
0 SetRect
0 SetPropA
0 SetParent
0 SetMenuItemInfoA
0 SetMenu
0 SetForegroundWindow
0 SetFocus
0 SetCursor
0 SetClipboardData
0 SetClassLongA
0 SetCapture
0 SetActiveWindow
0 SendMessageA
0 ScrollWindow
0 ScrollDC
0 ScreenToClient
0 RemovePropA
0 RemoveMenu
0 ReleaseDC
0 ReleaseCapture
0 RegisterWindowMessageA
0 RegisterClipboardFormatA
0 RegisterClassA
0 RedrawWindow
0 PtInRect
0 PostQuitMessage
0 PostMessageA
0 PeekMessageA
0 OpenClipboard
0 OffsetRect
0 OemToCharA
0 MsgWaitForMultipleObjects
0 MessageBoxA
0 MessageBeep
0 MapWindowPoints
0 MapVirtualKeyA
0 LockWindowUpdate
0 LoadStringA
0 LoadKeyboardLayoutA
0 LoadIconA
0 LoadCursorA
0 LoadBitmapA
0 KillTimer
0 IsZoomed
0 IsWindowVisible
0 IsWindowEnabled
0 IsWindow
0 IsRectEmpty
0 IsIconic
0 IsDialogMessageA
0 IsChild
0 IsCharUpperA
0 InvalidateRgn
0 InvalidateRect
0 IntersectRect
0 InsertMenuItemA
0 InsertMenuA
0 InflateRect
0 GetWindowThreadProcessId
0 GetWindowTextA
0 GetWindowRect
0 GetWindowPlacement
0 GetWindowLongA
0 GetWindowDC
0 GetUpdateRect
0 GetTopWindow
0 GetSystemMetrics
0 GetSystemMenu
0 GetSysColorBrush
0 GetSysColor
0 GetSubMenu
0 GetScrollRange
0 GetScrollPos
0 GetScrollInfo
0 GetPropA
0 GetParent
0 GetWindow
0 GetMessagePos
0 GetMenuStringA
0 GetMenuState
0 GetMenuItemInfoA
0 GetMenuItemID
0 GetMenuItemCount
0 GetMenu
0 GetLastActivePopup
0 GetKeyboardState
0 GetKeyboardLayoutList
0 GetKeyboardLayout
0 GetKeyState
0 GetKeyNameTextA
0 GetIconInfo
0 GetForegroundWindow
0 GetFocus
0 GetDoubleClickTime
0 GetDesktopWindow
0 GetDCEx
0 GetDC
0 GetCursorPos
0 GetCursor
0 GetClipboardFormatNameA
0 GetClipboardData
0 GetClientRect
0 GetClassNameA
0 GetClassInfoA
0 GetCapture
0 GetAsyncKeyState
0 GetActiveWindow
0 FrameRect
0 FindWindowA
0 FillRect
0 EqualRect
0 EnumWindows
0 EnumThreadWindows
0 EnumClipboardFormats
0 EndPaint
0 EndDeferWindowPos
0 EnableWindow
0 EnableScrollBar
0 EnableMenuItem
0 EmptyClipboard
0 DrawTextW
0 DrawTextA
0 DrawMenuBar
0 DrawIconEx
0 DrawIcon
0 DrawFrameControl
0 DrawFocusRect
0 DrawEdge
0 DispatchMessageA
0 DestroyWindow
0 DestroyMenu
0 DestroyIcon
0 DestroyCursor
0 DeleteMenu
0 DeferWindowPos
0 DefWindowProcA
0 DefMDIChildProcA
0 DefFrameProcA
0 CreatePopupMenu
0 CreateMenu
0 CreateIcon
0 CopyImage
0 CopyIcon
0 CloseClipboard
0 ClientToScreen
0 ChildWindowFromPoint
0 CheckMenuItem
0 CallWindowProcA
0 CallNextHookEx
0 BeginPaint
0 BeginDeferWindowPos
0 CharNextA
0 CharLowerBuffA
0 CharLowerA
0 CharUpperBuffA
0 CharToOemA
0 AdjustWindowRectEx
0 ActivateKeyboardLayout

kernel32.dll
5F8954 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 Sleep

oleaut32.dll
5F895C Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 SafeArrayPtrOfIndex
0 SafeArrayGetElement
0 SafeArrayGetUBound
0 SafeArrayGetLBound
0 SafeArrayCreate
0 VariantChangeType
0 VariantCopyInd
0 VariantCopy
0 VariantClear
0 VariantInit

ole32.dll
5F8988 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 CreateStreamOnHGlobal
0 ReleaseStgMedium
0 OleGetClipboard
0 OleSetClipboard
0 DoDragDrop
0 RevokeDragDrop
0 RegisterDragDrop
0 OleUninitialize
0 OleInitialize
0 CreateDataAdviseHolder
0 CoTaskMemFree
0 CoTaskMemAlloc
0 ProgIDFromCLSID
0 StringFromCLSID
0 CoCreateInstance
0 CoUninitialize
0 CoInitialize
0 IsEqualGUID

oleaut32.dll
5F89D4 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 GetErrorInfo
0 GetActiveObject
0 SysFreeString

comctl32.dll
5F89E4 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 ImageList_SetIconSize
0 ImageList_GetIconSize
0 ImageList_Write
0 ImageList_Read
0 ImageList_GetDragImage
0 ImageList_DragShowNolock
0 ImageList_SetDragCursorImage
0 ImageList_DragMove
0 ImageList_DragLeave
0 ImageList_DragEnter
0 ImageList_EndDrag
0 ImageList_BeginDrag
0 ImageList_GetIcon
0 ImageList_Remove
0 ImageList_DrawEx
0 ImageList_Replace
0 ImageList_Draw
0 ImageList_GetBkColor
0 ImageList_SetBkColor
0 ImageList_ReplaceIcon
0 ImageList_Add
0 ImageList_GetImageCount
0 ImageList_Destroy
0 ImageList_Create
0 InitCommonControls

winspool.drv
5F8A4C Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 OpenPrinterA
0 EnumPrintersA
0 DocumentPropertiesA
0 ClosePrinter

shell32.dll
5F8A60 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 Shell_NotifyIconA
0 ShellExecuteA

shell32.dll
5F8A6C Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 SHGetSpecialFolderLocation
0 SHGetPathFromIDListA

winmm.dll
5F8A78 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 timeGetTime
0 timeEndPeriod
0 timeBeginPeriod
0 joyGetPos

kernel32.dll
5F8A8C Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 GetVersionExA

kernel32.dll
5F8A94 Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 GetVersionExA

GDI32.DLL
5F8A9C Import Address Table
0 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 GetRandomRgn

Summary

4000 .idata
1000 .rdata
1D000 .reloc
6A000 .rsrc
1000 .tls
4000 BSS
1E4000 CODE
F000 DATA
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladkani, Neeraj
Sent: Wednesday, September 06, 2006 7:34 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to read the contents of memory mapped device from a
Windows XP program

Thanks…

You are correct, that’s why I wrote a simple driver .

Thanks and Regards
~Neer

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 6:27 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device
from a Windows XP program

Nope you need a driver to do the mapping, if you do the mapping you open
a
security hole in the OS and the code to do the mapping is more complex
than
the driver that does it correctly!


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Ladkani, Neeraj” wrote in message
news:xxxxx@ntdev…
Can it be done through without a driver?? May be mapping the physical
memory to virtual address space with NtmapViewOfSection API? Is this is
an authentic way or not?

Thanks and Regards
~Neer

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, September 06, 2006 5:50 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to read the contents of memory mapped device
from a Windows XP program

You need a device driver. Probably a pretty simple one, that just gets
the
data in an IOCTL or two.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Sivakumar Jayapal - TLS, Chennai.” wrote in message
news:xxxxx@ntdev…

Hello

I have a problem that I need help from the list.

The device is a custom motherboard with Intel processor that contains a
chip, which controls various operations of the device such as fans,
temperature sensors.

The onboard chip is a memory mapped. There are no BIOS. Hence, I need
to
read the fan and temperature sensor data using the physical memory
address
that is available with me. Now, I have to communicate with this device
from
my Windows XP application using virtual device framework. I am not sure
how
to achieve this.

I have the physical memory location of the device and the offsets to
read
data of fans and temperature sensors.

My requirement is to just read that location and fetch the data, how do
I
achieve this. Please advice.

Regards,

Sivakumar Jayapal
DISCLAIMER
The contents of this e-mail and any attachment(s) are confidential and
intended for the

named recipient(s) only. It shall not attach any liability on the
originator
or HCL or its

affiliates. Any views or opinions presented in this email are solely
those
of the author and

may not necessarily reflect the opinions of HCL or its affiliates. Any
form
of reproduction,

dissemination, copying, disclosure, modification, distribution and / or
publication of this

message without the prior written consent of the author of this e-mail
is
strictly

prohibited. If you have received this email in error please delete it
and
notify the sender

immediately. Before opening any mail and attachments please check them
for
viruses and

defect.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Sivakumar Jayapal - TLS, Chennai. wrote:

I downloaded the exe speedfan and executed it. This exe gave me the fan
details. I don’t know if it is using any device driver to read the fan and
temperature details of a custom motherboard.

Yes, it is.

I got the log file generated from speedfan that gave the details of the chip
that stores the fan and temperature details.

Here is the log:
A)
When ran SpeedFan Application in My Desktop
Linked ISA BUS at $0290
Linked Intel 82801DB ICH4 SMBUS at $5000…

Those numbers ($0290 and $5000) are I/O port numbers. Accessing I/O
ports requires the assistance of a device driver.

B)
When We ran SpeedFan Application in Actual Environment
Linked ISA Bus at $0290
Linked Intel 82801FB ICH6 SMBus at $0290
Winbond W83627HF (ID=$21) found on ISA at $290
SuperIO chip = Winbond W83627HF (This is the chip that I am interested in)

Also, I tried to find if it is already using any standard windows device
driver by running the dumpbin.exe.

And if you look at the imports, you’ll see that it calls CreateFile and
DeviceIoControl, which is the mechanism you use to call into a device
driver.

I thought you said your device was memory-mapped. The W83627HF only
uses I/O ports, usually 295 and 296.

I need to do the same thing as SpeedFan exe is doing. Please advice.

Do you have a copy of the chip spec? With the spec and a very simple
driver to talk to the I/O ports, this should be trivial.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.