|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.5] efi: introduce efi_arch_flush_dcache_area
commit bfa874d7ce12e2903a050ed8173687f75cae789e
Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
AuthorDate: Wed Sep 23 09:06:00 2015 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Sep 23 09:06:00 2015 +0200
efi: introduce efi_arch_flush_dcache_area
Objects loaded by FileHandle->Read need to be flushed from dcache,
otherwise copy_from_paddr will read stale data when copying the kernel,
causing a failure to boot.
Introduce efi_arch_flush_dcache_area and call it from read_file.
This commit introduces no functional changes on x86.
Reported-by: Mark Rutland <mark.rutland@xxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
master commit: 0d6a3c755374f04f6dd25373da28291a8f35bede
master date: 2015-09-09 15:29:06 +0200
---
xen/arch/arm/efi/efi-boot.h | 7 +++++++
xen/arch/x86/efi/efi-boot.h | 2 ++
xen/common/efi/boot.c | 2 ++
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h
index cf9c3c6..7a84fa8 100644
--- a/xen/arch/arm/efi/efi-boot.h
+++ b/xen/arch/arm/efi/efi-boot.h
@@ -9,6 +9,7 @@
#include <asm/smp.h>
void noreturn efi_xen_start(void *fdt_ptr, uint32_t fdt_size);
+void __flush_dcache_area(const void *vaddr, unsigned long size);
#define DEVICE_TREE_GUID \
{0xb1b621d5, 0xf19c, 0x41a5, {0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0}}
@@ -570,6 +571,12 @@ static void __init
efi_arch_video_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*mode_info)
{
}
+
+static void efi_arch_flush_dcache_area(const void *vaddr, UINTN size)
+{
+ __flush_dcache_area(vaddr, size);
+}
+
/*
* Local variables:
* mode: C
diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h
index 2dd69f6..4c7f383 100644
--- a/xen/arch/x86/efi/efi-boot.h
+++ b/xen/arch/x86/efi/efi-boot.h
@@ -640,6 +640,8 @@ static bool_t __init
efi_arch_use_config_file(EFI_SYSTEM_TABLE *SystemTable)
return 1; /* x86 always uses a config file */
}
+static void efi_arch_flush_dcache_area(const void *vaddr, UINTN size) { }
+
/*
* Local variables:
* mode: C
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 532ed8c..2a3cd78 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -526,6 +526,8 @@ static bool_t __init read_file(EFI_FILE_HANDLE dir_handle,
CHAR16 *name,
PrintErrMesg(name, ret);
}
+ efi_arch_flush_dcache_area(file->ptr, file->size);
+
return 1;
}
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |