From nobody Wed May 15 19:19:05 2024 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; 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=1558941588; cv=none; d=zoho.com; s=zohoarc; b=bdGnrvjB3Dz1N7PX9B+DP8WOHM+EDIlydAI8vDVmxORxV4jV777HDwREdIlwRYJ8xFnpTZxY7DwfmZguOpqMwVPkndQOO9I+prt9L4NO0uc9dMv933G/ZnlHwtLSf8wclYx2QJlKzpufA14Ge05ufwQ7bOh2P3wfrxsLPoP3Q4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558941588; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=plnCbmoZC2u1DnLNLQBj9m/F2XawxGmrlYZH4n93f0k=; b=i1RlpVbnIbnnzr29FbRUbDEbKB3W3BfHXWyrNHSjpyNF0BiT5idPNIKhcpSFGE8TZEMbBxYB9FIgcb0d8dycBaYf1h1RLEBR9c3mgcDhmhuM2AdxfZLGdx7s04NA8UOaNd3Y2Rj8NH+ITHBP76U2hMzxYPgIJ2hwBgZGT0TI7Qg= ARC-Authentication-Results: i=1; mx.zoho.com; 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 1558941588146235.02814333692368; Mon, 27 May 2019 00:19:48 -0700 (PDT) Received: from localhost ([127.0.0.1]:41188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hV9uu-00060V-Pf for importer@patchew.org; Mon, 27 May 2019 03:19:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hV9tS-0005Lv-QN for qemu-devel@nongnu.org; Mon, 27 May 2019 03:18:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hV9tR-0002hZ-Qr for qemu-devel@nongnu.org; Mon, 27 May 2019 03:18:02 -0400 Received: from 3.mo4.mail-out.ovh.net ([46.105.57.129]:38439) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hV9tR-0002gt-Lg for qemu-devel@nongnu.org; Mon, 27 May 2019 03:18:01 -0400 Received: from player730.ha.ovh.net (unknown [10.108.35.158]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id A92CD1EF4C5 for ; Mon, 27 May 2019 09:17:59 +0200 (CEST) Received: from kaod.org (lfbn-1-10649-41.w90-89.abo.wanadoo.fr [90.89.235.41]) (Authenticated sender: clg@kaod.org) by player730.ha.ovh.net (Postfix) with ESMTPSA id 05364610B40D; Mon, 27 May 2019 07:17:54 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Mon, 27 May 2019 09:17:49 +0200 Message-Id: <20190527071749.31499-1-clg@kaod.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Ovh-Tracer-Id: 10315213475625995238 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddruddvuddgudduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.57.129 Subject: [Qemu-devel] [PATCH] ppc/pnv: introduce new skiboot platform properties X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Newer skiboots (after 6.3) support QEMU platforms that have characteristics closer to real OpenPOWER systems. The CPU type is used to define the BMC drivers: Aspeed AST2400 for POWER8 processors and AST2500 for POWER9s. Advertise the new platform property names, "qemu,powernv8" and "qemu,powernv9", using the CPU type chosen for the QEMU PowerNV machine. Also, advertise the original platform name "qemu,powernv" in case of POWER8 processors for compatibility with older skiboots. Signed-off-by: C=C3=A9dric Le Goater --- hw/ppc/pnv.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index dfb4ea5742c1..1f22cbf833a8 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -450,7 +450,8 @@ static void pnv_dt_power_mgt(void *fdt) =20 static void *pnv_dt_create(MachineState *machine) { - const char plat_compat[] =3D "qemu,powernv\0ibm,powernv"; + const char plat_compat8[] =3D "qemu,powernv8\0qemu,powernv\0ibm,powern= v"; + const char plat_compat9[] =3D "qemu,powernv9\0ibm,powernv"; PnvMachineState *pnv =3D PNV_MACHINE(machine); void *fdt; char *buf; @@ -465,8 +466,14 @@ static void *pnv_dt_create(MachineState *machine) _FDT((fdt_setprop_cell(fdt, 0, "#size-cells", 0x2))); _FDT((fdt_setprop_string(fdt, 0, "model", "IBM PowerNV (emulated by qemu)"))); - _FDT((fdt_setprop(fdt, 0, "compatible", plat_compat, - sizeof(plat_compat)))); + if (pnv_is_power9(pnv)) { + _FDT((fdt_setprop(fdt, 0, "compatible", plat_compat9, + sizeof(plat_compat9)))); + } else { + _FDT((fdt_setprop(fdt, 0, "compatible", plat_compat8, + sizeof(plat_compat8)))); + } + =20 buf =3D qemu_uuid_unparse_strdup(&qemu_uuid); _FDT((fdt_setprop_string(fdt, 0, "vm,uuid", buf))); --=20 2.21.0