[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix serial output for OpenBSD current
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: Fix serial output for OpenBSD current |
Date: |
Mon, 03 Feb 2014 18:03:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.2.0 |
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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
signature.asc
Description: OpenPGP digital signature