From nobody Mon Feb 9 07:26:50 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=eik.bme.hu ARC-Seal: i=1; a=rsa-sha256; t=1622997500; cv=none; d=zohomail.com; s=zohoarc; b=iw8RtU4VTKkub9qLmHw2MCgpprpIedt8RmLIWDXESqPR1rSmsI3vSwLUzadfKjBLfpVc5AmKACleKuEV280XR9SRB8GNfJOZJ9JqYuo3L/rBiGVSu/Qr52sgIn/O5iaG0/k1g2/NRa3UR7bj98BHsabcIajfy1eDjG1+G2NQIQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622997500; 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; bh=xaZZrXZE/2jPTSP9qLv40t+WyFMZ03Q2m9TaXOO9D9A=; b=a7J7LNBp7MZ19U8Sq7RrgaLD+bjJoqkKmySddZCuRhNfDg0GXN/tkTnyF7hFHvCurIeUTPrItfN85A7AjFGzu95/RupqqREKbOZNwpWnb2dVESfgxSHFu/AZ5Wm0mcbFkCx+fuB86db2fpc6PCQ8ugg827YvQNSz3x/Dy8GR99w= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622997500549359.00023854656195; Sun, 6 Jun 2021 09:38:20 -0700 (PDT) Received: from localhost ([::1]:35640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpvn1-0001KB-1w for importer@patchew.org; Sun, 06 Jun 2021 12:38:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpvlY-000724-Jm; Sun, 06 Jun 2021 12:36:48 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:58755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpvlV-0004Rh-Rt; Sun, 06 Jun 2021 12:36:47 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id C7494746FDC; Sun, 6 Jun 2021 18:36:40 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id A69CA74634B; Sun, 6 Jun 2021 18:36:40 +0200 (CEST) Message-Id: <16763926cad112e259e66c24864cdacbc83b6983.1622994395.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [RFC PATCH 1/5] Misc VOF fixes Date: Sun, 06 Jun 2021 17:46:35 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% 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=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Alexey Kardashevskiy , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: BALATON Zoltan --- hw/ppc/vof.c | 11 +++++++---- pc-bios/vof.bin | Bin 3784 -> 3784 bytes pc-bios/vof/entry.S | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c index a283b7d251..ac95be9666 100644 --- a/hw/ppc/vof.c +++ b/hw/ppc/vof.c @@ -144,12 +144,15 @@ static uint32_t vof_finddevice(const void *fdt, uint3= 2_t nodeaddr) char fullnode[VOF_MAX_PATH]; uint32_t ret =3D -1; int offset; + gchar *p; =20 if (readstr(nodeaddr, fullnode, sizeof(fullnode))) { return (uint32_t) ret; } =20 - offset =3D fdt_path_offset(fdt, fullnode); + p =3D g_ascii_strdown(fullnode, -1); + offset =3D fdt_path_offset(fdt, p); + g_free(p); if (offset >=3D 0) { ret =3D fdt_get_phandle(fdt, offset); } @@ -160,14 +163,14 @@ static uint32_t vof_finddevice(const void *fdt, uint3= 2_t nodeaddr) static const void *getprop(const void *fdt, int nodeoff, const char *propn= ame, int *proplen, bool *write0) { - const char *unit, *prop; + const char *unit, *prop =3D fdt_getprop(fdt, nodeoff, propname, prople= n); =20 /* * The "name" property is not actually stored as a property in the FDT, * we emulate it by returning a pointer to the node's name and adjust * proplen to include only the name but not the unit. */ - if (strcmp(propname, "name") =3D=3D 0) { + if (!prop && strcmp(propname, "name") =3D=3D 0) { prop =3D fdt_get_name(fdt, nodeoff, proplen); if (!prop) { *proplen =3D 0; @@ -193,7 +196,7 @@ static const void *getprop(const void *fdt, int nodeoff= , const char *propname, if (write0) { *write0 =3D false; } - return fdt_getprop(fdt, nodeoff, propname, proplen); + return prop; } =20 static uint32_t vof_getprop(const void *fdt, uint32_t nodeph, uint32_t pna= me, diff --git a/pc-bios/vof.bin b/pc-bios/vof.bin index 7e4c3742deae3c1904f4b2bf03ef72576b12d532..1ec670be82134adcb5ae128732a= ff6e371281360 100755 GIT binary patch delta 14 VcmX>hdqQ@D4kKgpW?jbFyZ|U11hoJF delta 14 VcmX>hdqQ@D4kP31&AN=3DUc>yYn1swnY diff --git a/pc-bios/vof/entry.S b/pc-bios/vof/entry.S index 569688714c..f8066775ec 100644 --- a/pc-bios/vof/entry.S +++ b/pc-bios/vof/entry.S @@ -30,7 +30,7 @@ ENTRY(_prom_entry) bl prom_entry nop mtlr %r31 - ld %r31,104(%r1) + lwz %r31,104(%r1) addi %r1,%r1,112 blr =20 --=20 2.21.4