summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-09-06 02:26:55 +0200
committerRichard Braun <rbraun@sceen.net>2016-09-06 02:26:55 +0200
commitefcecd06abb8f7342723a8916917842840e9264f (patch)
treebf23ffe215a361e81d0add1519eb7e478e983063
parentae902513130a14ffded5d00216e8729d3f5ed7fa (diff)
Fix registration of strings from in boot data
* i386/i386at/model_dep.c (register_boot_data): Use phystokv on strings when computing their length.
-rw-r--r--i386/i386at/model_dep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 87d6cefa..ab850442 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -291,7 +291,8 @@ register_boot_data(const struct multiboot_raw_info *mbi)
if ((mbi->flags & MULTIBOOT_LOADER_CMDLINE) && (mbi->cmdline != 0)) {
biosmem_register_boot_data(mbi->cmdline,
- mbi->cmdline + strlen((void *)mbi->cmdline) + 1, FALSE);
+ mbi->cmdline
+ + strlen((void *)phystokv(mbi->cmdline)) + 1, FALSE);
}
if (mbi->flags & MULTIBOOT_LOADER_MODULES) {
@@ -306,7 +307,8 @@ register_boot_data(const struct multiboot_raw_info *mbi)
if (mod->string != 0) {
biosmem_register_boot_data(mod->string,
- mod->string + strlen((void *)mod->string) + 1,
+ mod->string
+ + strlen((void *)phystokv(mod->string)) + 1,
FALSE);
}
}