My scenario is somewhat different from the OP.
Some background to my question:
I reserve a range of memory in a UEFI application and then I want to find
out about my region from Windows, my reserved range shows up in the
“HKLM\HARDWARE\RESOURCEMAP\System Resources\Loader Reserved” key. Thing is
that I cannot find any information about the binary data stored in that
particular REG_RESOURCE_LIST.
However, I think the format is something like:
On Win7 x64:
uint32_t version 0x00000001 on all machines I’ve examined
uint8_t unknown[12] Don’t know about these bytes, all zero anyway.
uint32_t num_entries Number of memory ranges present
num_entries {
uint64_t physical_address
uint64_t length
uint8_t access_flags 0x03 on my machines, probably R/W = 011b
uint8_t unknown[3] 01 00 00, on my machines except the last entry
}
The only difference on a 32-bit Win7 is the length that seems to be a
doubleword instead.
Right now I’m parsing the data this way, but if there is a better way, hence
my question about the MmGetPhysicalAddressRange, I’d love to know more about
it. Google returns 0 hits on the subject.
Kindest regards,
Jonas
On Wed, Apr 20, 2011 at 6:24 PM, Don Burn wrote:
> Though why the OP rejected the registry solution and just adding up the
> sizes from the resource is beyond me this is the approach Microsoft has
> recommended for the last 17 years. Of course considering this thread
> started 5 years ago on wonders why it is reappearing now.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Martin O’Brien” wrote in message
> news:xxxxx@ntdev:
>
>
> Google is your friend here. There’s no official documentation.
>>
>>
>>
>>
>>
>> Good luck,
>>
>>
>>
>> mm
>>
>>
>>
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Jonas Gulle
>> Sent: Wednesday, April 20, 2011 11:58 AM
>> To: Windows System Software Devs Interest List
>> Subject: Re: [ntdev] Get Physical RAM size in kernel mode
>>
>>
>>
>> Do you have any more information about the MmGetPhysicalRanges() function?
>>
>>
>>
>> On Mon, May 19, 2008 at 2:29 PM, dhirendra pratap
>> wrote:
>>
>> If GetSysInformation does not work for you.
>>
>>
>>
>> Alternatively you can use MmGetPhysicalRanges()
>>
>>
>>
>> Again its undocumented but it works…
>>
>>
>>
>> Regards,
>>
>> Dhiren
>>
>>
>>
>> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
>> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
>> the
>> List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>