[OpenBIOS] [PATCH 1/7] pc_serial.c: fix up missing address property

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun May 4 19:49:49 CEST 2014


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

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 openbios-devel/drivers/pc_serial.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/openbios-devel/drivers/pc_serial.c b/openbios-devel/drivers/pc_serial.c
index 6192f18..f63fcaa 100644
--- a/openbios-devel/drivers/pc_serial.c
+++ b/openbios-devel/drivers/pc_serial.c
@@ -190,6 +190,12 @@ ob_pc_serial_init(const char *path, const char *dev_name, uint64_t base,
     fword("encode+");
     push_str("reg");
     fword("property");
+    
+    PUSH(offset);
+    fword("encode-int");
+    push_str("address");
+    fword("property");
+    
 #if defined(CONFIG_SPARC64)
     set_int_property(get_cur_dev(), "interrupts", 1);
 #endif
-- 
1.7.10.4




More information about the OpenBIOS mailing list