get KmdKit By Four-F and go through them he also has a sample code on
PhysMemViewer ObjectManger etc also some basic drivers and thier code sources
look through them probably you may get an answer to your query
also visit FasmBoard there are some interesting threads that deal with PhysMem
and such
edit
i actually didnt have the link at the time i posted so i edit here
take a look at
http://www.security.org.sg/code/sdtrestore.html
this tool supposedly writes to devphysmem (get the pdf and the tool and reverse it to find how it is coded
btw take a look at credits and find posts by the ppl