Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch-axel-5] vm_introspect: use new API #8

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions apps/Arm/vm_introspect/src/init_dataport_ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,20 @@ static vm_frame_t dataport_memory_iterator(uintptr_t addr, void *cookie)
return frame_result;
}

/* This overwrites the weak function in the VMM module init_ram */
void init_ram_module(vm_t *vm, void *cookie)
/* This overwrites the weak function in the VMM */
int vm_init_ram(vm_t *vm, const vm_config_t *vm_config)
{
int err;

void *reg_cookie = (void *)&vm_config;
err = vm_ram_register_at_custom_iterator(vm, vm_config.ram.base,
vm_config.ram.size,
err = vm_ram_register_at_custom_iterator(vm, vm_config->ram.base,
vm_config->ram.size,
dataport_memory_iterator,
reg_cookie);
assert(!err);
if (err) {
ZF_LOGE("Error: VM RAM registration failed (%d)", err);
return -1;
}

return 0;
}