summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-10-27 19:16:04 +0200
committerRichard Braun <rbraun@sceen.net>2016-10-27 19:16:04 +0200
commit2e9e881a034dbb4d9bcffdd9a0e3e80b4e720cf1 (patch)
tree48ba52e03216745ad10abfed504bb6039c01729a
parent70c5463235f1e48a715755c5f119d660620767b1 (diff)
x86/boot: fix structure copy
The compiler is allowed to forge a call to memcpy for such statements, but paging hasn't been enabled yet at this point, making memcpy unusable. Replace with an explicit call to boot_memmove.
-rw-r--r--arch/x86/machine/boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/machine/boot.c b/arch/x86/machine/boot.c
index ebac9d5b..4b1b24f8 100644
--- a/arch/x86/machine/boot.c
+++ b/arch/x86/machine/boot.c
@@ -258,7 +258,7 @@ boot_setup_paging(struct multiboot_raw_info *mbi, unsigned long eax)
* Save the multiboot data passed by the boot loader, initialize the
* bootstrap allocator and set up paging.
*/
- boot_raw_mbi = *mbi;
+ boot_memmove(&boot_raw_mbi, mbi, sizeof(boot_raw_mbi));
if ((mbi->flags & MULTIBOOT_LOADER_MODULES) && (mbi->mods_count == 0))
boot_raw_mbi.flags &= ~MULTIBOOT_LOADER_MODULES;