* [PATCH v3] x86_64/efi: Use all 64 bit of efi_memmap in setup_e820()
@ 2015-07-28 14:38 Dmitry Skorodumov
[not found] ` <1438094312-12833-1-git-send-email-sdmitry-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Skorodumov @ 2015-07-28 14:38 UTC (permalink / raw)
To: linux-efi-u79uwXL29TY76Z2rM5mHXA
Cc: sdmitry-bzQdu9zFT3WakBO8gow8eQ, Denis V. Lunev
The efi_info structure stores low 32 bits of memory map
in efi_memmap and high 32 bits in efi_memmap_hi.
While constructing pointer in the setup_e820(), need
to take into account all 64 bit of the pointer.
It is because on 64bit machine the function
efi_get_memory_map() may return full 64bit pointer and before
the patch that pointer was truncated.
Signed-off-by: Dmitry Skorodumov <sdmitry-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
CC: Denis V. Lunev <den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
The issue is triggered on Parallles virtual machine and
fixed with this patch
---
arch/x86/boot/compressed/eboot.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 2c82bd1..92ab209 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -1192,6 +1192,9 @@ static efi_status_t setup_e820(struct boot_params *params,
efi_memory_desc_t *d;
unsigned int e820_type = 0;
unsigned long m = efi->efi_memmap;
+#ifdef CONFIG_X86_64
+ m |= (u64)efi->efi_memmap_hi << 32;
+#endif
d = (efi_memory_desc_t *)(m + (i * efi->efi_memdesc_size));
switch (d->type) {
--
1.7.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] x86_64/efi: Use all 64 bit of efi_memmap in setup_e820()
[not found] ` <1438094312-12833-1-git-send-email-sdmitry-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
@ 2015-07-30 10:13 ` Matt Fleming
0 siblings, 0 replies; 2+ messages in thread
From: Matt Fleming @ 2015-07-30 10:13 UTC (permalink / raw)
To: Dmitry Skorodumov; +Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA, Denis V. Lunev
On Tue, 28 Jul, at 06:38:32PM, Dmitry Skorodumov wrote:
> The efi_info structure stores low 32 bits of memory map
> in efi_memmap and high 32 bits in efi_memmap_hi.
>
> While constructing pointer in the setup_e820(), need
> to take into account all 64 bit of the pointer.
>
> It is because on 64bit machine the function
> efi_get_memory_map() may return full 64bit pointer and before
> the patch that pointer was truncated.
>
> Signed-off-by: Dmitry Skorodumov <sdmitry-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
> CC: Denis V. Lunev <den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
>
> The issue is triggered on Parallles virtual machine and
> fixed with this patch
> ---
> arch/x86/boot/compressed/eboot.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
Applied to the EFI urgent queue, thanks!
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-30 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 14:38 [PATCH v3] x86_64/efi: Use all 64 bit of efi_memmap in setup_e820() Dmitry Skorodumov
[not found] ` <1438094312-12833-1-git-send-email-sdmitry-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2015-07-30 10:13 ` Matt Fleming
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.