From nobody Wed Feb 11 03:48:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567617712; cv=none; d=zoho.com; s=zohoarc; b=HdD6yzOEhD42fW94SdMkcKnLjQCEFl7PKkwtg+QnepjBqDRAu2Snr1olfwW4HMTXDI/bNYfa+RMyfngMNHwdo/tMPiEemmhTb7RHGIt3IcSHF4qMD6x34jIkla34IrsVntOWeib3n1rO11aA//Qq0tG7pm+or7Ov6hpivwNUQ00= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567617712; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=6rorF+6pSO7+RuiUxEvvJ3ZwjSNHy/kVt8m9gQNTqTU=; b=BN2bOKyKqhCiu/0eYKEj/VIviBVbPe1Dd/MXSx75msKSxH4WIKiJqh+KXt8mC9BTe/sdYvB79JzsJHtfTEy8zL0SiVhEW1C6Cjv9Sbm2UZHqzZVMFU0LUvAmQ4kid8jBs0zn4Hb3P3pJ1tX+2m0uBqbdVUtLgMNfyH8gBG17kfQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567617712567511.13531827328404; Wed, 4 Sep 2019 10:21:52 -0700 (PDT) Received: from localhost ([::1]:35736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5YyY-0007hS-ND for importer@patchew.org; Wed, 04 Sep 2019 13:21:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48403) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5YqW-0001NQ-16 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 13:13:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5YqU-000717-60 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 13:13:27 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:37492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5YqT-00070i-V9; Wed, 04 Sep 2019 13:13:26 -0400 Received: by mail-wm1-x32e.google.com with SMTP id r195so4717584wme.2; Wed, 04 Sep 2019 10:13:25 -0700 (PDT) Received: from x1w.redhat.com ([195.166.127.210]) by smtp.gmail.com with ESMTPSA id p19sm2339512wmg.31.2019.09.04.10.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 10:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6rorF+6pSO7+RuiUxEvvJ3ZwjSNHy/kVt8m9gQNTqTU=; b=Qi9aqFqQZ7k44awhU7HIqhTWjc7w+4Ic5LcYatzsadA0Crt8pUjdLBq29i7atvJRJg cfOwTk2Kle1xmkGePh3jdc72UXmGhToHojGP2jHJk05DiQhOhF1686p8O8tcMhUhzu74 TUdONdXIj1E5VugwCSxxe+V+9Ubsg1zki8aeiht90THlBnKcKRZFggIXEm9ruM9ll+dW VogKfpo76oFw/qTJnCyY6Mm7CJhpGdJjgyLqfW01QiDR+gF5G9H5gxXxel5qMGLDuvld 1vOJUrN3ZCopwIi7w0a2CZh4uq/SR8RVMvgt4DSBBiNcdqNgJ53kqOI3VXhxwb3v9NmJ MbiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6rorF+6pSO7+RuiUxEvvJ3ZwjSNHy/kVt8m9gQNTqTU=; b=pwSdlgKAJuSuOIUlojxA2CjTOY/3Rp1PgALeaOiz5cc8jI3XXdIn8V9dgG7oQkj5mA cnfgLzdIoATx0jX3ps2SsVHbMdCPdoQTGNkC8uc+iAA4rqQDHHB+3+mbcKaQ2CdCxk0z uwBp2e7tmT7qng6nzW0TYHuzivf+56l0UgKnKvg+598aj9U2AnVeinzMpPU0biW6fZ7o ypgdW/sqErhofM6YDpA9yJB5DQxemDkMAvKxitBj0LwrQbe8IuSAQ7Cljk+KF/BCRPv+ jGtRdJXnH1xfvDGT8CrNiqn1juEYP3tcLWe6D/N6SHRbDjqmj8N+ydEgLn/a3Zb3A9zr W/hg== X-Gm-Message-State: APjAAAVnBWup+rCAMEOzmqmwlxEiVjVR2G9vBIVd2rk4/FRHLWj+CvBM zFKs+abkU6OJ5u2jIHheeMw= X-Google-Smtp-Source: APXvYqxSolMghHBuvwWf7ZiLU3NMG6tMvnJ4BkpULmGAvUnEJICp5OeDgRnmvbAhdh2qMR4DJhLgSg== X-Received: by 2002:a1c:a8d8:: with SMTP id r207mr5225450wme.135.1567617204984; Wed, 04 Sep 2019 10:13:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , Esteban Bosse , Andrew Baumann , qemu-devel@nongnu.org, Pekka Enberg , =?UTF-8?q?Zolt=C3=A1n=20Baldaszti?= Date: Wed, 4 Sep 2019 19:13:05 +0200 Message-Id: <20190904171315.8354-5-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190904171315.8354-1-f4bug@amsat.org> References: <20190904171315.8354-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e Subject: [Qemu-devel] [PATCH 04/14] hw/arm/bcm2835_peripherals: Improve logging X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, Clement Deschamps , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Luc Michel Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Various logging improvements as once: - Use 0x prefix for hex numbers - Display value written during write accesses - Move some logs from GUEST_ERROR to UNIMP Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: Use PRIx64 format (pm215) --- hw/char/bcm2835_aux.c | 5 +++-- hw/dma/bcm2835_dma.c | 8 ++++---- hw/intc/bcm2836_control.c | 7 ++++--- hw/misc/bcm2835_mbox.c | 7 ++++--- hw/misc/bcm2835_property.c | 16 ++++++++++------ 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/hw/char/bcm2835_aux.c b/hw/char/bcm2835_aux.c index 3f855196e3..a6fc1bf152 100644 --- a/hw/char/bcm2835_aux.c +++ b/hw/char/bcm2835_aux.c @@ -162,8 +162,9 @@ static void bcm2835_aux_write(void *opaque, hwaddr offs= et, uint64_t value, switch (offset) { case AUX_ENABLES: if (value !=3D 1) { - qemu_log_mask(LOG_UNIMP, "%s: unsupported attempt to enable SP= I " - "or disable UART\n", __func__); + qemu_log_mask(LOG_UNIMP, "%s: unsupported attempt to enable SP= I" + " or disable UART: 0x%"PRIx64"\n", + __func__, value); } break; =20 diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c index 192bd377a0..6acc2b644e 100644 --- a/hw/dma/bcm2835_dma.c +++ b/hw/dma/bcm2835_dma.c @@ -180,7 +180,7 @@ static uint64_t bcm2835_dma_read(BCM2835DMAState *s, hw= addr offset, res =3D ch->debug; break; default: - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n", + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%"HWADDR_PRIx"\n", __func__, offset); break; } @@ -228,7 +228,7 @@ static void bcm2835_dma_write(BCM2835DMAState *s, hwadd= r offset, ch->debug =3D value; break; default: - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n", + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%"HWADDR_PRIx"\n", __func__, offset); break; } @@ -247,7 +247,7 @@ static uint64_t bcm2835_dma0_read(void *opaque, hwaddr = offset, unsigned size) case BCM2708_DMA_ENABLE: return s->enable; default: - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\= n", + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%"HWADDR_PRIx= "\n", __func__, offset); return 0; } @@ -274,7 +274,7 @@ static void bcm2835_dma0_write(void *opaque, hwaddr off= set, uint64_t value, s->enable =3D (value & 0xffff); break; default: - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\= n", + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%"HWADDR_PRIx= "\n", __func__, offset); } } diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c index 04229b8a17..61f884ff9e 100644 --- a/hw/intc/bcm2836_control.c +++ b/hw/intc/bcm2836_control.c @@ -264,7 +264,7 @@ static uint64_t bcm2836_control_read(void *opaque, hwad= dr offset, unsigned size) } else if (offset >=3D REG_MBOX0_RDCLR && offset < REG_LIMIT) { return s->mailboxes[(offset - REG_MBOX0_RDCLR) >> 2]; } else { - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n", + qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx"\= n", __func__, offset); return 0; } @@ -293,8 +293,9 @@ static void bcm2836_control_write(void *opaque, hwaddr = offset, } else if (offset >=3D REG_MBOX0_RDCLR && offset < REG_LIMIT) { s->mailboxes[(offset - REG_MBOX0_RDCLR) >> 2] &=3D ~val; } else { - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n", - __func__, offset); + qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx + " value 0x%"PRIx64"\n", + __func__, offset, val); return; } =20 diff --git a/hw/misc/bcm2835_mbox.c b/hw/misc/bcm2835_mbox.c index 79bad11631..7690b9afaf 100644 --- a/hw/misc/bcm2835_mbox.c +++ b/hw/misc/bcm2835_mbox.c @@ -176,7 +176,7 @@ static uint64_t bcm2835_mbox_read(void *opaque, hwaddr = offset, unsigned size) break; =20 default: - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n", + qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx"\= n", __func__, offset); return 0; } @@ -228,8 +228,9 @@ static void bcm2835_mbox_write(void *opaque, hwaddr off= set, break; =20 default: - qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n", - __func__, offset); + qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx + " value 0x%"PRIx64"\n", + __func__, offset, value); return; } =20 diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c index d8eb28f267..ab66d3572e 100644 --- a/hw/misc/bcm2835_property.c +++ b/hw/misc/bcm2835_property.c @@ -56,7 +56,8 @@ static void bcm2835_property_mbox_push(BCM2835PropertySta= te *s, uint32_t value) break; case 0x00010001: /* Get board model */ qemu_log_mask(LOG_UNIMP, - "bcm2835_property: %x get board model NYI\n", ta= g); + "bcm2835_property: 0x%08x get board model NYI\n", + tag); /* FIXME returning uninitialized memory */ resplen =3D 4; break; @@ -70,7 +71,8 @@ static void bcm2835_property_mbox_push(BCM2835PropertySta= te *s, uint32_t value) break; case 0x00010004: /* Get board serial */ qemu_log_mask(LOG_UNIMP, - "bcm2835_property: %x get board serial NYI\n", t= ag); + "bcm2835_property: 0x%08x get board serial NYI\n= ", + tag); /* FIXME returning uninitialized memory */ resplen =3D 8; break; @@ -106,7 +108,8 @@ static void bcm2835_property_mbox_push(BCM2835PropertyS= tate *s, uint32_t value) =20 case 0x00038001: /* Set clock state */ qemu_log_mask(LOG_UNIMP, - "bcm2835_property: %x set clock state NYI\n", ta= g); + "bcm2835_property: 0x%08x set clock state NYI\n", + tag); resplen =3D 8; break; =20 @@ -139,7 +142,8 @@ static void bcm2835_property_mbox_push(BCM2835PropertyS= tate *s, uint32_t value) case 0x00038004: /* Set max clock rate */ case 0x00038007: /* Set min clock rate */ qemu_log_mask(LOG_UNIMP, - "bcm2835_property: %x set clock rates NYI\n", ta= g); + "bcm2835_property: 0x%08x set clock rate NYI\n", + tag); resplen =3D 8; break; =20 @@ -284,8 +288,8 @@ static void bcm2835_property_mbox_push(BCM2835PropertyS= tate *s, uint32_t value) break; =20 default: - qemu_log_mask(LOG_GUEST_ERROR, - "bcm2835_property: unhandled tag %08x\n", tag); + qemu_log_mask(LOG_UNIMP, + "bcm2835_property: unhandled tag 0x%08x\n", tag); break; } =20 --=20 2.20.1