[OpenBIOS] [commit] r1293 - trunk/openbios-devel/drivers

repository service svn at openbios.org
Mon May 12 17:43:47 CEST 2014


Author: mcayland
Date: Mon May 12 17:43:46 2014
New Revision: 1293
URL: http://tracker.coreboot.org/trac/openbios/changeset/1293

Log:
pc_kbd.c: fix up reg property and missing address property

Create the missing address property for the PC serial keyboard, otherwise
pc_kbd_open() will dereference a NULL pointer when opening the serial keyboard
device.

Similarly fix up the reg property to match the PC serial port which appears to
give values matching those found in SPARC64 device trees.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/drivers/pc_kbd.c

Modified: trunk/openbios-devel/drivers/pc_kbd.c
==============================================================================
--- trunk/openbios-devel/drivers/pc_kbd.c	Mon May 12 17:43:44 2014	(r1292)
+++ trunk/openbios-devel/drivers/pc_kbd.c	Mon May 12 17:43:46 2014	(r1293)
@@ -15,6 +15,8 @@
  *          simple polling video/keyboard console functions
  * ****************************************************************** */
 
+#define SER_SIZE 8
+
 /*
  *  keyboard driver
  */
@@ -206,10 +208,21 @@
     push_str("keyboard");
     fword("property");
 
-    PUSH(0);
+    PUSH((base + offset) >> 32);
+    fword("encode-int");
+    PUSH((base + offset) & 0xffffffff);
+    fword("encode-int");
+    fword("encode+");
+    PUSH(SER_SIZE);
     fword("encode-int");
+    fword("encode+");
     push_str("reg");
     fword("property");
+    
+    PUSH(offset);
+    fword("encode-int");
+    push_str("address");
+    fword("property");
 
     chosen = find_dev("/chosen");
     push_str(nodebuff);



More information about the OpenBIOS mailing list