From nobody Tue Feb 10 09:25:02 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588168453; cv=none; d=zohomail.com; s=zohoarc; b=ZnR3X2dqUjzl7oglMc8EB/n5XCCoxzWdiy+dxS7SwSjjwF/3KHNpKqLB5iGW5Gm4oNK4cXvJBI00rtCjiuIXzPBLj5XajDXewwUWy1358oQZ8Om7B8zzgdyeso0vpUvhlopPf0VCI9lPItcrcLa3+oadg8guoPGPWi5ljCQ4KEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588168453; 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:Subject:To; bh=MykWMFmCZGrcTOH+6XEM1dmuzDiw4PMo43qtXAs9qtw=; b=L2whQURhnPC7++n01o2pr5zOkckvkl3opZ4HO1rZSLCqZ9SJw4vEZb1CJm093RwF/V8Lx2B0enA3m4l/IgPrywJuDi7JwTy6j78R4X1FOu1svuGkLusI8a+nfLgij/fpSUDtO6QqlZIZpCXUmxJ+TgWF4jM/T88f6L2IwFRS4Ig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 15881684534631006.5037676470826; Wed, 29 Apr 2020 06:54:13 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 579FB10C1955; Wed, 29 Apr 2020 13:54:09 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 6027E10C1957 for ; Wed, 29 Apr 2020 13:53:11 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-224-Qsf4B0SoOIWAdWaMXyKanQ-1; Wed, 29 Apr 2020 09:46:59 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2BD7F107ACF5 for ; Wed, 29 Apr 2020 13:46:58 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4E26648C8; Wed, 29 Apr 2020 13:46:55 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 2254E9D9E; Wed, 29 Apr 2020 15:46:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588168390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JKI0AUE4AHASTrOVJStgoJlZDoAkFbdaDWc/a1YzEnE=; b=bI7dUxpCbb+j8C0/8KueBy0Un9Con5TrLtfDutJ4JFC8wiV13AI5GUfAJirs41VyPR7Mxc wFitsxVpFJGrWmIMcu7WGQykDAfXiQkSCUUO3Rej5snjlEAlke1Z+7IF/nCe+RQpiiMMwY DIxs+s6EGJAXRF2Cv+JpxpTXxXnBYSc= X-MC-Unique: Qsf4B0SoOIWAdWaMXyKanQ-1 From: Gerd Hoffmann To: seabios@seabios.org Date: Wed, 29 Apr 2020 15:46:39 +0200 Message-Id: <20200429134643.2001-6-kraxel@redhat.com> In-Reply-To: <20200429134643.2001-1-kraxel@redhat.com> References: <20200429134643.2001-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: O5JN5MLCDGRPB4TQ6SQIW5DO6BCMGQFP X-Message-ID-Hash: O5JN5MLCDGRPB4TQ6SQIW5DO6BCMGQFP X-MailFrom: kraxel@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Gerd Hoffmann X-Mailman-Version: 3.3.1 Precedence: list Subject: [SeaBIOS] [PATCH v3 5/9] virtio-mmio: print device type List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: +++++++++ X-Spam-Level: ********* Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spam: Yes X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" --- src/hw/virtio-mmio.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/hw/virtio-mmio.c b/src/hw/virtio-mmio.c index adb28f730592..dabef7b7e53a 100644 --- a/src/hw/virtio-mmio.c +++ b/src/hw/virtio-mmio.c @@ -11,6 +11,19 @@ =20 void virtio_mmio_setup_one(u64 addr) { + static const char *names[] =3D { + [ 1 ] =3D "net", + [ 2 ] =3D "blk", + [ 3 ] =3D "console", + [ 4 ] =3D "rng", + [ 8 ] =3D "scsi", + [ 9 ] =3D "9p", + [ 16 ] =3D "gpu", + [ 19 ] =3D "vsock", + [ 18 ] =3D "input", + [ 26 ] =3D "fs", + }; + const char *name; u32 magic, version, devid; void *mmio; =20 @@ -32,8 +45,12 @@ void virtio_mmio_setup_one(u64 addr) return; } devid =3D readl(mmio+8); - dprintf(1, "virtio-mmio: %llx: device id %x%s\n", - addr, devid, version =3D=3D 1 ? " (legacy)" : ""); + + name =3D (devid < ARRAY_SIZE(names) && names[devid] !=3D NULL) + ? names[devid] : "unknown"; + dprintf(1, "virtio-mmio: %llx: device id %x (%s%s)\n", + addr, devid, name, version =3D=3D 1 ? ", legacy" : ""); + switch (devid) { case 2: /* blk */ run_thread(init_virtio_blk_mmio, mmio); --=20 2.18.2 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org