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] difference between xen hypervisor and common kernel on h

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] difference between xen hypervisor and common kernel on handling BIOS's e820 map ?
From: Lin-bao Zhang <zhang.linbao@xxxxxxxxx>
Date: Wed, 31 Aug 2011 00:44:57 -0700 (PDT)
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 31 Aug 2011 00:45:34 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1314776697; bh=1zJC4Mu8TlB9yyi4smN2Mw5Oycr6RIGeB1Iko9Q8wIw=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=T07ygrm7ZbzooVMV4VdAAr0QE59YfCOHg9xOTAsSCkiTcX4dJLv+AYQmvrjl2NogjawV/BRqE1VKbgznn5gzoh61GscF3tIEsFJrmGjaH40++8ZInuAyV7dqSmu19hK9c0wHX5QNYJCItVrgHJiflJCLyET1QAlDF/TECrqNCzo=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fsiNprhh1vA1XU0irlcaud3x0c83Ap6xaI2B9kmjCPdDwpiGl4J92hfDN5kputiAna2XXh+nyXuAuU0Kds31xHCshLwuSZC+1dUP0QimJ9FIIaetxwQj118vc7YWSQuuefrOgjebog1SWh1Z5Pt9FTGEm2ceDcnbyJCknCsEySw=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110830161004.GA4055@xxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1314681899.56694.YahooMailNeo@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110830140030.GG11346@xxxxxxxxxxxx> <1314718232.58990.YahooMailNeo@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110830161004.GA4055@xxxxxxxxxxxx>
Reply-to: Lin-bao Zhang <zhang.linbao@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I am sorry for my fault in capturing logs.
from the picture, we can obviously find the common kernel's BIOS e820map has 
mistake. 
I captured these logs from serial port , it seems that serial port has lost 
some key words,sometimes it will lost 'f' ,so confused me. 
for example:

I am sorry for waste your time. very sorry!

You can ignore my old emails about this difference. let's begin now:
I used "dmesg " to get common kernel's e820 map. this is different from XEN 
hypervisor's e820 map:
common kernel's e820 map is like this:


------
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000010000 - 0000000000090400 (usable)
 BIOS-e820: 0000000000090400 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000007f5f0000 (usable)
 BIOS-e820: 000000007f5f0000 - 000000007f62c000 (ACPI data)
 BIOS-e820: 000000007f62c000 - 000000007f62d000 (usable)
 BIOS-e820: 000000007f62d000 - 000000007f79d000 (reserved)
 BIOS-e820: 000000007f79d000 - 000000007f7a0000 (ACPI data)
 BIOS-e820: 000000007f7a0000 - 0000000090000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fee10000 (reserved)
 BIOS-e820: 00000000ff800000 - 0000000100000000 (reserved)
 BIOS-e820: 0000000100000000 - 0000000480000000 (usable)
 BIOS-e820: 0000002000000000 - 0000002400000000 (usable)
 BIOS-e820: 0000004000000000 - 0000004400000000 (usable)
 BIOS-e820: 0000006000000000 - 0000006400000000 (usable) 
-------

then , I differ them just like 
this:https://lh4.googleusercontent.com/-HDA7ZNp_Bc0/Tl3a_sYgl-I/AAAAAAAAAV4/3Bt8LIziSlg/s800/e820%252520map_xen_and_commonkernel.jpg
they are basicly same. 
only difference :
(XEN)  0000000000000000 - 0000000000090400 (usable)

common kernel:
 BIOS-e820: 0000000000010000 - 0000000000090400 (usable)


I don't think this difference is important for xen-hypervisor .  when 
xen-hypervisor has been excuted, BIOS and grub has been ended, so 
xen-hypervisor can operate any memory area.
xen-hypervisor can use low memory( < 1M) . 
based on my existed knowledge ,I know that :
0- 3FF 0000:0000-0000:03FF RAM real-mode interrupt vector table (IVT) 
400- 4FF 0040:0000-0040:00FF   BIOS data area (BDA) 


1, IVT and BDA occupied 0x500 Bytes. 
"After all the BIOS functions have been called, and your
kernel is loaded into memory somewhere, the bootloader or kernel may exit
Real Mode forever (often by going into 32bit Protected Mode). If the kernel 
never uses Real Mode again, then the first
0x500 bytes of memory in the PC may be reused and overwritten. (However, it is
very common to temporarily return to Real Mode in order to change the Video 
Display Mode.)" 
2, grub stage1.S will be loaded 0x7c00 ~ 0x7dff  (512Bytes).
Grub stage2 will be loaded 0x8000 . 

from 0x8000~0x10000 ,about 32K,it seems that this 32K will be used by grub. 
some other information can be found at: 
http://wiki.osdev.org/Memory_Map_(x86)#.22Low.22_memory_.28.3C_1_MiB.29

--
now xen-hypervisor has been executed ,we can destroy any parts of grub and 
BIOS. 
so I think ,xen-hypervisor can arbitrarily any parts below 0x10000 (64K). 

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