mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
qemu-log: add log category for MMU info
Running barebox on qemu-system-mips* with '-d unimp' overloads stderr by very very many mips_cpu_handle_mmu_fault() messages: mips_cpu_handle_mmu_fault address=b80003fd ret 0 physical 00000000180003fd prot 3 mips_cpu_handle_mmu_fault address=a0800884 ret 0 physical 0000000000800884 prot 3 mips_cpu_handle_mmu_fault pc a080cd80 ad b80003fd rw 0 mmu_idx 0 So it's very difficult to find LOG_UNIMP message. The mips_cpu_handle_mmu_fault() messages appear on enabling ANY logging! It's not very handy. Adding separate log category for *_cpu_handle_mmu_fault() logging fixes the problem. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Alexander Graf <agraf@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 1418489298-1184-1-git-send-email-antonynpavlov@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
d86fb03469
commit
339aaf5b7f
12 changed files with 61 additions and 58 deletions
|
@ -22,7 +22,6 @@
|
|||
#include "qemu/host-utils.h"
|
||||
|
||||
#define D(x)
|
||||
#define DMMU(x)
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
||||
|
@ -75,13 +74,14 @@ int mb_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw,
|
|||
vaddr = address & TARGET_PAGE_MASK;
|
||||
paddr = lu.paddr + vaddr - lu.vaddr;
|
||||
|
||||
DMMU(qemu_log("MMU map mmu=%d v=%x p=%x prot=%x\n",
|
||||
mmu_idx, vaddr, paddr, lu.prot));
|
||||
qemu_log_mask(CPU_LOG_MMU, "MMU map mmu=%d v=%x p=%x prot=%x\n",
|
||||
mmu_idx, vaddr, paddr, lu.prot);
|
||||
tlb_set_page(cs, vaddr, paddr, lu.prot, mmu_idx, TARGET_PAGE_SIZE);
|
||||
r = 0;
|
||||
} else {
|
||||
env->sregs[SR_EAR] = address;
|
||||
DMMU(qemu_log("mmu=%d miss v=%x\n", mmu_idx, address));
|
||||
qemu_log_mask(CPU_LOG_MMU, "mmu=%d miss v=%" VADDR_PRIx "\n",
|
||||
mmu_idx, address);
|
||||
|
||||
switch (lu.err) {
|
||||
case ERR_PROT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue