[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Why the machine address is out of the end of real physical memory?


  • To: ken lost <kenlost@xxxxxxxxx>, <Xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Date: Thu, 24 Apr 2008 08:24:33 +0100
  • Delivery-date: Thu, 24 Apr 2008 00:24:46 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acil3D3nfDhJSxHPEd2pogAWy6hiGQ==
  • Thread-topic: [Xen-devel] Why the machine address is out of the end of real physical memory?

Physical memory doesn't run from 0MB to 8192MB. There is always a hole just
below 4096MB, which is where PCI devices and video framebuffers and the like
get mapped. The RAM which would be in that hole gets remapped above 4096MB.

So probably your memory map is something like 0MB-3584MB and 4096MB-8704MB
(i.e., 512MB is remapped). See the e820 map that Xen (or native Linux)
prints when you first boot your machine.

 -- Keir

On 24/4/08 02:20, "ken lost" <kenlost@xxxxxxxxx> wrote:

> Hello evrybody,
> 
> I have a machine with 8G RAM, which runs on Redhat Enterprise linux
> 5.1(kernel 2.6.18-53.el5xen, i386 platform PAE, xen 3.0.3 ) .  My
> driver need run on Domain0.
> The code has this code for get a momory and its machine address for BIOS.
> 
>            dmamem_buff = (void*)__get_free_pages( GFP_KERNEL|GFP_DMA,
> DMA_MEMORY_ORDER);
>            maddr_t ma = virt_to_machine(dmamem_buff) ;
>            printk("machine address is %lldM\n", ma/1024/1024 );
>            printk("machine address is 0x%llx\n", ma );
> ...
> 
> But the result :
>            machine address is 8487M
>            machine address is 0x212790000
> 
> Why the machine address is out of the end of real physical memory?
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.