All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Fix serial output for OpenBSD current
Date: Mon, 03 Feb 2014 18:03:41 +0100	[thread overview]
Message-ID: <52EFCBED.9020007@gmail.com> (raw)
In-Reply-To: <1391338082.19518.4.camel@keks>

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

On 02.02.2014 11:48, Markus Müller wrote:
> 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.
> 
Could you try this patch instead?
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
index ea0edfa..19985f0 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.addr = grub_ns8250_hw_get_port (port);
          
       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.addr = 0xffffffff;
       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..9ebe6b4 100644
--- a/include/grub/i386/openbsd_bootarg.h
+++ b/include/grub/i386/openbsd_bootarg.h
@@ -75,6 +75,8 @@ struct grub_openbsd_bootarg_console
 {
   grub_uint32_t device;
   grub_uint32_t speed;
+  grub_uint32_t addr;
+  grub_uint32_t frequency;
 };
 
 struct grub_openbsd_bootarg_pcibios

> Regards,
> Markus
> 
> 
> [1] http://marc.info/?l=openbsd-cvs&m=138340457301045
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]

  reply	other threads:[~2014-02-03 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02 10:48 Fix serial output for OpenBSD current Markus Müller
2014-02-03 17:03 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2014-02-04 22:46   ` Markus Müller
2014-02-04 22:50     ` SevenBits

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52EFCBED.9020007@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.