diff options
author | Vincent Guittot <vincent.guittot@linaro.org> | 2023-09-27 10:14:04 +0200 |
---|---|---|
committer | Vincent Guittot <vincent.guittot@linaro.org> | 2023-09-27 10:14:04 +0200 |
commit | 47cd89887a16a4304268b7f0d5831e00f83361c8 (patch) | |
tree | 6573554927e38046d37c09718dfc7385bf880e7c | |
parent | 2f1997f7015e111d8d908dfaa900ac6bc8afa320 (diff) |
debug
-rw-r--r-- | src/arch/aarch64/hypervisor/other_world.c | 2 | ||||
-rw-r--r-- | src/arch/aarch64/hypervisor/vm.c | 7 | ||||
-rw-r--r-- | src/ffa_memory.c | 6 | ||||
-rw-r--r-- | src/load.c | 2 | ||||
-rw-r--r-- | src/mm.c | 1 |
5 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/aarch64/hypervisor/other_world.c b/src/arch/aarch64/hypervisor/other_world.c index 5f80ab35..0984a688 100644 --- a/src/arch/aarch64/hypervisor/other_world.c +++ b/src/arch/aarch64/hypervisor/other_world.c @@ -27,6 +27,7 @@ bool arch_other_world_vm_init(struct vm *other_world_vm, bool ret = false; uint32_t i; + dlog_info(" +++++++ arch_other_world_vm_init +++++\n"); other_world_vm_locked = vm_lock(other_world_vm); /* Enabling all communication methods for the other world. */ @@ -44,6 +45,7 @@ bool arch_other_world_vm_init(struct vm *other_world_vm, dlog_error("%s", err_msg); goto out; } + dlog_info(" +++++++ arch_other_world_vm_init beg %x end %x +++++\n", params->ns_mem_ranges[i].begin.pa, params->ns_mem_ranges[i].end.pa ); } /* * Force the hypervisor's version to be same as ours. diff --git a/src/arch/aarch64/hypervisor/vm.c b/src/arch/aarch64/hypervisor/vm.c index e9355bd7..d32b95f1 100644 --- a/src/arch/aarch64/hypervisor/vm.c +++ b/src/arch/aarch64/hypervisor/vm.c @@ -11,6 +11,7 @@ #include "hf/arch/mmu.h" #include "hf/plat/iommu.h" +#include "hf/dlog.h" #include "hypervisor/feature_id.h" @@ -171,6 +172,8 @@ bool arch_vm_mem_get_mode(struct vm_locked vm_locked, ipaddr_t begin, } ret = mm_vm_get_mode(&vm_locked.vm->ptable, begin, end, mode); + dlog_verbose("arch_vm_mem_get_mode begin %x mode %x\n", + begin.ipa, *mode); #if SECURE_WORLD == 1 uint32_t mode2; @@ -179,10 +182,14 @@ bool arch_vm_mem_get_mode(struct vm_locked vm_locked, ipaddr_t begin, /* If the region is fully unmapped in the secure IPA space. */ if ((ret == true) && ((*mode & mask) == mask)) { + dlog_verbose("arch_vm_mem_get_mode fully unmapped in S IPA\n"); + /* Look up the non-secure IPA space. */ ret = mm_vm_get_mode(&vm_locked.vm->arch.ptable_ns, begin, end, &mode2); + dlog_verbose("arch_vm_mem_get_mode begin %x mode2 %x\n", + begin.ipa, mode2); /* If region is fully mapped in the non-secure IPA space. */ if ((ret == true) && ((mode2 & mask) != mask)) { *mode = mode2; diff --git a/src/ffa_memory.c b/src/ffa_memory.c index c441c4c1..c28356a9 100644 --- a/src/ffa_memory.c +++ b/src/ffa_memory.c @@ -378,6 +378,8 @@ static struct ffa_value constituents_get_mode( size_t size = fragments[i][j].page_count * PAGE_SIZE; ipaddr_t end = ipa_add(begin, size); uint32_t current_mode; + dlog_verbose("constituents_get_mode begin %x\n", + begin.ipa); /* Fail if addresses are not page-aligned. */ if (!is_aligned(ipa_addr(begin), PAGE_SIZE) || @@ -392,6 +394,8 @@ static struct ffa_value constituents_get_mode( if (!vm_mem_get_mode(vm, begin, end, ¤t_mode)) { return ffa_error(FFA_DENIED); } + dlog_verbose("constituents_get_mode mode %x\n", + current_mode); /* * Ensure that all constituents are mapped with the same @@ -439,6 +443,8 @@ static struct ffa_value ffa_send_check_transition( const uint32_t state_mask = MM_MODE_INVALID | MM_MODE_UNOWNED | MM_MODE_SHARED; struct ffa_value ret; + dlog_verbose("ffa_send_check_transition vm_locked vm_id %x\n", + from.vm->id); ret = constituents_get_mode(from, orig_from_mode, fragments, fragment_constituent_counts, @@ -970,6 +970,8 @@ bool load_vms(struct mm_stage1_locked stage1_locked, paddr_t secondary_mem_end; if (vm_id == HF_PRIMARY_VM_ID) { + dlog_info("Loading VM id %#x: %s.\n", vm_id, + manifest_vm->debug_name); continue; } @@ -1072,6 +1072,7 @@ void *mm_identity_map(struct mm_stage1_locked stage1_locked, paddr_t begin, { int flags = MM_FLAG_STAGE1 | mm_mode_to_flags(mode); + dlog_verbose("mm_identity_map begin %p - end %p / mode 0x%x\n", begin.pa, end.pa, mode); if (mm_ptable_identity_update(stage1_locked.ptable, begin, end, arch_mm_mode_to_stage1_attrs(mode), flags, ppool)) { |