All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sebastian Herbszt" <herbszt@gmx.de>
To: Gleb Natapov <gleb@redhat.com>, bochs-developers@lists.sourceforge.net
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH v3 5/6] Don't use unreserved memory inBIOS.
Date: Thu, 13 Nov 2008 01:43:35 +0100	[thread overview]
Message-ID: <16C4151DCE3D406091E6AC948C8CA8A3@FSCPC> (raw)
In-Reply-To: <20081110091159.11822.26753.stgit@dhcp-1-237.local>

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 <gleb@redhat.com>
> ---
> 
> bios/rombios.c        |   11 +++++++----
> bios/rombios.h        |    1 -
> bios/rombios32.c      |   11 ++++-------
> bios/rombios32start.S |    2 +-
> 4 files changed, 12 insertions(+), 13 deletions(-)
> 
> diff --git a/bios/rombios.c b/bios/rombios.c
> index 630cfd2..c6c8b19 100644
> --- a/bios/rombios.c
> +++ b/bios/rombios.c
> @@ -4547,7 +4547,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;
> @@ -4556,7 +4556,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;
> @@ -10032,8 +10032,11 @@ rombios32_05:
>   mov gs, ax
>   cld
> 
> -  ;; init the stack pointer
> -  mov esp, #0x00080000
> +  ;; init the stack pointer to point below EBDA
> +  mov ax, [0x040e]
> +  shl eax, #4
> +  mov esp, #-0x10
> +  add esp, eax

This could be a problem if the OS decides to put the wakeup
vector just below the EBDA. But as long as the EBDA is located
above 0x9f000 it should be ok and this can be changed later.

- Sebastian

  reply	other threads:[~2008-11-13  0:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10  9:11 [Qemu-devel] [PATCH v3 0/6] Support for S3 ACPI state (suspend to memory) in BIOS Gleb Natapov
2008-11-10  9:11 ` [Qemu-devel] [PATCH v3 1/6] Move PIC initialization out of line to save space in post code area Gleb Natapov
2008-11-13  0:10   ` [Qemu-devel] Re: [Bochs-developers] [PATCH v3 1/6] Move PIC initialization out ofline " Sebastian Herbszt
2008-11-13 19:15     ` [Qemu-devel] " Stanislav Shwartsman
2008-11-13 20:00       ` Anthony Liguori
2008-11-14  9:47         ` Gleb Natapov
2008-11-14 20:36           ` [Qemu-devel] RE: [Bochs-developers] [PATCH v3 1/6] Move PICinitialization " Sebastian Herbszt
2008-11-10  9:11 ` [Qemu-devel] [PATCH v3 2/6] Add S3 state to DSDT. Handle resume event in the BIOS Gleb Natapov
2008-11-15 17:43   ` [Qemu-devel] Re: [Bochs-developers] [PATCH v3 2/6] Add S3 state to DSDT. Handleresume " Sebastian Herbszt
2008-11-15 17:56     ` Gleb Natapov
2008-11-10  9:11 ` [Qemu-devel] [PATCH v3 3/6] Preserve memory content during SMM init Gleb Natapov
2008-11-10  9:11 ` [Qemu-devel] [PATCH v3 4/6] Execute rombios32 code from rom address 0xe0000 Gleb Natapov
2008-11-10  9:11 ` [Qemu-devel] [PATCH v3 5/6] Don't use unreserved memory in BIOS Gleb Natapov
2008-11-13  0:43   ` Sebastian Herbszt [this message]
2008-11-13  7:41     ` [Qemu-devel] Re: [Bochs-developers] [PATCH v3 5/6] Don't use unreserved memory inBIOS Gleb Natapov
2008-11-10  9:12 ` [Qemu-devel] [PATCH v3 6/6] Don't power down vga card on entering S3 state Gleb Natapov
2008-11-10 12:07   ` Glauber Costa
2008-11-10 13:28     ` Gleb Natapov
2008-11-10 20:25   ` [Qemu-devel] Re: [Bochs-developers] [PATCH v3 6/6] Don't power down vga card onentering " Sebastian Herbszt
2008-11-10 21:20     ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16C4151DCE3D406091E6AC948C8CA8A3@FSCPC \
    --to=herbszt@gmx.de \
    --cc=bochs-developers@lists.sourceforge.net \
    --cc=gleb@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.