diff options
author | Chintan Pandya <chintanpandya@google.com> | 2022-09-14 11:33:01 +0000 |
---|---|---|
committer | Travis Geiselbrecht <geist@foobox.com> | 2022-10-23 21:40:18 -0700 |
commit | 550256d6bca5c23d76f4bfea1c798704bee656ab (patch) | |
tree | 811eac6543d6fb2241ef0079f52abf8203466668 | |
parent | ee880bad58ae0f28c156e630b640c1daa9d45f5e (diff) | |
download | lk-550256d6bca5c23d76f4bfea1c798704bee656ab.tar.gz |
kernel: vm: Fix incorrect argument passing in 'vm map' test
vm map takes arg 3 as virtual address. And same needs
to be passed to retrieve aspace. Fix this by passing
right arg.
Test: Ran 'vm map' test
] vm map 0xc0000000 0xffff000ff0000000 1 0x0
arch_mmu_map returns 0
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
-rw-r--r-- | kernel/vm/vm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/vm/vm.c b/kernel/vm/vm.c index c0fc2a6c..5e675e9d 100644 --- a/kernel/vm/vm.c +++ b/kernel/vm/vm.c @@ -166,9 +166,9 @@ usage: } else if (!strcmp(argv[1].str, "map")) { if (argc < 6) goto notenoughargs; - vmm_aspace_t *aspace = vaddr_to_aspace((void *)argv[2].u); + vmm_aspace_t *aspace = vaddr_to_aspace((void *)argv[3].u); if (!aspace) { - printf("ERROR: outside of any address space\n"); + printf("ERROR: %p outside of any address space\n", (void *)argv[3].u); return -1; } |