I am developing a kernel mode driver which is used as hardware
debugger.(win2k)
For writing to a particular memory address I am using
WRITE_REGISTER_UCHAR for byte write
WRITE_REGISTER_USHORT for halfword write
WRITE_REGISTER_ULONG for word write
But internally all the functions are using byte access even if I do
32bit write on some location. it does 4 bytes write one bye one.
I want it to be either 2 half word write or a word write access during
32 bit write and a single half word write when i do half word write.
Are they any other API which can do this ? Any solution to this
problem ??
Thanks
Rakesh
Why do you think that WRITE_REGISTER_USHORT and WRITE_REGISTER_ULONG do not use 16 and 32 bit
operations? My ntddk.h says:
#define WRITE_REGISTER_USHORT(x, y) { \
*(volatile USHORT * const)(x) = y; \
KeFlushWriteBuffer(); \
}
#define WRITE_REGISTER_ULONG(x, y) { \
*(volatile ULONG * const)(x) = y; \
KeFlushWriteBuffer(); \
}
===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032
-----Original Message-----
From: “Rakesh A. Ughreja”
To: “NT Developers Interest List”
Date: Tue, 17 Dec 2002 10:59:04 +0530
Subject: [ntdev] Query regarding HAL functions …
> I am developing a kernel mode driver which is used as hardware
> debugger.(win2k)
>
> For writing to a particular memory address I am using
>
> WRITE_REGISTER_UCHAR for byte write
> WRITE_REGISTER_USHORT for halfword write
> WRITE_REGISTER_ULONG for word write
>
> But internally all the functions are using byte access even if I do
> 32bit write on some location. it does 4 bytes write one bye one.
>
> I want it to be either 2 half word write or a word write access during
> 32 bit write and a single half word write when i do half word write.
>
> Are they any other API which can do this ? Any solution to this
> problem ??
>
> Thanks
> Rakesh
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to %%email.unsub%%
>