xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: grub-devel@gnu.org
Cc: Juergen Gross <jgross@suse.com>,
	phcoder@gmail.com, daniel.kiper@oracle.com,
	xen-devel@lists.xen.org
Subject: [PATCH 2/8] loader/linux: support passing rsdp address via boot params
Date: Wed, 29 Nov 2017 14:46:44 +0100	[thread overview]
Message-ID: <20171129134650.20102-3-jgross@suse.com> (raw)
In-Reply-To: <20171129134650.20102-1-jgross@suse.com>

Xen PVH guests will have the RSDP at an arbitrary address. Support that
by passing the RSDP address via the boot parameters to Linux.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 grub-core/loader/i386/linux.c | 6 ++++++
 include/grub/i386/linux.h     | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
index 083f9417c..14722d059 100644
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -35,6 +35,7 @@
 #include <grub/i18n.h>
 #include <grub/lib/cmdline.h>
 #include <grub/linux.h>
+#include <grub/machine/kernel.h>
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
@@ -793,6 +794,11 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
       prot_init_space = page_align (prot_size) * 3;
     }
 
+#ifdef GRUB_KERNEL_USE_RSDP_ADDR
+  if (grub_le_to_cpu16 (lh.version) >= 0x020e)
+    lh.acpi_rsdp_addr = grub_le_to_cpu64 (grub_rsdp_addr);
+#endif
+
   if (allocate_pages (prot_size, &align,
 		      min_align, relocatable,
 		      preferred_address))
diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
index da0ca3b83..7194e8297 100644
--- a/include/grub/i386/linux.h
+++ b/include/grub/i386/linux.h
@@ -84,7 +84,7 @@ enum
     GRUB_VIDEO_LINUX_TYPE_SIMPLE = 0x70    /* Linear framebuffer without any additional functions.  */
   };
 
-/* For the Linux/i386 boot protocol version 2.10.  */
+/* For the Linux/i386 boot protocol version 2.14.  */
 struct linux_kernel_header
 {
   grub_uint8_t code1[0x0020];
@@ -139,6 +139,8 @@ struct linux_kernel_header
   grub_uint64_t setup_data;
   grub_uint64_t pref_address;
   grub_uint32_t init_size;
+  grub_uint32_t handover_offset;
+  grub_uint64_t acpi_rsdp_addr;
 } GRUB_PACKED;
 
 /* Boot parameters for Linux based on 2.6.12. This is used by the setup
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2017-11-29 13:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171129134650.20102-1-jgross@suse.com>
2017-11-29 13:46 ` [PATCH 1/8] xen: add some xen headers Juergen Gross
2018-02-15 11:12   ` Daniel Kiper
2017-11-29 13:46 ` Juergen Gross [this message]
2018-02-15 11:17   ` [PATCH 2/8] loader/linux: support passing rsdp address via boot params Daniel Kiper
2017-11-29 13:46 ` [PATCH 3/8] xen: carve out grant tab initialization into dedicated function Juergen Gross
2017-11-29 13:46 ` [PATCH 4/8] xen: add xen pvh guest support to grub-core Juergen Gross
2017-11-29 13:46 ` [PATCH 5/8] xenpvh: add build runes for grub-core Juergen Gross
2018-02-15 11:39   ` Daniel Kiper
2017-11-29 13:46 ` [PATCH 6/8] xenpvh: support building a standalone image Juergen Gross
2018-02-15 11:47   ` Daniel Kiper
2017-11-29 13:46 ` [PATCH 7/8] xenpvh: support grub-install for xenpvh Juergen Gross
2018-02-15 11:49   ` Daniel Kiper
2017-11-29 13:46 ` [PATCH 8/8] xenpvh: add support to configure Juergen Gross
2018-02-15 11:51   ` Daniel Kiper
2017-11-30 21:03 ` [PATCH 0/8] xen: add pvh guest support Daniel Kiper
2017-12-01  5:37   ` Juergen Gross
2017-12-01 11:12     ` Daniel Kiper
2017-12-14 11:19       ` Daniel Kiper
     [not found]       ` <20171214111952.GH4531@olila.local.net-space.pl>
2017-12-14 11:26         ` Juergen Gross
     [not found]         ` <3e5282dd-c819-5963-52a9-77bc18832ea5@suse.com>
2017-12-14 11:32           ` Daniel Kiper
     [not found]           ` <20171214113237.GJ4531@olila.local.net-space.pl>
2017-12-14 11:44             ` Juergen Gross
     [not found]             ` <f18b85e9-5bfd-8e6a-f939-46f20cf25d95@suse.com>
2018-01-29 12:15               ` Daniel Kiper
2018-01-29 13:33                 ` Juergen Gross
     [not found] ` <20171129134650.20102-4-jgross@suse.com>
2018-02-15 11:26   ` [PATCH 3/8] xen: carve out grant tab initialization into dedicated function Daniel Kiper
     [not found] ` <20171129134650.20102-5-jgross@suse.com>
2018-02-15 11:31   ` [PATCH 4/8] xen: add xen pvh guest support to grub-core Daniel Kiper
2018-02-15 12:02 ` [PATCH 0/8] xen: add pvh guest support Daniel Kiper
     [not found] ` <20180215120250.GB19041@olila.local.net-space.pl>
2018-10-09  9:35   ` Juergen Gross
     [not found]   ` <99628ba5-f300-0d0a-0484-c357b38058c7@suse.com>
2018-10-09 12:54     ` Daniel Kiper

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=20171129134650.20102-3-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).