[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/6] Move PIC initialization out of line to save spa
From: |
Gleb Natapov |
Subject: |
[Qemu-devel] [PATCH 1/6] Move PIC initialization out of line to save space in post code area. |
Date: |
Mon, 27 Oct 2008 12:12:54 +0200 |
User-agent: |
StGIT/0.14.2 |
There are only a couple of bytes left in post area.
Signed-off-by: Gleb Natapov <address@hidden>
---
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
- [Qemu-devel] [PATCH 0/6] Support for S3 ACPI state (suspend to memory) in BIOS, Gleb Natapov, 2008/10/27
- [Qemu-devel] [PATCH 1/6] Move PIC initialization out of line to save space in post code area.,
Gleb Natapov <=
- [Qemu-devel] [PATCH 2/6] Add S3 state to DSDT. Handle resume event in the BIOS., Gleb Natapov, 2008/10/27
- [Qemu-devel] [PATCH 3/6] Disable init of SMM., Gleb Natapov, 2008/10/27
- [Qemu-devel] [PATCH 4/6] Execute rombios32 code from rom address 0xe0000., Gleb Natapov, 2008/10/27
- [Qemu-devel] [PATCH 5/6] Don't use unreserved memory in BIOS., Gleb Natapov, 2008/10/27
- [Qemu-devel] [PATCH 6/6] Don't power down vga card on entering S3 state., Gleb Natapov, 2008/10/27