From nobody Tue Nov 18 10:38:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) client-ip=209.85.128.46; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f46.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1609454985; cv=none; d=zohomail.com; s=zohoarc; b=d0sxYznf+tnr4YAnFrOcZjMAsiV0Erc3cPB4SBjq9r5Z/PkDn8KtCz0vKONwBHyEMJMI43cU9iowQ56PI+5CEc6Q1ZhAcoW3rFOCHpohZlC3AZk28WvgM8CT16wFvNQE7WUAHc0cfwBShOhoA8oY/rXF1MeOpCBIA4ua9bb4kEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609454985; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R2ny6HpRTTZsoN85CWHTkLlGTVWjBfb4+zResZwGkow=; b=VukpLf0Ldiw75wgVDYUMF3Vr9e0KqqXHxGiNQxn/UwyHkthKRXt3hr3wbzkWgBzC0+hO8YwwLfctUtLAaOdvfrFgoOs9bQMEbCG13+3cAig0Qzi40LdD4O2GeTIpZZI5+PbLB1VlN01CdJ4FepUWk74Ye1LaGsAS6NdHP7ixu/o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.zohomail.com with SMTPS id 16094549855871019.4664565894853; Thu, 31 Dec 2020 14:49:45 -0800 (PST) Received: by mail-wm1-f46.google.com with SMTP id g25so4391885wmh.1 for ; Thu, 31 Dec 2020 14:49:45 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (239.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.239]) by smtp.gmail.com with ESMTPSA id m11sm13850842wmi.16.2020.12.31.14.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Dec 2020 14:49:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R2ny6HpRTTZsoN85CWHTkLlGTVWjBfb4+zResZwGkow=; b=NnjWKvwdz9HVKZBGLasiQOK/IfGhrqwfdjK/Tes09YRSX7klKa9SZ9F1C+KxN45SZD eklitOLa0xnRHqflhXoNjMkB2Zq1/fmhQ1azodt3t0q/Km48DZbZxINX+EeOx9v7yOIF nt0nyeb0hwkjMtDp+ThUtx1eOfLs7XNkAU1ePQoT5BvfR7CaEWCjcVl2Jmeb8NlMUNDp JPQp2rARm9WuxQ1loQSOf8Ko7Wd+j1UWF7u7dKg3auPALyRpmy5HkAuKlmnih/gRTlGw Tcq5O4bvc+RTysowX494aEJVv6JXmefLhxcJP5gPpS3XOiOGIgdmzl4t26mRDneh/mEn XfkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=R2ny6HpRTTZsoN85CWHTkLlGTVWjBfb4+zResZwGkow=; b=TUwOq+udbqvKCJta+8AR1CsMRh5W1+6Zg2u2WvImoGHogooIhM5OzEZylQGcTluLOu iFdlH6nW5ZdCNw7l142oRvFHpnjfWw9DXSjZIp/HOQ8SjWiF1RMh/xw/1gm/k/pcJeXL lfQ/B/zpUnNWxQSxx3WsLYCds0lcXeHPK+JOs7LjfLnhjnFmFUAz88Bw49Alrb+VsvQi dP5mVRdYcz8+VbbvPQpTEjWaafUH/NZYRA/k9PcFUzCSBiknynJkEakUuJPOKG98lTp6 AA8ZhJ/SAq2XrF4BSx9OtbLa451Ci6xW2Amj4/ZIep1W2KvfU6BjZwnerNVF8JXyjsvO bCuQ== X-Gm-Message-State: AOAM533kZ6w7nLPnuGuEs5z0vuIxZSDRjwOpkwizL7CKNylQJb9AATfC SWrEt8IsavHUAFJti+3p0Jo= X-Google-Smtp-Source: ABdhPJxv0B4TkMYvH4x+gzvwkOK2ksL5+Nb+1/B9VD6yiRyUkJ0ICD5DHlC7I7BaKdmFI+qGE7etAA== X-Received: by 2002:a1c:2b46:: with SMTP id r67mr13370772wmr.162.1609454983822; Thu, 31 Dec 2020 14:49:43 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo , Aurelien Jarno , Huacai Chen Subject: [RFC PATCH 06/18] hw/pci-host/bonito: Do not allow big-endian targets Date: Thu, 31 Dec 2020 23:48:59 +0100 Message-Id: <20201231224911.1467352-7-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201231224911.1467352-1-f4bug@amsat.org> References: <20201231224911.1467352-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) This model is not complete for big-endian targets, do not allow its use. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Yes I must improve that, I know =3D) However enough for now to post the following patches. --- hw/pci-host/bonito.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 104c58331d0..93820f69e49 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -53,6 +53,7 @@ #include "hw/misc/unimp.h" #include "hw/registerfields.h" #include "qom/object.h" +#include "hw/core/cpu.h" =20 /* #define DEBUG_BONITO */ =20 @@ -354,7 +355,7 @@ static uint64_t bonito_pciconf_readl(void *opaque, hwad= dr addr, static const MemoryRegionOps bonito_pciconf_ops =3D { .read =3D bonito_pciconf_readl, .write =3D bonito_pciconf_writel, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, @@ -648,6 +649,8 @@ static void bonito_realize(PCIDevice *dev, Error **errp) BonitoState *bs =3D BONITO_PCI_HOST_BRIDGE(s->pcihost); MemoryRegion *pcimem_alias =3D g_new(MemoryRegion, 1); =20 + assert(!target_words_bigendian()); /* FIXME not supported */ + /* * Bonito North Bridge, built on FPGA, * VENDOR_ID/DEVICE_ID are "undefined" --=20 2.26.2