From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gPTV7-0006WA-UO for mharc-grub-devel@gnu.org; Wed, 21 Nov 2018 09:29:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPTV3-0006JN-Uw for grub-devel@gnu.org; Wed, 21 Nov 2018 09:29:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPTUy-0004I4-Vd for grub-devel@gnu.org; Wed, 21 Nov 2018 09:29:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:51048 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gPTUy-0004Hb-Ou for grub-devel@gnu.org; Wed, 21 Nov 2018 09:29:00 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 437C4AFA5; Wed, 21 Nov 2018 14:28:59 +0000 (UTC) From: Juergen Gross To: grub-devel@gnu.org Cc: xen-devel@lists.xen.org, phcoder@gmail.com, daniel.kiper@oracle.com, roger.pau@citrix.com, hans@knorrie.org, Juergen Gross Subject: [PATCH v5 02/20] loader/linux: support passing rsdp address via boot params Date: Wed, 21 Nov 2018 15:28:37 +0100 Message-Id: <20181121142855.13537-3-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20181121142855.13537-1-jgross@suse.com> References: <20181121142855.13537-1-jgross@suse.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 14:29:07 -0000 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 --- V2: add oring 0x8000 to version field V3: move including machine/kernel.h to patch 8 (Daniel Kiper) V5: move acpi_rsdp_addr to struct linux_kernel_params (Peter Anvin) --- grub-core/loader/i386/linux.c | 4 ++++ include/grub/i386/linux.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c index c408b10d8..375ee80dc 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -508,6 +508,10 @@ grub_linux_boot (void) } } +#ifdef GRUB_KERNEL_USE_RSDP_ADDR + linux_params.acpi_rsdp_addr = grub_le_to_cpu64 (grub_rsdp_addr); +#endif + mmap_size = find_mmap_size (); /* Make sure that each size is aligned to a page boundary. */ cl_offset = ALIGN_UP (mmap_size + sizeof (linux_params), 4096); diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h index 60c7c3b5e..a96059311 100644 --- a/include/grub/i386/linux.h +++ b/include/grub/i386/linux.h @@ -210,8 +210,9 @@ struct linux_kernel_params grub_uint32_t ist_command; /* 64 */ grub_uint32_t ist_event; /* 68 */ grub_uint32_t ist_perf_level; /* 6c */ + grub_uint64_t acpi_rsdp_addr; /* 70 */ - grub_uint8_t padding5[0x80 - 0x70]; + grub_uint8_t padding5[0x80 - 0x78]; grub_uint8_t hd0_drive_info[0x10]; /* 80 */ grub_uint8_t hd1_drive_info[0x10]; /* 90 */ -- 2.16.4