Tech Support > Microsoft Windows > Drivers > Re: Call in Kernel space to find the Start of the PCI Physical Address Space
Re: Call in Kernel space to find the Start of the PCI Physical Address Space
Posted by Mark Roddy on April 27th, 2004


What are you trying to do that you think needs whatever you think 'the start
of PCI Physical Address Space' is?
--

=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com


"WDD" <anonymous@discussions.microsoft.com> wrote in message
news3D24971-8141-4D0D-9ACC-F5D6B734DCBC@microsoft.com...


Posted by Mark Roddy on April 28th, 2004


Ah, I see. Well you certainly can get a rough estimate, perhaps good enough
for your bars. A long time ago I wrote a simple utility for OSR that groks
the hardware registry for this information. Look here:
http://www.osronline.com/article.cfm?article=156

This should at least get you started.
--

=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com


"WDD" <anonymous@discussions.microsoft.com> wrote in message
newsBBE54DE-0382-4B28-AF37-5B9A8E922FF0@microsoft.com...


Posted by WDD on April 29th, 2004


Sorry My correction

1. These are all User Virtual Adresses. Right? The Physical Memory resident is mapped "somewhere in the 4G Virtual Address Range

2. When a device is given translated resources, say in a BAR, as my example
BAR0 (Mem) F8100000h - F810FFFFh (size 00010000h. 64KB), this range is referrred to as Physical Address, but this address does not lie within the ranges of Physical Memory listed by PhysMem. Why? It does lie within hte Reserved range above 0xFEC00000

3. What are the Reserved ranges used for

4. Is this the translated range of "some" 64KB range that lies within the 3 ranges that were listed as physical memory, and then "Mapped" into the reserved range

5. To access the Physical address range in a BAR we have to use the Virtual Address returned from MmMapIoSpace, what does the MmMapIoSpace really do

Any literature I can read up on this? Is the Inside Windows 2000 book worth buying, or an XP/.NET later realease available

Thanks


----- WDD wrote: ----

Thanks Mark

Looks like the memory is setup as follows

0x1000 - 0x9E000 ( User Space right?
0x100000 - 0xEFF000 ( User Space right?
0x1000000 - 0x3E7F0000 ( Kernel Space right?

This is based on the Virtual Address Space of 4GB right?

Posted by Don Burn on April 29th, 2004


Comments inline:
"WDD" <anonymous@discussions.microsoft.com> wrote in message
news:5D529FE4-CF86-4EEA-8A03-136CDADEC605@microsoft.com...

No, the physical memory on most machines is split as shown in that table.
There is no destinction on these addresses for kernel or user.


ranges of Physical Memory listed by PhysMem. Why? It does lie within hte
Reserved range above 0xFEC00000.

Because PhysMem list the memory of the system, not the memory spaces of PCI
cards.

reserved range?
really do?

It builds a set of page table mappings for a physical address region to a
set of virtual addresses.


Inside Windows 2000 is a good book. Current reports are the XP/2003 version
is expected in October.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
,


Posted by WDD on April 29th, 2004


Thanks

I'm trying to access this Reg path with my driver but fail. Using the same convention I use for the RegistryPath given at driver entry with the following changes

GetRegValueDword
L"REGISTRY\\MACHINE\\HARDWARE\\RESOURCEMAP\\System Resources\\PhysicalMemory"
L".Translated",...)

ZwOpenKey Fails

Any Ideas?

Posted by Mark Roddy on April 30th, 2004


What was the error code?

--

=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com


"WDD" <anonymous@discussions.microsoft.com> wrote in message
news:FC318ABB-1ABD-45B3-B1E9-556EC891F127@microsoft.com...
following changes:


Posted by WDD on April 30th, 2004


0xC000003B - STATUS_OBJECT_PATH_SYNTAX_BAD

Posted by Mark Roddy on April 30th, 2004


First, stop chopping all the context from your replies, it makes it very
difficult to follow the conversation. Second, perhaps the error code is
telling you something, huh? Bad syntax, what could it mean? Try searching
the ddk sources for an example of somebody using whatever api you are using
(ZwOpenKey I presume.)



=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com


"WDD" <anonymous@discussions.microsoft.com> wrote in message
news:6B2BC855-B260-4B3E-9667-63087FA49FDC@microsoft.com...



Similar Posts