[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/8] loader/linux: support passing rsdp address via boot params
From: |
Juergen Gross |
Subject: |
[PATCH 2/8] loader/linux: support passing rsdp address via boot params |
Date: |
Wed, 29 Nov 2017 14:46:44 +0100 |
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 <address@hidden>
---
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
- [PATCH 0/8] xen: add pvh guest support, Juergen Gross, 2017/11/29
- [PATCH 8/8] xenpvh: add support to configure, Juergen Gross, 2017/11/29
- [PATCH 3/8] xen: carve out grant tab initialization into dedicated function, Juergen Gross, 2017/11/29
- [PATCH 7/8] xenpvh: support grub-install for xenpvh, Juergen Gross, 2017/11/29
- [PATCH 2/8] loader/linux: support passing rsdp address via boot params,
Juergen Gross <=
- [PATCH 4/8] xen: add xen pvh guest support to grub-core, Juergen Gross, 2017/11/29
- [PATCH 6/8] xenpvh: support building a standalone image, Juergen Gross, 2017/11/29
- [PATCH 5/8] xenpvh: add build runes for grub-core, Juergen Gross, 2017/11/29
- [PATCH 1/8] xen: add some xen headers, Juergen Gross, 2017/11/29