From nobody Tue Feb 10 20:07:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) client-ip=209.85.128.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1626037237; cv=none; d=zohomail.com; s=zohoarc; b=XBbPodkXl9ZU0UdwEHmo0WCqCAZlG09iHfAPA9mqIaPUnte1rPLf+X9mdogrKnOHXloafg4DV7sZ78liYQqJwpHFwzI+uIdpGbuzHHmH+Mef6d0coWJ2bi12k9aGrpQlOfWGcAclIE4tPGWAP5NeHMBGAXf/uzLa4jeyOMhCbE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626037237; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fEfjSQddq0TrVwbGQ3ccMh+OvT1Jy1LGnQdM/7SCR9Y=; b=b9Qit3zy0JumKTESXWsKjg9hzuc9RKblyu4MAZUHObhBV5sWL7c7OZ6nDAafmWvwUaT6jmbFCJO+N3gmfCcmIkGD3e2VeMcv3WTageedZAaYfhZQ+Xn9j2p1Mjkqz5w5D5l+5mt6w+5PPTYceK6OHPNSNSPiEFxUDIxBNFbwMxg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.zohomail.com with SMTPS id 1626037237027711.3746393145788; Sun, 11 Jul 2021 14:00:37 -0700 (PDT) Received: by mail-wm1-f41.google.com with SMTP id b14-20020a1c1b0e0000b02901fc3a62af78so12877655wmb.3 for ; Sun, 11 Jul 2021 14:00:36 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (abayonne-654-1-142-116.w86-222.abo.wanadoo.fr. [86.222.93.116]) by smtp.gmail.com with ESMTPSA id p2sm7130595wmg.6.2021.07.11.14.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jul 2021 14:00:34 -0700 (PDT) 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=fEfjSQddq0TrVwbGQ3ccMh+OvT1Jy1LGnQdM/7SCR9Y=; b=Rz4wfyg38TGS203+CwcF6V5EpU/k9B6cVDyBjaVSoXNHmL0xwZ3bo5ldwM1zxxcpPD 9qYGKk3o8S4tlv5Mbceej6SQKXmikkwg/brUR/2IokR7evHlvMKCUrSZMTdsJslElmPB 0+juz6AG5PfAoT0rmycyUVpW2+Ke2ViSEJ0ytWo7X1zXTwWeOmsxE1/WY86TQoegG4XC NniQ/tEq1seo347O7FMK7x8jpuiae2eLMFVzbBVneiduTKYuL1LioZJiINy8H6Xw3A2O 34QpOYfzs2X8CuyYoyXMFYoaMsAKXxcNnFOvVyOTwLr+5wN+n18np3tSHYdRjJf7lNjZ mieg== 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=fEfjSQddq0TrVwbGQ3ccMh+OvT1Jy1LGnQdM/7SCR9Y=; b=ZiH9/xbZ9amcdAPheoXZgESDLnGnzcTmfAKF/nGP397OPkh6cViYwxVn2u063+5U2M UL6KIEUXYaelDdaNQQddXfobEaRfikL+pGgc76IKNyvSHEUN+tS4/NDhUW+gpzVzskk7 K/Rdl2Mgwkk5holY8mEdIiU4PKn6idhpghtkEfhwaDuZU55tPJrVZN9L9AKkP5ciwf2Z Wiehztj6l+kMjyY4m5Dk70hadSWx2HGVRb9CGvKJ4L9ON6IlHeZ3kFsfd81co3zeKOEe v+yRC36IVHho8PVZZYRaNhTbn4s7RLsmXAclRe7s2jAXdbvIn6URZO/qCfUPSLx5l5lK oCig== X-Gm-Message-State: AOAM531uYD4cn4ADzRRtgKSvHUHTvrBmhO766OjiDjcMXLtP+UMsyXCV IW75XlYo/3/ZtW/NfTrRgcE= X-Google-Smtp-Source: ABdhPJzsi7u3mSvjZ1+qbVmuyDpTa9itimdchm0DrTjEt+L0vFgXj0XBLnZVJTCAM2eyRXF5zIExSQ== X-Received: by 2002:a05:600c:4fd0:: with SMTP id o16mr10848572wmq.179.1626037235269; Sun, 11 Jul 2021 14:00:35 -0700 (PDT) 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?Herv=C3=A9=20Poussineau?= , Fredrik Noring , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Subject: [PULL 02/19] hw/pci-host/raven: Add PCI_IO_BASE_ADDR definition Date: Sun, 11 Jul 2021 22:59:59 +0200 Message-Id: <20210711210016.2710100-3-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210711210016.2710100-1-f4bug@amsat.org> References: <20210711210016.2710100-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) X-ZM-MESSAGEID: 1626037238785100001 Rather than using the magic 0x80000000 number for the PCI I/O BAR physical address on the main system bus, use a definition. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: David Gibson Message-Id: <20210417103028.601124-6-f4bug@amsat.org> --- hw/pci-host/raven.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c index 9fef74fc56c..3be27f0a14d 100644 --- a/hw/pci-host/raven.c +++ b/hw/pci-host/raven.c @@ -81,6 +81,8 @@ struct PRePPCIState { =20 #define BIOS_SIZE (1 * MiB) =20 +#define PCI_IO_BASE_ADDR 0x80000000 /* Physical address on main bus */ + static inline uint32_t raven_pci_io_config(hwaddr addr) { int i; @@ -158,7 +160,7 @@ static uint64_t raven_io_read(void *opaque, hwaddr addr, uint8_t buf[4]; =20 addr =3D raven_io_address(s, addr); - address_space_read(&s->pci_io_as, addr + 0x80000000, + address_space_read(&s->pci_io_as, addr + PCI_IO_BASE_ADDR, MEMTXATTRS_UNSPECIFIED, buf, size); =20 if (size =3D=3D 1) { @@ -190,7 +192,7 @@ static void raven_io_write(void *opaque, hwaddr addr, g_assert_not_reached(); } =20 - address_space_write(&s->pci_io_as, addr + 0x80000000, + address_space_write(&s->pci_io_as, addr + PCI_IO_BASE_ADDR, MEMTXATTRS_UNSPECIFIED, buf, size); } =20 @@ -293,8 +295,9 @@ static void raven_pcihost_initfn(Object *obj) address_space_init(&s->pci_io_as, &s->pci_io, "raven-io"); =20 /* CPU address space */ - memory_region_add_subregion(address_space_mem, 0x80000000, &s->pci_io); - memory_region_add_subregion_overlap(address_space_mem, 0x80000000, + memory_region_add_subregion(address_space_mem, PCI_IO_BASE_ADDR, + &s->pci_io); + memory_region_add_subregion_overlap(address_space_mem, PCI_IO_BASE_ADD= R, &s->pci_io_non_contiguous, 1); memory_region_add_subregion(address_space_mem, 0xc0000000, &s->pci_mem= ory); pci_root_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj),= NULL, --=20 2.31.1