From patchwork Fri Aug 4 15:29:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 1817000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=HOZHtybn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RHV6V5mVGz1yYD for ; Sat, 5 Aug 2023 01:30:58 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRwl9-0006Ot-BU; Fri, 04 Aug 2023 11:30:35 -0400 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 1qRwl2-0006Ja-9K; Fri, 04 Aug 2023 11:30:28 -0400 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qRwl0-0004Qb-Tz; Fri, 04 Aug 2023 11:30:28 -0400 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1bb75afeee3so1671266fac.0; Fri, 04 Aug 2023 08:30:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691163025; x=1691767825; 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=BAqK6QWaeNrKvf7OH3VDv+9xR6Z10k+UDV3PubsDTA0=; b=HOZHtybnY3cDgbU/UlSdpDPFOiyz8uApBIYp9YdLM3jTO1s1h56AiMN2G/3NtxW1B7 H5VgrCInf68NmOPMqhI7IjZE/7yOBwCwvgzUytcca4Vy8xr1hFSiigvXNtTYd1LdxDcv z+oDSewbhNkTykxZmx8lqox1RX2Y24NOcUGoyxrhp4sKpfp6MU7EpPfCsdOutEhGsBDE MhTCmzQ3QXasf2S3PJvCicD+5FfxmhqbxIsHQxOEfMtjVT4v3hYpf3ken+tpJmwCBNI8 H6kGX5C552d2TH8E1brPjvsLRWDbpqzR7vY+fRAJ6aHizab6mJV9ktQUi1YYpW9LYBL+ F2Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691163025; x=1691767825; 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=BAqK6QWaeNrKvf7OH3VDv+9xR6Z10k+UDV3PubsDTA0=; b=LIIWfzm8kLdBO20OAsge5iG49uADe+AN6pNFu4c9VjtrWeALsuTorp4sQi1aLczUn2 q+qiO+9n7rXHNj/CTxheNQS/trnojq/2SJEWGcK9iVHtJJRxh6iEzN0bjaodD6C79PN9 0KtTzG3zLHGaDjFz74xJs2sTdB9ZfkbmtvXofvGgpQbO1xTUzWYmM1qvqrzy3cfPnewF CpkU+p7wbp33haPx/rD/0bIMCjkMUX1xy4hwUg9S8GNhuDRrUCRgGIhUjsPI2ExGX5Pq DkflKNyhO89QqSOFzAUXvh1qbWXHHGiZsP6dohOQb5Datqm5E8NQQiCp6/oZW/T8dbdy tDBg== X-Gm-Message-State: AOJu0YxDvJHs37Zl2GubyCynDFxhPe5+yJCC0cspMznLSasPugDVhGva 87oeupfjv7jHkeQTvIyEchZRVe85MII= X-Google-Smtp-Source: AGHT+IHGXTuwByLLrqbdjvQQu9J+PExLuBUoVycbmjrDJhdG/oiEosehz2SLmLFm16sFTafC35wG0w== X-Received: by 2002:a05:6870:e0d4:b0:1b4:7411:df6e with SMTP id a20-20020a056870e0d400b001b47411df6emr2352574oab.15.1691163024913; Fri, 04 Aug 2023 08:30:24 -0700 (PDT) Received: from grind.. ([177.197.108.190]) by smtp.gmail.com with ESMTPSA id q4-20020a4a4b04000000b00560b1febfdfsm1115761ooa.10.2023.08.04.08.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 08:30:24 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com, peter.maydell@linaro.org, richard.henderson@linaro.org, BALATON Zoltan Subject: [PULL 4/7] ppc/pegasos2: Fix reg property of 64 bit BARs in device tree Date: Fri, 4 Aug 2023 12:29:52 -0300 Message-ID: <20230804152955.22316-5-danielhb413@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230804152955.22316-1-danielhb413@gmail.com> References: <20230804152955.22316-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::36; envelope-from=danielhb413@gmail.com; helo=mail-oa1-x36.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: BALATON Zoltan The board firmware handles this correctly following the Open Firmware standard which we missed. This fixes 64 bit BARs when using VOF. Signed-off-by: BALATON Zoltan Reviewed-by: Daniel Henrique Barboza Message-ID: <20230721221320.1311E7456AB@zero.eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pegasos2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 6475acfbed..075367d94d 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -781,7 +781,11 @@ static void add_pci_device(PCIBus *bus, PCIDevice *d, void *opaque) if (d->io_regions[i].type & PCI_BASE_ADDRESS_SPACE_IO) { cells[j] |= cpu_to_be32(1 << 24); } else { - cells[j] |= cpu_to_be32(2 << 24); + if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_TYPE_64) { + cells[j] |= cpu_to_be32(3 << 24); + } else { + cells[j] |= cpu_to_be32(2 << 24); + } if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_PREFETCH) { cells[j] |= cpu_to_be32(4 << 28); }