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

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