dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0065-include-grub-i386-openbsd_bootarg.h-Add-addr-and-fre.patch

4fe85b
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
4fe85b
From: Vladimir Serbinenko <phcoder@gmail.com>
4fe85b
Date: Fri, 28 Feb 2014 10:50:05 +0100
4fe85b
Subject: [PATCH] * include/grub/i386/openbsd_bootarg.h: Add addr and frequency
4fe85b
 fields. * grub-core/loader/i386/bsd.c (grub_cmd_openbsd): Fill addr field.
4fe85b
MIME-Version: 1.0
4fe85b
Content-Type: text/plain; charset=UTF-8
4fe85b
Content-Transfer-Encoding: 8bit
4fe85b
4fe85b
	Suggested by: Markus Müller.
4fe85b
---
4fe85b
 grub-core/loader/i386/bsd.c         | 2 ++
4fe85b
 include/grub/i386/openbsd_bootarg.h | 2 ++
4fe85b
 ChangeLog                           | 7 +++++++
4fe85b
 3 files changed, 11 insertions(+)
4fe85b
4fe85b
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
4fe85b
index ea0edfafe57..19985f03e65 100644
4fe85b
--- a/grub-core/loader/i386/bsd.c
4fe85b
+++ b/grub-core/loader/i386/bsd.c
4fe85b
@@ -1646,6 +1646,7 @@ grub_cmd_openbsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
4fe85b
 
4fe85b
       serial.device = (GRUB_OPENBSD_COM_MAJOR << 8) | port;
4fe85b
       serial.speed = speed;
4fe85b
+      serial.addr = grub_ns8250_hw_get_port (port);
4fe85b
 	  
4fe85b
       grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial));
4fe85b
       bootflags |= OPENBSD_RB_SERCONS;
4fe85b
@@ -1656,6 +1657,7 @@ grub_cmd_openbsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
4fe85b
 
4fe85b
       grub_memset (&serial, 0, sizeof (serial));
4fe85b
       serial.device = (GRUB_OPENBSD_VGA_MAJOR << 8);
4fe85b
+      serial.addr = 0xffffffff;
4fe85b
       grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial));
4fe85b
       bootflags &= ~OPENBSD_RB_SERCONS;
4fe85b
     }
4fe85b
diff --git a/include/grub/i386/openbsd_bootarg.h b/include/grub/i386/openbsd_bootarg.h
4fe85b
index 01ca4868b25..9ebe6b4e4b1 100644
4fe85b
--- a/include/grub/i386/openbsd_bootarg.h
4fe85b
+++ b/include/grub/i386/openbsd_bootarg.h
4fe85b
@@ -75,6 +75,8 @@ struct grub_openbsd_bootarg_console
4fe85b
 {
4fe85b
   grub_uint32_t device;
4fe85b
   grub_uint32_t speed;
4fe85b
+  grub_uint32_t addr;
4fe85b
+  grub_uint32_t frequency;
4fe85b
 };
4fe85b
 
4fe85b
 struct grub_openbsd_bootarg_pcibios
4fe85b
diff --git a/ChangeLog b/ChangeLog
4fe85b
index 97cf57e253d..f571f66533b 100644
4fe85b
--- a/ChangeLog
4fe85b
+++ b/ChangeLog
4fe85b
@@ -1,3 +1,10 @@
4fe85b
+2014-02-28  Vladimir Serbinenko  <phcoder@gmail.com>
4fe85b
+
4fe85b
+	* include/grub/i386/openbsd_bootarg.h: Add addr and frequency fields.
4fe85b
+	* grub-core/loader/i386/bsd.c (grub_cmd_openbsd): Fill addr field.
4fe85b
+
4fe85b
+	Suggested by: Markus Müller.
4fe85b
+
4fe85b
 2014-02-28  Vladimir Serbinenko  <phcoder@gmail.com>
4fe85b
 
4fe85b
 	* grub-core/kern/i386/pc/mmap.c: Fallback to EISA memory map