Page 1 of 1

copying from addr@ 2GB to addr@ 6GB

Posted: Sun Feb 08, 2009 8:54 am
by sawdust
I have PAE enabled paging and want to copy a buffer from addr 2GB to an addr at 6GB. To access 6GB, we need to load the respective PDPTR. If I switch the PDPTR, how can I access the code and data in lower 4GB range?
Thx

Re: copying from addr@ 2GB to addr@ 6GB

Posted: Sun Feb 08, 2009 9:08 am
by AJ
Hi,

I only really have experience with PDPT's in long mode, but think it works the same, so here goes.

I think you are confusing physical and virtual memory. PAE lets you access > 4GiB of physical RAM, but you still have the same 4GiB linear address space (in Protected Mode - long mode gives you a wider Virtual space too). That means that you page in the 2GiB mark somewhere in your virtual address space, also page in the 6GiB mark anywhere in your virtual address space and away you go.

Alternatively, use long mode and you'll have plenty of virtual address space to page in your entire physical range.

Cheers,
Adam