From patchwork Tue Jun 6 18:24:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 689755 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp2777084wru; Tue, 6 Jun 2023 11:25:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/IlEAiu3QiRNsIZqxYsO/i5jX/MXYPAFCTeKgkwckteiNxLcA16uXHsFgzNflfkzeayuJ X-Received: by 2002:a05:620a:800b:b0:75b:23a0:e7e6 with SMTP id ee11-20020a05620a800b00b0075b23a0e7e6mr518423qkb.71.1686075936790; Tue, 06 Jun 2023 11:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686075936; cv=none; d=google.com; s=arc-20160816; b=EBps5jvNl5WbqUf6kOTSfhohO8TP1sDLMF1+7lfdHhYy4UwW6vtRfy0VVIQCfCfkcv CxReKtf/MVqNp+TvDjIh5EYRqfkQmS3uDzTTCqBor/mNj3pDa0BjWsA/7AsmuKuiyp33 G00JIbwKIWd0go8wuwnDgAR9bNrRxe74heIwtvGEH0ucFjuujViRvHD8/dyUCl2sKRoK 1V0MfBCliC1OSG8NwLfRapCRmJQXhBQjSsFvYF/iQ4PYvf6vZKB54+/m9IMY9iR9Batm BROAqZvQKEffV69Iz62QiI5G+NfKTEOYJt8wWkqeGnr20Bfgx/9wmSQfdKRVJGH00dct S9Sw== 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:cc:to :from; bh=dMHh37OH5dp1UmmBHxXfMmQbFRy1HKZJbI7PSM+Ptyc=; b=Ku2A8K86/LBa9OAoz90rnnS1WAUgLwcwOcK0LzOWGYakZT/cUnlEu0fhiAEKcgc+lF 7p7n9T9FKs52D2QpClApUtk4dLMs6rc33AQUzbsMNu+rMui9PXqIQaYaZ07zfmZ3WwoS xaJcbXECn/8K/C3upBSmrIa1YKlug/3a4Uc9SxYbhYmRtZfM4JefbAevIUCH1S9BVWhz yFReHw7yFwBgCbc1IaAhSeAGkTjGiWUiNnGkAbZTABweyOASvBVLSs7p7ho/nkvfRQxj oR9HpR71D43dwl+7LIsc+MLQPPj13eh1VKcQqClMnmWX0D0prEIj48hqpoHhxmPhxHbw KyTw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 t15-20020a05620a004f00b0075ced05e346si6324771qkt.169.2023.06.06.11.25.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Jun 2023 11:25:36 -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; 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=fail (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 1q6bMH-0000ih-IX; Tue, 06 Jun 2023 14:24:41 -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 1q6bMG-0000hs-Jr; Tue, 06 Jun 2023 14:24:40 -0400 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6bME-0004ZX-Hk; Tue, 06 Jun 2023 14:24:40 -0400 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 85C25260287; Tue, 6 Jun 2023 20:24:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NiiARN_IFVEh; Tue, 6 Jun 2023 20:24:34 +0200 (CEST) Received: from applejack.lan (83.21.93.182.ipv4.supernova.orange.pl [83.21.93.182]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id B7B3E260AAF; Tue, 6 Jun 2023 20:24:32 +0200 (CEST) From: Marcin Juszkiewicz To: qemu-devel@nongnu.org Cc: Leif Lindholm , Peter Maydell , Radoslaw Biernacki , qemu-arm@nongnu.org, Shashi Mallela , Marcin Juszkiewicz Subject: [PATCH 2/2] hw/arm/sbsa-ref: add GIC ITS to DeviceTree Date: Tue, 6 Jun 2023 20:24:14 +0200 Message-Id: <20230606182414.637467-3-marcin.juszkiewicz@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606182414.637467-1-marcin.juszkiewicz@linaro.org> References: <20230606182414.637467-1-marcin.juszkiewicz@linaro.org> MIME-Version: 1.0 Received-SPF: softfail client-ip=213.251.184.221; envelope-from=marcin.juszkiewicz@linaro.org; helo=muminek.juszkiewicz.com.pl X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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 We need GIC ITS information in DeviceTree so TF-A can pass it to EDK2. Bumping platform version to 0.2 as this is important hardware change. Signed-off-by: Marcin Juszkiewicz --- hw/arm/sbsa-ref.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 1520cd598c..2bd9e370a7 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -183,8 +183,15 @@ static void sbsa_fdt_add_gic_node(SBSAMachineState *sms) 2, sbsa_ref_memmap[SBSA_GIC_REDIST].base, 2, sbsa_ref_memmap[SBSA_GIC_REDIST].size); + nodename = g_strdup_printf("/intc/its"); + qemu_fdt_add_subnode(sms->fdt, nodename); + qemu_fdt_setprop_sized_cells(sms->fdt, nodename, "reg", + 2, sbsa_ref_memmap[SBSA_GIC_ITS].base, + 2, sbsa_ref_memmap[SBSA_GIC_ITS].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 @@ -221,7 +228,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", 1); + qemu_fdt_setprop_cell(fdt, "/", "machine-version-minor", 2); if (ms->numa_state->have_numa_distance) { int size = nb_numa_nodes * nb_numa_nodes * 3 * sizeof(uint32_t);