From patchwork Tue May 30 13:26:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 686884 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp739480wru; Tue, 30 May 2023 06:33:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5WLdIP91uzagWAIYiGr5eQuPG8Lq4vgtxrpxVg2jM1R38EgixYIbIIdnecNz7BHgTEwjea X-Received: by 2002:a05:6214:621:b0:625:947f:d2b8 with SMTP id a1-20020a056214062100b00625947fd2b8mr2178089qvx.11.1685453600555; Tue, 30 May 2023 06:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685453600; cv=none; d=google.com; s=arc-20160816; b=kqlQicDAWsi69bTXsykrCE6ycoY8c1f+0U/wUlBvj2czffJCud9Xqz5SmeOWKxVkuy gAS0VsBT+G5EsNArRA/16uAExlYgG6e6MVZkMYqVYNj9+eAUw6pOmbDgmT5/V+fqnZh4 QGhFbW5yHkOQ/kQmrgz2+p2ABQoBjXuqlzao8iZrnmFdn4Heh1F484VO6ORLkMTsUY0P Lq8m21UUNItVbNjt8HXbAuL9b8SrnihOgkiJmuiC+9JatyIOsDpfIEXis1waGXwJ5mfu uyNm0Uzmon2G6IeNJ8C2qDoJ/M5r82ohjaIOfMagMjOVjLB7z6T4/+qmr0mcPGMZCFl4 K4IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=VByRLMRcj+W57M96tFkVlcg+Nb0eJ3FyT95jZGjkoWI=; b=0iqdGvSpRyvW4m6++Xrj43JLoKcI0YClVpxAtWtfpQKwY9A/DoR/MyB9BqYaQ/K7kT M7qsuc5wQX94DRnebA036ULfVR0UO6gUJSqep/ZJkQGkOGPBZxw+ZHXvXR7Ff4u9ADCq 482NmUT3oCcuREldgchl02L0om28DfndEhhkbfX0+PGqMYwNgmzVQM+wBOUlMBZs5HDn ao0seX1urC0ROGe0EW5w9ElXIEXSGMOSydYfTF66IgP0KiIn7LWtq+InZKMNCGzu4HVt vKkxsfFSrbheedBWP/oBNNFMp117wuzaJLXa7Xq6GK0P3OIUoES5D6PeQo1EzXjeupju zQFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Drc4w+qh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jz15-20020a0562140e6f00b00623a1e9460asi6354941qvb.612.2023.05.30.06.33.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 May 2023 06:33:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Drc4w+qh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3zNa-0007l4-B0; Tue, 30 May 2023 09:27:14 -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 1q3zN0-0005if-86 for qemu-devel@nongnu.org; Tue, 30 May 2023 09:26:43 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3zMu-0001Rs-Nb for qemu-devel@nongnu.org; Tue, 30 May 2023 09:26:37 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f6e4554453so30797195e9.3 for ; Tue, 30 May 2023 06:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685453191; x=1688045191; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VByRLMRcj+W57M96tFkVlcg+Nb0eJ3FyT95jZGjkoWI=; b=Drc4w+qhwYMJiUOgJBfJBw6daEfULxwifaJeITSu1NpptB/cmNn/4QbuPSFgqC0Wyx 7A8AsqC2KXlYv2j8S1tSA2N0P60YS+7FhfYNvph86noKDKnWBxcpwbYS5oU3zxnnVfcK AkvwWdntCG0Fs2+PowcpIi+8cMS5/7+w03xb2ziONsF+krQQMt5JuOwuhmfkCbAP3FDu Qw9RS1sqPihBYM9sgQSbp238QvWo/vxUeMg7zuQMqLwhGyQa8qozIH4iHudzxqWhcJnF /UxTVVtrjUoTRiF9mK5Rn4Vms2noRnn/zMFYnsyQvtUDcNvJ6R6z6wnKu1Hh6HqkbCF2 cyTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685453191; x=1688045191; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VByRLMRcj+W57M96tFkVlcg+Nb0eJ3FyT95jZGjkoWI=; b=ChJFwE2GULFoR8hsgyAfJReAEFA78gzpPj/7jhF6Wx6XDJGKLpWNhqKodC9uw5XxNK awEpiH4UXDRtQWb1i3I48xL7N16MHcJpAB2KPZU1YlZmc0FnY6ZEkEtSbCELbndP6YsK uicfobECHEDlQ0phWjlmK4IwdmU8z+cSIY6BqwFTIALwPoeFBC0ou7GC1GePyRkYQzzl 1QRucdyxN6AjwCZcsRDXwjWCgVEyzpymJRjkx5bqDAPZuRsNqttFaGA8j8IAsZQbgmDl bgugPfiMpTaA7plYCaLfnT4f5oTxrW2StjNYhe3qbnFiQyZM6JxRi5UJvpEHoYfwKM+H ZWTg== X-Gm-Message-State: AC+VfDzyDPTruABj5/r7tXs1QpMuzE29I1MXd+DcuVXxo86yZIhddtHG dN/6Uu6oBMW+bjfbdzn5ti4bu9BWxVRUqTW3AVs= X-Received: by 2002:a1c:e901:0:b0:3f6:795:6d1a with SMTP id q1-20020a1ce901000000b003f607956d1amr1705128wmc.22.1685453190765; Tue, 30 May 2023 06:26:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id p19-20020a1c7413000000b003f60e143d38sm17463615wmc.11.2023.05.30.06.26.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 06:26:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/21] hw/arm/sbsa-ref: add GIC node into DT Date: Tue, 30 May 2023 14:26:19 +0100 Message-Id: <20230530132620.1583658-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230530132620.1583658-1-peter.maydell@linaro.org> References: <20230530132620.1583658-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Marcin Juszkiewicz Let add GIC information into DeviceTree as part of SBSA-REF versioning. Trusted Firmware will read it and provide to next firmware level. Bumps platform version to 0.1 one so we can check is node is present. Signed-off-by: Marcin Juszkiewicz Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/sbsa-ref.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 9c3e670ec65..de21200ff93 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -29,6 +29,7 @@ #include "exec/hwaddr.h" #include "kvm_arm.h" #include "hw/arm/boot.h" +#include "hw/arm/fdt.h" #include "hw/arm/smmuv3.h" #include "hw/block/flash.h" #include "hw/boards.h" @@ -168,6 +169,20 @@ static uint64_t sbsa_ref_cpu_mp_affinity(SBSAMachineState *sms, int idx) return arm_cpu_mp_affinity(idx, clustersz); } +static void sbsa_fdt_add_gic_node(SBSAMachineState *sms) +{ + char *nodename; + + nodename = g_strdup_printf("/intc"); + qemu_fdt_add_subnode(sms->fdt, nodename); + qemu_fdt_setprop_sized_cells(sms->fdt, nodename, "reg", + 2, sbsa_ref_memmap[SBSA_GIC_DIST].base, + 2, sbsa_ref_memmap[SBSA_GIC_DIST].size, + 2, sbsa_ref_memmap[SBSA_GIC_REDIST].base, + 2, sbsa_ref_memmap[SBSA_GIC_REDIST].size); + + g_free(nodename); +} /* * Firmware on this machine only uses ACPI table to load OS, these limited * device tree nodes are just to let firmware know the info which varies from @@ -204,7 +219,7 @@ static void create_fdt(SBSAMachineState *sms) * fw compatibility. */ qemu_fdt_setprop_cell(fdt, "/", "machine-version-major", 0); - qemu_fdt_setprop_cell(fdt, "/", "machine-version-minor", 0); + qemu_fdt_setprop_cell(fdt, "/", "machine-version-minor", 1); if (ms->numa_state->have_numa_distance) { int size = nb_numa_nodes * nb_numa_nodes * 3 * sizeof(uint32_t); @@ -260,6 +275,8 @@ static void create_fdt(SBSAMachineState *sms) g_free(nodename); } + + sbsa_fdt_add_gic_node(sms); } #define SBSA_FLASH_SECTOR_SIZE (256 * KiB)