From: Lin-bao Zhang Subject: Re: difference between xen hypervisor and common kernel on handling BIOS's e820 map ? Date: Wed, 31 Aug 2011 00:44:57 -0700 (PDT) Message-ID: <1314776697.78208.YahooMailNeo@web122109.mail.ne1.yahoo.com> References: <1314681899.56694.YahooMailNeo@web122110.mail.ne1.yahoo.com> <20110830140030.GG11346@dumpdata.com> <1314718232.58990.YahooMailNeo@web122104.mail.ne1.yahoo.com> <20110830161004.GA4055@dumpdata.com> Reply-To: Lin-bao Zhang Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20110830161004.GA4055@dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org I am sorry for my fault in capturing logs.=0Afrom the picture, we can obvio= usly find the common kernel's BIOS e820map has mistake.=A0=0AI captured the= se logs from serial port , it seems that serial port has lost some key word= s,sometimes it will lost 'f' ,so confused me.=A0=0Afor example:=0A=0AI am s= orry for waste your time. very sorry!=0A=0AYou can ignore my old emails abo= ut this difference. let's begin now:=0AI used "dmesg " to get common kernel= 's e820 map. this is different from XEN hypervisor's e820 map:=0Acommon ker= nel's e820 map is like this:=0A=0A=0A------=0ABIOS-provided physical RAM ma= p:=0A=A0BIOS-e820: 0000000000010000 - 0000000000090400 (usable)=0A=A0BIOS-e= 820: 0000000000090400 - 00000000000a0000 (reserved)=0A=A0BIOS-e820: 0000000= 0000f0000 - 0000000000100000 (reserved)=0A=A0BIOS-e820: 0000000000100000 - = 000000007f5f0000 (usable)=0A=A0BIOS-e820: 000000007f5f0000 - 000000007f62c0= 00 (ACPI data)=0A=A0BIOS-e820: 000000007f62c000 - 000000007f62d000 (usable)= =0A=A0BIOS-e820: 000000007f62d000 - 000000007f79d000 (reserved)=0A=A0BIOS-e= 820: 000000007f79d000 - 000000007f7a0000 (ACPI data)=0A=A0BIOS-e820: 000000= 007f7a0000 - 0000000090000000 (reserved)=0A=A0BIOS-e820: 00000000fec00000 -= 00000000fee10000 (reserved)=0A=A0BIOS-e820: 00000000ff800000 - 00000001000= 00000 (reserved)=0A=A0BIOS-e820: 0000000100000000 - 0000000480000000 (usabl= e)=0A=A0BIOS-e820: 0000002000000000 - 0000002400000000 (usable)=0A=A0BIOS-e= 820: 0000004000000000 - 0000004400000000 (usable)=0A=A0BIOS-e820: 000000600= 0000000 - 0000006400000000 (usable)=A0=0A-------=0A=0Athen , I differ them = just like this:https://lh4.googleusercontent.com/-HDA7ZNp_Bc0/Tl3a_sYgl-I/A= AAAAAAAAV4/3Bt8LIziSlg/s800/e820%252520map_xen_and_commonkernel.jpg=0Athey = are basicly same.=A0=0Aonly difference :=0A(XEN) =A00000000000000000 - 0000= 000000090400 (usable)=0A=0Acommon kernel:=0A=A0BIOS-e820: 0000000000010000 = - 0000000000090400 (usable)=0A=0A=0AI don't think this difference is import= ant for xen-hypervisor . =A0when xen-hypervisor has been excuted, BIOS and = grub has been ended, so xen-hypervisor can operate any memory area.=0Axen-h= ypervisor can use low memory( < 1M) .=A0=0Abased on my existed knowledge ,I= know that :=0A0- 3FF 0000:0000-0000:03FF RAM real-mode interrupt vector ta= ble (IVT) =0A400- 4FF 0040:0000-0040:00FF =A0 BIOS data area (BDA) =0A=0A= =0A1, IVT and BDA occupied 0x500 Bytes.=A0=0A"After all the BIOS functions = have been called, and your=0Akernel is loaded into memory somewhere, the bo= otloader or kernel may=A0exit=0AReal Mode forever (often by=A0going into 32= bit=A0Protected Mode). If the kernel never uses Real Mode again, then the f= irst=0A0x500 bytes of memory in the PC may be reused and overwritten. (Howe= ver, it is=0Avery common to temporarily return to Real Mode in order to cha= nge the=A0Video Display Mode.)"=A0=0A2, grub stage1.S will be loaded 0x7c00= ~ 0x7dff =A0(512Bytes).=0AGrub stage2 will be loaded 0x8000 .=A0=0A=0Afrom= 0x8000~0x10000 ,about 32K,it seems that this 32K will be used by grub.=A0= =0Asome other information can be found at:=A0=0Ahttp://wiki.osdev.org/Memor= y_Map_(x86)#.22Low.22_memory_.28.3C_1_MiB.29=0A=0A--=0Anow xen-hypervisor h= as been executed ,we can destroy any parts of grub and BIOS.=A0=0Aso I thin= k ,xen-hypervisor can=A0arbitrarily any parts below 0x10000 (64K).=A0