From: E Shattow <e@freeshell.de>
To: u-boot@lists.u-boot-project.org,
Sumit Garg <sumit.garg@kernel.org>, Yixun Lan <dlan@kernel.org>,
Tim Ouyang <tim609@andestech.com>,
Leo Liang <leo.liang@sifive.com>, Yao Zi <me@ziyao.cc>,
Tom Rini <trini@konsulko.com>, Guodong Xu <guodong@riscstar.com>
Cc: Junhui Liu <junhui.liu@pigmoral.tech>
Subject: [PATCH v2 2/3] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
Date: Mon, 2 Nov 2026 11:50:41 -0800 [thread overview]
Message-ID: <20261102195101.103363-3-e@freeshell.de> (raw)
In-Reply-To: <20261102195101.103363-1-e@freeshell.de>
From: Junhui Liu <junhui.liu@pigmoral.tech>
The mimsic node describes the machine-level IMSIC, whose MMIO region is
0x10000 (64 KiB) for all 8 harts. However, the node also specifies
riscv,guest-index-bits = <6>, and per the AIA specification the
per-hart stride is 2^(guest-index-bits + 12) bytes when guest interrupt
files exist, i.e. 2^(6 + 12) = 256 KiB per hart and 2 MiB for all 8
harts. The described region cannot hold even a single hart's files, so
the node contradicts itself. OpenSBI enforces exactly this constraint in
imsic_data_check() and rejects the node with -EINVAL, preventing the
M-level IMSIC from initializing:
fdt_driver_init_by_offset: interrupt-controller@f1000000 (riscv,imsics) init failed: -3
init_coldboot: irqchip init failed (error -3)
Moreover, guest interrupt files exist to act as the supervisor-level
interrupt files of virtual harts; there is no machine-level counterpart.
riscv,num-guest-ids is equally meaningless for the machine-level IMSIC.
Drop both "riscv,guest-index-bits" and "riscv,num-guest-ids" properties
from the mimsic node so the node matches the actual hardware layout.
Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://patch.msgid.link/20260729-k3-mimsic-fix-v1-1-368c0aec04b9@pigmoral.tech
Signed-off-by: Yixun Lan <dlan@kernel.org>
[ upstream commit: 01e2f07c44fc46180bdb10e70506f8acf44a53dd ]
(cherry picked from commit d44cd4bcf93bb5c99a4762ed5f11656b93f9e5cc)
---
dts/upstream/src/riscv/spacemit/k3.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/dts/upstream/src/riscv/spacemit/k3.dtsi b/dts/upstream/src/riscv/spacemit/k3.dtsi
index c3f2dce0969c..2d022e1364f1 100644
--- a/dts/upstream/src/riscv/spacemit/k3.dtsi
+++ b/dts/upstream/src/riscv/spacemit/k3.dtsi
@@ -1287,9 +1287,7 @@
<&cpu4_intc 11>, <&cpu5_intc 11>,
<&cpu6_intc 11>, <&cpu7_intc 11>;
msi-controller;
- riscv,guest-index-bits = <6>;
riscv,hart-index-bits = <4>;
- riscv,num-guest-ids = <511>;
riscv,num-ids = <511>;
status = "reserved";
};
--
2.53.0
next prev parent reply other threads:[~2026-11-02 19:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 19:50 [PATCH v2 0/3] Spacemit K3 enable Linux boot E Shattow
2026-11-02 19:50 ` [PATCH v2 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
2026-11-02 19:50 ` E Shattow [this message]
2026-11-02 19:50 ` [PATCH v2 3/3] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL E Shattow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102195101.103363-3-e@freeshell.de \
--to=e@freeshell.de \
--cc=dlan@kernel.org \
--cc=guodong@riscstar.com \
--cc=junhui.liu@pigmoral.tech \
--cc=leo.liang@sifive.com \
--cc=me@ziyao.cc \
--cc=sumit.garg@kernel.org \
--cc=tim609@andestech.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox