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>
This commit is contained in:
Chintan Pandya
2022-09-14 11:33:01 +00:00
committed by Travis Geiselbrecht
parent ee880bad58
commit 550256d6bc

View File

@@ -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;
}