none
How to reserve and lock physical memory on winxp? RRS feed

  • Question

  • I want to reserve a segment of the physical memory (RAM) on winxp(running on my private embedded device) for exclusive use, and then access this memory in my device driver. 

    What should I do?

    I think I can reserve 100MB as the follow steps: 

    • Windows XP boot.ini entry — multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP, Enterprise" /fastdetect /NoExecute=OptIn /burnmemory=100
    • Calculate the base address of the reserved memory

    Could I access the reserved memory through MmMapIoSpace?

    How to do this for the share memory display video driver(use the physical memory(RAM) as it's display framebuffer)?

    Saturday, June 8, 2013 1:04 PM

Answers

  • First if all you want is 100MB there are otherways to do it.  MmAllocateContiguousMemorySpecifyCache can do this, but you will need to have the driver load early in the boot sequence.  You don't want to use burnmemory since the system does not specify exactly where the memory is located.  If you cannot use MmAllocateContiguousMemorySpecifyCache use /maxmem on the boot line, and then you can grab the physical memory since you will know the top address the system uses.  Only do the /maxmem approach on an embedded like system where you control everything, not a general product.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Saturday, June 8, 2013 8:40 PM

All replies

  • Could I access the reserved memory like PCIE Memroy space?
    Saturday, June 8, 2013 2:26 PM
  • First if all you want is 100MB there are otherways to do it.  MmAllocateContiguousMemorySpecifyCache can do this, but you will need to have the driver load early in the boot sequence.  You don't want to use burnmemory since the system does not specify exactly where the memory is located.  If you cannot use MmAllocateContiguousMemorySpecifyCache use /maxmem on the boot line, and then you can grab the physical memory since you will know the top address the system uses.  Only do the /maxmem approach on an embedded like system where you control everything, not a general product.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Saturday, June 8, 2013 8:40 PM