From nobody Tue Nov 26 19:59:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706048807; cv=none; d=zohomail.com; s=zohoarc; b=UWGSdGjhCZkCrV71r4k5DwliMg6wSPY1TSF2ZPor/6g5Ji0NgBAYOuzq6SDGSlGUgmMKiFMbPKh3oXmRdHi8TgSIoeMfprfBezwwaIP1UAo7aZnq4Nxw4hz9Sm+k0gp5T7rLKEP4vui6KCK+B5SSPEoWFKOFkjNE46t/3fntbRM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706048807; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=39OP9EE9lF2EcfOzamU8x35qcADjGnzDFDx/nFOBMLk=; b=Ql9+W6c2jjuxmZ3osHBdixNHA8OYhJoxtdDCLNAwDlBPgEOiP75HNko2R2TzdoV2GFGXsPL+t7U//07eQtq8z1NZE1y/E8xj4CdmNXaQKW7HYT8BKnsiQHbMf4mI495ZgXfGGJhSOKWWDxppVncWHc/BUWZHqRDlAuxl+MzrVK4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706048807168272.6803937219314; Tue, 23 Jan 2024 14:26:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSPDN-0006FE-3R; Tue, 23 Jan 2024 17:25:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSPDL-0006Cm-59 for qemu-devel@nongnu.org; Tue, 23 Jan 2024 17:25:51 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSPDJ-00010G-Fu for qemu-devel@nongnu.org; Tue, 23 Jan 2024 17:25:50 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2cddf596321so52184871fa.0 for ; Tue, 23 Jan 2024 14:25:48 -0800 (PST) Received: from m1x-phil.lan ([176.187.194.78]) by smtp.gmail.com with ESMTPSA id ef5-20020a05640228c500b00557d839727esm15820192edb.7.2024.01.23.14.25.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 Jan 2024 14:25:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706048747; x=1706653547; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=39OP9EE9lF2EcfOzamU8x35qcADjGnzDFDx/nFOBMLk=; b=XpXdfJ8WOaiDi43sRQvx8su0uIO3TVGYPOOgR1DC2a7OXxg1ap426IsUNRaGiFs03l xXdEBrXN9rGr0kJTlqdbmhQ2BzHoQQMpYEDpHgrT+IIgzhUzDQ0OzWlrcMhoDmiWuFPC lCx7GQV1/qDKgZdXx+ZZAhXre/IwmkED4kU9lEoAT5bVWXbMxnaWWQTQ4jpHk9pQwoLs Doy3URRljeMvcXpQimDiABfNqEKUuXRBklyxGAKVYuw65X+zdLRjgopkTszMR5FvoIsH cxu27L7T205npJjGajkHHqYcZNrbk/DE9UPwFuBJeaemiUwe47lLA7LRmXCBPMyiYxhQ sMkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706048747; x=1706653547; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=39OP9EE9lF2EcfOzamU8x35qcADjGnzDFDx/nFOBMLk=; b=BHl7aficVGB3Yp/uZaKVjJqKlTb75og6KxzjgpY3ssG7ZK33RQGcW2Jqs6atR6nIBh MGGRTpedBUOYbjeRQcreNOowlG6QcsNnqDRfR6JG+gQm5f1/4d/f3bhJTjf7kxnDQmmC KUx7rlSWMux6c+cUsn+lYm1meniH07LtO//4zVBIkrNeehOBDbKV4hFWjZs7nDWhnXyz r0N6yTNUohxux15+TnTjAeX7Zo6eLhO7euVjw4PpHCxHS4QFo6kKKBKdOyEG8C1tvJEd vUYhELVzWTsFA0jCQTur985AxNJtwUjYasnedGtZdnx+EmqlJz2brH3TXV0c6E5cOfrb a4cA== X-Gm-Message-State: AOJu0YziZodey8xCbVF/BzVlcBU9/33QddpfRkUIK3JlllzqbBUYwy+C ErVEhiTQlSY0uSErNDzx01iB+7ajWgwmWff3mNf9tKoclNG0rQbtjgvZvHHbBKSGVw9O5uqj4yk 9 X-Google-Smtp-Source: AGHT+IGGL9aDF1iXuPV3F+90sviFPEeOwjpvSnLOoTYFIN3lXSAKmz9Iups9xwTir/FoEtPzP73Fww== X-Received: by 2002:a2e:964b:0:b0:2cd:cfd7:2ee9 with SMTP id z11-20020a2e964b000000b002cdcfd72ee9mr250403ljh.38.1706048747067; Tue, 23 Jan 2024 14:25:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, Igor Mitsyanko , Rob Herring , Joel Stanley , "Edgar E. Iglesias" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Andrew Jeffery , Gavin Shan , Alistair Francis , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 6/6] hw/arm/zynq: Check for CPU types in machine_run_board_init() Date: Tue, 23 Jan 2024 23:25:08 +0100 Message-ID: <20240123222508.13826-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240123222508.13826-1-philmd@linaro.org> References: <20240123222508.13826-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706048808993100003 Restrict MachineClass::valid_cpu_types[] to the single valid CPU type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Gavin Shan Reviewed-by: Richard Henderson --- hw/arm/xilinx_zynq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 66d0de139f..6ec65d4780 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -355,6 +355,10 @@ static void zynq_init(MachineState *machine) =20 static void zynq_machine_class_init(ObjectClass *oc, void *data) { + static const char * const valid_cpu_types[] =3D { + ARM_CPU_TYPE_NAME("cortex-a9"), + NULL + }; MachineClass *mc =3D MACHINE_CLASS(oc); mc->desc =3D "Xilinx Zynq Platform Baseboard for Cortex-A9"; mc->init =3D zynq_init; @@ -362,6 +366,7 @@ static void zynq_machine_class_init(ObjectClass *oc, vo= id *data) mc->no_sdcard =3D 1; mc->ignore_memory_transaction_failures =3D true; mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a9"); + mc->valid_cpu_types =3D valid_cpu_types; mc->default_ram_id =3D "zynq.ext_ram"; } =20 --=20 2.41.0