From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvghM-0008PL-Cg for qemu-devel@nongnu.org; Thu, 30 Oct 2008 19:13:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvghK-0008P9-T8 for qemu-devel@nongnu.org; Thu, 30 Oct 2008 19:13:04 -0400 Received: from [199.232.76.173] (port=51772 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvghK-0008P5-OW for qemu-devel@nongnu.org; Thu, 30 Oct 2008 19:13:02 -0400 Received: from mail.gmx.net ([213.165.64.20]:42269) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KvghK-0000j5-9Y for qemu-devel@nongnu.org; Thu, 30 Oct 2008 19:13:02 -0400 Message-ID: From: "Sebastian Herbszt" References: <20081027101249.21464.57377.stgit@gleb-debian.qumranet.com.qumranet.com> <20081027101315.21464.66215.stgit@gleb-debian.qumranet.com.qumranet.com> In-Reply-To: <20081027101315.21464.66215.stgit@gleb-debian.qumranet.com.qumranet.com> Date: Fri, 31 Oct 2008 00:12:00 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit 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: Gleb Natapov , bochs-developers@lists.sourceforge.net Cc: qemu-devel@nongnu.org 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? > // Define the application NAME > #if defined(BX_QEMU) > diff --git a/bios/rombios32.c b/bios/rombios32.c > index e887d71..c192cf3 100755 > --- a/bios/rombios32.c > +++ b/bios/rombios32.c > @@ -57,7 +57,7 @@ typedef unsigned long long uint64_t; > > #define APIC_ENABLED 0x0100 > > -#define AP_BOOT_ADDR 0x10000 > +#define AP_BOOT_ADDR 0x9f000 > > #define MPTABLE_MAX_SIZE 0x00002000 > #define SMI_CMD_IO_ADDR 0xb2 > - Sebastian