Received: by 2002:a19:cb43:0:0:0:0:0 with SMTP id b64csp2098807lfg; Fri, 21 Feb 2020 10:30:44 -0800 (PST) X-Google-Smtp-Source: APXvYqyzqmyySbMcnNnUqeuRx0tq0QXcS5GwRDP+Co0BizqZUQlAb73b+rx1L5NyLHxSSQKcmkyw X-Received: by 2002:ac8:19b6:: with SMTP id u51mr33664994qtj.319.1582309844470; Fri, 21 Feb 2020 10:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582309844; cv=none; d=google.com; s=arc-20160816; b=fcTBKNuIh33usr45fvyZ7jPNN2RbJGHKEHlTcGC6CE2ZxwSH9YvT4syz9Sn1Aoy6FX +XoaeK5GxmxftFw5i8PzY5O2MwU+7guY046gsK8RzXkovaa5FghyiumjrU4wFHyMpw/W DQvKBmPwOAx9yoRPFYYQNGCs7zKkZTZsnt2prT6dUUd4XnOYU05Z3NLq4ILK25qjeRV1 +RuXGsOY4ZL/ALIye/C84usGrhUBIKgJn78EUDsQqfFiLLRh0ck/dY2oz3NlHZzOZ/RL XpP93RFSlHCcNG8OvTezf40qGWaKvz0wajbT/A87K6Vy0i1aqyOQJZTV+dk+KqdrNyZV q/Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:to:from:date:dkim-signature; bh=kmCMAvywZ70BUe2bx1A/nrOwN6GAdbYos9+k3nWZsO0=; b=0TYxdvmkzYYHnDapOzlxkfoDn56i9wWEgG0hfoZ7aui/AczvU3GyHoSuFV+C/2punz q+BhvHTnf3fLBJCrs5XkzysSEfHcfCPJXW5MwKBhem8vumCn7wgYH70Wa6ChnOChGe6X QFYJ/x+bxQ11oqZoDAqasYpWW9eCmbjnKabMpcuy0EZdWLD80wtjczyzOVHo4+oG8no4 ErhRXN+RJ2xsNhhVTg+voHaxIbgVB2dV9SmbB6yYjyBk2lDL9VTplLD0G5ZmwEIeYaPu 0t+Gryg7TJ9bEhdvHN6kWKC9qHcWC8kj7+o/Aq1nUMLDNRl89aD9HA570beLSAISNsyV WTKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=H2KgLkOg; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h78si1843972qke.299.2020.02.21.10.30.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Feb 2020 10:30:44 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=H2KgLkOg; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:34918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5D4V-0006hk-Ry for alex.bennee@linaro.org; Fri, 21 Feb 2020 13:30:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49605) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5D4M-0006fv-8y for qemu-arm@nongnu.org; Fri, 21 Feb 2020 13:30:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5D4L-0004Z4-1T for qemu-arm@nongnu.org; Fri, 21 Feb 2020 13:30:34 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:25536 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j5D4K-0004XU-SS for qemu-arm@nongnu.org; Fri, 21 Feb 2020 13:30:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582309832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kmCMAvywZ70BUe2bx1A/nrOwN6GAdbYos9+k3nWZsO0=; b=H2KgLkOgWMcq8o3BYEqxqPOIk6viCopatyuRdnJXQmlSp4eJ9prJfN50sjg2OETvDLwtqG +5qbcTam7/WeBs4m+UpAsS3YgJtuYZlWGNEok79VCDvL8gRufWW3Qw6ISqdkECuJ8TPpJX 1pL0z17gIF+C1+4sAv4aNYzGS+10abU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-408-sX8tmzVBOpKNa2aslO4D_g-1; Fri, 21 Feb 2020 13:30:28 -0500 X-MC-Unique: sX8tmzVBOpKNa2aslO4D_g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 585698010F1; Fri, 21 Feb 2020 18:30:27 +0000 (UTC) Received: from localhost (unknown [10.16.197.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id D28BE19C70; Fri, 21 Feb 2020 18:30:26 +0000 (UTC) Date: Fri, 21 Feb 2020 13:30:26 -0500 From: Eduardo Habkost To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH v2 12/13] hw/arm/raspi: Add the Raspberry Pi B+ machine Message-ID: <20200221183026.GD5238@habkost.net> References: <20200217114533.17779-1-f4bug@amsat.org> <20200217114533.17779-13-f4bug@amsat.org> <26d85b1f-b2b7-ff9f-1236-43e9cb761c30@greensocs.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Andrew Baumann , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Igor Mammedov , Luc Michel Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: 7Ur4UPrMK2jN On Tue, Feb 18, 2020 at 10:35:43AM +0100, Philippe Mathieu-Daud=E9 wrote: > Cc'ing Eduardo/Igor. >=20 > On 2/18/20 9:48 AM, Luc Michel wrote: > > On 2/17/20 12:45 PM, Philippe Mathieu-Daud=E9 wrote: > > > $ qemu-system-arm -M raspi1b -serial stdio \ > > > -kernel raspberrypi/firmware/boot/kernel.img \ > > > -dtb raspberrypi/firmware/boot/bcm2708-rpi-b.dtb \ > > > -append 'printk.time=3D0 earlycon=3Dpl011,0x20201000 console= =3DttyAMA0' > > > [ 0.000000] Booting Linux on physical CPU 0x0 > > > [ 0.000000] Linux version 4.19.69+ (dom@buildbot) (gcc version = 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1261 Tue Sep 3 20:21= :01 BST 2019 > > > [ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision= 7 (ARMv7), cr=3D00c5387d > > > [ 0.000000] CPU: VIPT aliasing data cache, unknown instruction = cache > > > [ 0.000000] OF: fdt: Machine model: Raspberry Pi Model B > > > [ 0.000000] earlycon: pl11 at MMIO 0x20201000 (options '') > > > [ 0.000000] bootconsole [pl11] enabled > > > [ 0.000000] Memory policy: Data cache writeback > > > [ 0.000000] cma: Reserved 8 MiB at 0x1b800000 > > > [ 0.000000] random: get_random_bytes called from start_kernel+0= x8c/0x49c with crng_init=3D0 > > > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pag= es: 113680 > > > [ 0.000000] Kernel command line: printk.time=3D0 earlycon=3Dpl0= 11,0x20201000 console=3DttyAMA0 > > > Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) > > > Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) > > > Memory: 434380K/458752K available (6971K kernel code, 635K rwdata,= 2080K rodata, 464K init, 797K bss, 16180K reserved, 8192K cma-reserved) > > > ... > > >=20 > > > Signed-off-by: Philippe Mathieu-Daud=E9 > > > --- > > > hw/arm/raspi.c | 13 +++++++++++++ > > > 1 file changed, 13 insertions(+) > > >=20 > > > diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c > > > index 3537a329ac..2d9f4e3085 100644 > > > --- a/hw/arm/raspi.c > > > +++ b/hw/arm/raspi.c > > > @@ -324,6 +324,15 @@ static void raspi_machine_class_common_init(Mach= ineClass *mc, > > > mc->default_ram_size =3D board_ram_size(board_rev); > > > }; > > > +static void raspi1b_machine_class_init(ObjectClass *oc, void *data) > > > +{ > > > + MachineClass *mc =3D MACHINE_CLASS(oc); > > > + RaspiMachineClass *rmc =3D RASPI_MACHINE_CLASS(oc); > > > + > > > + rmc->board_rev =3D 0x900032; > > > + raspi_machine_class_common_init(mc, rmc->board_rev); > > > +}; > > > + > > > static void raspi2b_machine_class_init(ObjectClass *oc, void *data) > > > { > > > MachineClass *mc =3D MACHINE_CLASS(oc); > > > @@ -348,6 +357,10 @@ static void raspi3b_machine_class_init(ObjectCla= ss *oc, void *data) > > > static const TypeInfo raspi_machine_types[] =3D { > > > { > > > + .name =3D MACHINE_TYPE_NAME("raspi1b"), > > If it's the B+ model, why not call it raspi1b+ ? >=20 > I thought about it (and prefer it), but I'm not sure this can have some > side-effect. >=20 > Eduardo, Igor, is that OK to use a '+' in a machine name? It would probably work, but I would prefer to avoid that. >=20 > So far the names used match [a-zA-Z0-9-]. >=20 > >=20 > > > + .parent =3D TYPE_RASPI_MACHINE, > > > + .class_init =3D raspi1b_machine_class_init, > > > + }, { > > > .name =3D MACHINE_TYPE_NAME("raspi2b"), > > > .parent =3D TYPE_RASPI_MACHINE, > > > .class_init =3D raspi2b_machine_class_init, > > >=20 > >=20 >=20 --=20 Eduardo