From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwZrQ-0007o1-0j for qemu-devel@nongnu.org; Sun, 02 Nov 2008 05:07:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwZrP-0007nB-92 for qemu-devel@nongnu.org; Sun, 02 Nov 2008 05:07:07 -0500 Received: from [199.232.76.173] (port=38502 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwZrO-0007mw-GZ for qemu-devel@nongnu.org; Sun, 02 Nov 2008 05:07:06 -0500 Received: from mx2.redhat.com ([66.187.237.31]:54465) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KwZrN-0007Fy-LO for qemu-devel@nongnu.org; Sun, 02 Nov 2008 05:07:06 -0500 Date: Sun, 2 Nov 2008 12:06:59 +0200 From: Gleb Natapov Message-ID: <20081102100659.GC16809@redhat.com> References: <20081027101249.21464.57377.stgit@gleb-debian.qumranet.com.qumranet.com> <20081027101315.21464.66215.stgit@gleb-debian.qumranet.com.qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH 5/6] Don't use unreserved memory in BIOS. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sebastian Herbszt Cc: bochs-developers@lists.sourceforge.net, qemu-devel@nongnu.org On Fri, Oct 31, 2008 at 12:12:00AM +0100, Sebastian Herbszt wrote: > Gleb Natapov wrote: > >> Use only first page and last page of low memory. OSes assumes that first >> page is used by bios and last page is reserved in e820 map. >> >> Signed-off-by: Gleb Natapov >> --- >> >> bios/rombios.c | 6 +++--- >> bios/rombios.h | 2 +- >> bios/rombios32.c | 2 +- >> 3 files changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/bios/rombios.c b/bios/rombios.c >> index c4c1e35..19f0e93 100644 >> --- a/bios/rombios.c >> +++ b/bios/rombios.c >> @@ -4541,7 +4541,7 @@ ASM_END >> { >> case 0: >> set_e820_range(ES, regs.u.r16.di, >> - 0x0000000L, 0x0009fc00L, 1); >> + 0x0000000L, 0x0009f000L, 1); >> regs.u.r32.ebx = 1; >> regs.u.r32.eax = 0x534D4150; >> regs.u.r32.ecx = 0x14; >> @@ -4550,7 +4550,7 @@ ASM_END >> break; >> case 1: >> set_e820_range(ES, regs.u.r16.di, >> - 0x0009fc00L, 0x000a0000L, 2); >> + 0x0009f000L, 0x000a0000L, 2); >> regs.u.r32.ebx = 2; >> regs.u.r32.eax = 0x534D4150; >> regs.u.r32.ecx = 0x14; >> @@ -10021,7 +10021,7 @@ rombios32_05: >> cld >> >> ;; init the stack pointer >> - mov esp, #0x00080000 >> + mov esp, #0x9fbf0 >> >> ;; pass pointer to s3_resume_flag and s3_resume_vector to rombios32 >> push #0x04b0 >> diff --git a/bios/rombios.h b/bios/rombios.h >> index f0ed88e..57b0f46 100644 >> --- a/bios/rombios.h >> +++ b/bios/rombios.h >> @@ -56,7 +56,7 @@ >> #define ACPI_DATA_SIZE 0x00010000L >> #define PM_IO_BASE 0xb000 >> #define SMB_IO_BASE 0xb100 >> -#define CPU_COUNT_ADDR 0xf000 >> +#define CPU_COUNT_ADDR 0x0500 > > Why did you pick 0x500? > Cool number, don't you think so? It is unused location in a first page. if 0x666 is unused we can use it instead. -- Gleb.