Read access from device memory on current platforms will work correctly.
Write access to device memory on current platforms will appear to work
correctly 99% or so of the time. See PGV’s reference to some ancient
NtInsider article about the x86 write post buffer and why it matters for
device memory write access.
The simple answer is use the HAL.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Thursday, August 03, 2006 6:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] READ_REGISTER_XXXX
I have a fundamental doubt about implementing mechanism to access MMIO
Space Pointed by Device BAR’s
Is it Ok of I map my Device MMIO Space to equivalent Stucture , What are
the consequences if I dont use READ_REGISTER_XXX
Example 1 : Using READ_REGISTER_XXXX
mappedaddress = MMmapIoSpace(BARMMIOAddress,range);
READ_REGISTER_XXX(mappedaddress,offset,outvalue);
EXample 2: Using structure to read MMIO
typedef struct _DEVICE
{
ULONG some register1;
ULONG some register2;
…
} DEVICE,*PDEVICE;
PDEVICE pdevice = MmapIoSpace(BARMMIOAddress,range); //assing and map
pDevice.register1 = value; //access
What are the pro’s and con’s
Thanks,
Manohara
}
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