Remapping physical memory.

Discussion in 'Windows Vista Drivers' started by RossettoeCioccolato, Jan 19, 2006.

  1. What are the implications of remapping physical memory using MmMapIoSpace on
    Windows XP and later? Looking at the disassembly it appears to handle
    potential inconsistent cache attributes on currently mapped pages.

    Regards,

    George.
     
    RossettoeCioccolato, Jan 19, 2006
    #1
    1. Advertisements

  2. RossettoeCioccolato

    Mark Roddy Guest

    As long as you know who else is using the memory you should be ok. As
    noted the cache mode issues are handled for you. If some other
    components not under your control are using the same memory you
    obviously have other issues to deal with.


    =====================
    Mark Roddy DDK MVP
    Windows Vista/2003/XP/2000 Consulting
    Device and Filesystem Drivers
    Hollis Technology Solutions 603-321-1032
    www.hollistech.com
     
    Mark Roddy, Jan 20, 2006
    #2
    1. Advertisements

  3. Mark,

    Thanks for your swift reply.
    And if I don't know? What are the potential consequences in that case? I
    am contemplating readonly access for a very brief period of time.

    Regards,

    George.
     
    RossettoeCioccolato, Jan 20, 2006
    #3
  4. RossettoeCioccolato

    Mark Roddy Guest

    So that would be safe in terms of memory content consistency but the
    data you read could be stale.


    =====================
    Mark Roddy DDK MVP
    Windows Vista/2003/XP/2000 Consulting
    Device and Filesystem Drivers
    Hollis Technology Solutions 603-321-1032
    www.hollistech.com
     
    Mark Roddy, Jan 20, 2006
    #4
  5. Mark,
    You mean because cached contents may have been updated that have not yet
    been flushed to the page. However, MmMapIoSpace flushes the cache(s). So I
    should be alright so long as I do not hold on to the pointer too long.

    Thanks for your helpful comments.

    Regards,

    George.
     
    RossettoeCioccolato, Jan 20, 2006
    #5
  6. RossettoeCioccolato

    Mark Roddy Guest

    It isn't a cache coherency issue - that is guaranteed to work. If you
    are reading a data structure that is more than whatever is the atomic
    memory read size on your platform then there is no guarantee that your
    sequence of reads has read a consistent data structure.


    =====================
    Mark Roddy DDK MVP
    Windows Vista/2003/XP/2000 Consulting
    Device and Filesystem Drivers
    Hollis Technology Solutions 603-321-1032
    www.hollistech.com
     
    Mark Roddy, Jan 21, 2006
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.