All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix serial output for OpenBSD current
@ 2014-02-02 10:48 Markus Müller
  2014-02-03 17:03 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Müller @ 2014-02-02 10:48 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

Hi all,

attached is a patch that fixes serial console output with OpenBSD
current (will be 5.5). Grub uses an old struct for providing the kernel
with information about the serial console that is now gone [1]. Since
the new way is in OpenBSD since 5.2, even older versions are still
supported with this patch.

Regards,
Markus


[1] http://marc.info/?l=openbsd-cvs&m=138340457301045

[-- Attachment #2: grub.diff --]
[-- Type: text/x-patch, Size: 1357 bytes --]

diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
index ea0edfa..c1d2856 100644
--- a/grub-core/loader/i386/bsd.c
+++ b/grub-core/loader/i386/bsd.c
@@ -1646,6 +1646,7 @@ grub_cmd_openbsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
 
       serial.device = (GRUB_OPENBSD_COM_MAJOR << 8) | port;
       serial.speed = speed;
+      serial.address = -1;
 	  
       grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial));
       bootflags |= OPENBSD_RB_SERCONS;
@@ -1656,6 +1657,7 @@ grub_cmd_openbsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
 
       grub_memset (&serial, 0, sizeof (serial));
       serial.device = (GRUB_OPENBSD_VGA_MAJOR << 8);
+      serial.address = -1;
       grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial));
       bootflags &= ~OPENBSD_RB_SERCONS;
     }
diff --git a/include/grub/i386/openbsd_bootarg.h b/include/grub/i386/openbsd_bootarg.h
index 01ca486..0166e3f 100644
--- a/include/grub/i386/openbsd_bootarg.h
+++ b/include/grub/i386/openbsd_bootarg.h
@@ -73,9 +73,11 @@ struct grub_openbsd_bootargs
 
 struct grub_openbsd_bootarg_console
 {
-  grub_uint32_t device;
-  grub_uint32_t speed;
-};
+  grub_int32_t device;
+  grub_int32_t speed;
+  grub_int32_t address;
+  grub_int32_t frequency;
+} GRUB_PACKED;
 
 struct grub_openbsd_bootarg_pcibios
 {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-04 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-02 10:48 Fix serial output for OpenBSD current Markus Müller
2014-02-03 17:03 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-02-04 22:46   ` Markus Müller
2014-02-04 22:50     ` SevenBits

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.