qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: bochs-developers@lists.sourceforge.net
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 1/6] Move PIC initialization out of line to save space in post code area.
Date: Mon, 03 Nov 2008 11:26:25 +0200	[thread overview]
Message-ID: <20081103092625.8058.52045.stgit@dhcp-1-237.local> (raw)
In-Reply-To: <20081103092620.8058.91416.stgit@dhcp-1-237.local>

There are only a couple of bytes left in post area.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
---

 bios/rombios.c |   48 ++++++++++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/bios/rombios.c b/bios/rombios.c
index 3366ad9..88eac04 100644
--- a/bios/rombios.c
+++ b/bios/rombios.c
@@ -10256,6 +10256,31 @@ rom_scan_increment:
   mov  ds, ax
   ret
 
+post_init_pic:
+  mov al, #0x11 ; send initialisation commands
+  out 0x20, al
+  out 0xa0, al
+  mov al, #0x08
+  out 0x21, al
+  mov al, #0x70
+  out 0xa1, al
+  mov al, #0x04
+  out 0x21, al
+  mov al, #0x02
+  out 0xa1, al
+  mov al, #0x01
+  out 0x21, al
+  out 0xa1, al
+  mov  al, #0xb8
+  out  0x21, AL ;master pic: unmask IRQ 0, 1, 2, 6
+#if BX_USE_PS2_MOUSE
+  mov  al, #0x8f
+#else
+  mov  al, #0x9f
+#endif
+  out  0xa1, AL ;slave  pic: unmask IRQ 12, 13, 14
+  ret
+
 ;; the following area can be used to write dynamically generated tables
   .align 16
 bios_table_area_start:
@@ -10516,28 +10541,7 @@ post_default_ints:
   SET_INT_VECTOR(0x10, #0xF000, #int10_handler)
 
   ;; PIC
-  mov al, #0x11 ; send initialisation commands
-  out 0x20, al
-  out 0xa0, al
-  mov al, #0x08
-  out 0x21, al
-  mov al, #0x70
-  out 0xa1, al
-  mov al, #0x04
-  out 0x21, al
-  mov al, #0x02
-  out 0xa1, al
-  mov al, #0x01
-  out 0x21, al
-  out 0xa1, al
-  mov  al, #0xb8
-  out  0x21, AL ;master pic: unmask IRQ 0, 1, 2, 6
-#if BX_USE_PS2_MOUSE
-  mov  al, #0x8f
-#else
-  mov  al, #0x9f
-#endif
-  out  0xa1, AL ;slave  pic: unmask IRQ 12, 13, 14
+  call post_init_pic
 
   mov  cx, #0xc000  ;; init vga bios
   mov  ax, #0xc780

  reply	other threads:[~2008-11-03  9:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03  9:26 [Qemu-devel] [PATCH v2 0/6] Support for S3 ACPI state (suspend to memory) in BIOS Gleb Natapov
2008-11-03  9:26 ` Gleb Natapov [this message]
2008-11-06 21:42   ` [Qemu-devel] Re: [Bochs-developers] [PATCH v2 1/6] Move PIC initialization out ofline to save space in post code area Sebastian Herbszt
2008-11-03  9:26 ` [Qemu-devel] [PATCH v2 2/6] Add S3 state to DSDT. Handle resume event in the BIOS Gleb Natapov
2008-11-06 23:03   ` [Qemu-devel] Re: [Bochs-developers] [PATCH v2 2/6] Add S3 state to DSDT. Handleresume " Sebastian Herbszt
2008-11-10  8:24     ` Gleb Natapov
2008-11-03  9:26 ` [Qemu-devel] [PATCH v2 3/6] Preserve memory content during SMM init Gleb Natapov
2008-11-03  9:26 ` [Qemu-devel] [PATCH v2 4/6] Execute rombios32 code from rom address 0xe0000 Gleb Natapov
2008-11-07 23:20   ` [Qemu-devel] Re: [Bochs-developers] [PATCH v2 4/6] Execute rombios32 code from romaddress 0xe0000 Sebastian Herbszt
2008-11-08  7:51     ` Gleb Natapov
2008-11-10 19:25       ` [Qemu-devel] Re: [Bochs-developers] [PATCH v2 4/6] Execute rombios32 code fromromaddress 0xe0000 Sebastian Herbszt
2008-11-10 21:18         ` Gleb Natapov
2008-11-03  9:26 ` [Qemu-devel] [PATCH v2 5/6] Don't use unreserved memory in BIOS Gleb Natapov
2008-11-07  0:25   ` [Qemu-devel] Re: [Bochs-developers] " Kevin O'Connor
2008-11-07  0:31     ` Michael Brown
2008-11-09 17:40     ` [Qemu-devel] Re: [Bochs-developers] [PATCH v2 5/6] Don't use unreservedmemory " Sebastian Herbszt
2008-11-09 19:43       ` Kevin O'Connor
2008-11-10 19:55         ` [Qemu-devel] Re: [Bochs-developers] [PATCH v2 5/6] Don't use unreservedmemory inBIOS Sebastian Herbszt
2008-11-03  9:26 ` [Qemu-devel] [PATCH v2 6/6] Don't power down vga card on entering S3 state 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=20081103092625.8058.52045.stgit@dhcp-1-237.local \
    --to=gleb@redhat.com \
    --cc=bochs-developers@lists.sourceforge.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).