WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Why the machine address is out of the end of real physical memory?
From: "ken lost" <kenlost@xxxxxxxxx>
Date: Thu, 24 Apr 2008 17:52:22 +0800
Cc: Xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 24 Apr 2008 02:52:50 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=18qREiYK+pxFy1TcjDXnEeif7CC15zqSdVec+LSnlrg=; b=BHzI/yaZbyY3TjkHsVNm6iM8ZtMUNvfihCsP8Zzg/ccaD1LlTEPwoq77ErEe7SzScFSNxbt/+sFa/DiTjrmgyug6w6bAzoUbBKiRWeeaYgZdqFBoBHmN/DlUHNMIA5tbgGteGE/KxJLlERoYuNI9RSttMsHQajK5xntt404iAvk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=b9LVb7n71RjDBTZSoEeWFG1NxbFLf1MJgRqypxq7oVE5u2roMvhziaXCQ4kwJLEv2i9x8BNc6laNusq0QvLqQoAb0l2xE3OxBMBWZyGy5PhfIp8SnPQvG3JM/qQDVoMOjgg59BJBgimTfW8IH2YQfGd8pEI1gaqgRxFn5SLsYmE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C435F441.17D82%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <abd9d3690804231820q5b3001f1s7b0c7b20f3c76de0@xxxxxxxxxxxxxx> <C435F441.17D82%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Does it mean that On xen domain0  the file /proc/iomem show the real
machine memory map, not the psudo physical memory map ?

Can I get a memory page whose machine address is below 4G ?

These are the information of file iomem
# cat /proc/iomem
00000000-0009cfff : System RAM
0009dc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000cb000-000cbfff : Adapter ROM
000f0000-000fffff : System ROM
00100000-bfefffff : System RAM
  00100000-00bfffff : Hypervisor code and data
    00be6080-00be6143 : Crash note
    00be7b80-00be7c77 : Crash note
    00be7d00-00be7dc3 : Crash note
    00be7e80-00be7f43 : Crash note
bff00000-bff08fff : ACPI Tables
bff09000-bff7ffff : ACPI Non-volatile Storage
bff80000-bfffffff : reserved
c8000000-c80003ff : 0000:00:1d.7
  c8000000-c80003ff : ehci_hcd
c8000400-c80007ff : 0000:00:1f.2
c8100000-c82fffff : PCI Bus #01
  c8200000-c82fffff : PCI Bus #02
    c8200000-c82fffff : PCI Bus #04
      c8200000-c821ffff : 0000:04:00.0
        c8200000-c821ffff : e1000
      c8220000-c823ffff : 0000:04:00.1
        c8220000-c823ffff : e1000
c8300000-c83fffff : PCI Bus #0c
  c8300000-c830ffff : 0000:0c:02.0
  c8320000-c833ffff : 0000:0c:02.0
d0000000-d7ffffff : PCI Bus #0c
  d0000000-d7ffffff : 0000:0c:02.0
e0000000-efffffff : reserved
fe700000-fe7003ff : 0000:00:08.0
fec00000-fec0ffff : reserved
fee00000-fee00fff : reserved
ff000000-ffffffff : reserved
100000000-33fffffff : System RAM


2008/4/24, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>:
> 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