[SeaBIOS] Seabios: misc. fixes

Kevin O'Connor kevin at koconnor.net
Sun Jan 29 18:27:40 CET 2012


On Tue, Jan 10, 2012 at 10:33:29AM -0700, Philip Prindeville wrote:
> Hi all,
> 
> Couple of minor patches:
> 
> (1) some messages are logged at level 1 that really shouldn't be;
> (2) there's i8042 code being reached that shouldn't be if CONFIG_PS2PORT is off.

Thanks for the report.  I've picked up the ps2 port change into my
repo.

-Kevin


commit 8696562462f71a269a799b9b21d62a3124aa73ab
Author: Kevin O'Connor <kevin at koconnor.net>
Date:   Sun Jan 29 12:25:46 2012 -0500

    Check for CONFIG_PS2PORT on all entry ps2 function entry points.
    
    Signed-off-by: Kevin O'Connor <kevin at koconnor.net>

diff --git a/src/ps2port.c b/src/ps2port.c
index 58335af..1f04299 100644
--- a/src/ps2port.c
+++ b/src/ps2port.c
@@ -132,6 +132,8 @@ i8042_aux_write(u8 c)
 void
 i8042_reboot(void)
 {
+    if (! CONFIG_PS2PORT)
+       return;
     int i;
     for (i=0; i<10; i++) {
         i8042_wait_write();
@@ -322,12 +324,17 @@ ps2_command(int aux, int command, u8 *param)
 int
 ps2_kbd_command(int command, u8 *param)
 {
+    if (! CONFIG_PS2PORT)
+        return -1;
     return ps2_command(0, command, param);
 }
 
 int
 ps2_mouse_command(int command, u8 *param)
 {
+    if (! CONFIG_PS2PORT)
+        return -1;
+
     // Update ps2ctr for mouse enable/disable.
     if (command == PSMOUSE_CMD_ENABLE || command == PSMOUSE_CMD_DISABLE) {
         u16 ebda_seg = get_ebda_seg();



More information about the SeaBIOS mailing list