<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/utils, branch v1.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/utils?h=v1.1</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/utils?h=v1.1'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2022-06-22T05:25:37Z</updated>
<entry>
<title>lib: utils/timer: Remove Allwinner D1 CLINT compatibles</title>
<updated>2022-06-22T05:25:37Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-22T04:57:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6f1fe98c2f565a394f258178b0daa3843672395c'/>
<id>urn:sha1:6f1fe98c2f565a394f258178b0daa3843672395c</id>
<content type='text'>
The allwinner,sun20i-d1-clint compatible string is not documented in any
official binding, so it should not be used by drivers.

The MSWI in the D1 CLINT is compatible with the ACLINT specification, so
it can take advantage of generic driver support. However, that is only
possible if the MSWI and MTIMER are split into separate DT nodes. This
means the final binding for this device is likely to be incompatible
with what is implemented here.

Remove this compatible string from the driver to prevent it from
appearing in a stable version and causing future issues.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: irqchip/plic: fix typo in plic_warm_irqchip_init</title>
<updated>2022-06-22T05:25:27Z</updated>
<author>
<name>Jan Remes</name>
<email>jan.remes@codasip.com</email>
</author>
<published>2022-06-21T12:07:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=d76a196bfc805e1ee51f9191162007d1e0657217'/>
<id>urn:sha1:d76a196bfc805e1ee51f9191162007d1e0657217</id>
<content type='text'>
The second invocation of plic_context_init() incorrectly calls the
function with m_cntx_id instead of s_cntx_id. This breaks systems which
only have 1 external interrupt per hart.

Fixes: 8c362e7 ("lib: irqchip/plic: Factor out a context init function")
Signed-off-by: Jan Remes &lt;jan.remes@codasip.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Reviewed-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/timer: Add a separate compatible for the D1 CLINT</title>
<updated>2022-06-21T03:50:59Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2021-10-20T01:58:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=7738345396fbbae543a5af14fbc965d9163c12a0'/>
<id>urn:sha1:7738345396fbbae543a5af14fbc965d9163c12a0</id>
<content type='text'>
The CLINT in the Allwinner D1 SoC apparently does not support 64-bit
MMIO access. A property was added to support this quirk (and that
property was copied to the ACLINT MTIMER code). However, since this
difference in behavior makes the D1 CLINT incompatible with the SiFive
CLINT's programming interface, a better solution is to use a separate
compatible string.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils: Remove CSRs that set/clear an IMSIC interrupt file bits</title>
<updated>2022-06-21T03:14:45Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-06-16T11:58:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c6530012d46ed9c9655c426450bfa3aabcc0eadd'/>
<id>urn:sha1:c6530012d46ed9c9655c426450bfa3aabcc0eadd</id>
<content type='text'>
Based on architecture review committee feedback, the [m|s|vs]seteienum,
[m|s|vs]clreienum, [m|s|vs]seteipnum, and [m|s|vs]clreipnum CSRs are
removed in the latest AIA draft v0.3.0 specification.
(Refer, https://github.com/riscv/riscv-aia/releases/tag/0.3.0-draft.31)

These CSRs were mostly for software convenience and software can always
use [m|s|vs]iselect and [m|s|vs]ireg CSRs to update the IMSIC interrupt
file bits.

We update the IMSIC programming as-per above to match the latest AIA
draft specification.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/irqchip: Add wrapper for T-HEAD PLIC delegation</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5e5675874ca042fe977ffb27afcfa06cadc84b8b'/>
<id>urn:sha1:5e5675874ca042fe977ffb27afcfa06cadc84b8b</id>
<content type='text'>
The delegation bit is lost along with the rest of the PLIC state when
the CPU power domain in the Allwinner D1 is powered down, so the PLIC
needs to be re-delegated to S-mode during the hart resume path.

Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/irqchip: Add FDT wrappers for PLIC save/restore functions</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=69be3dff9df767c19a461fadf73ad7331b4bdb4c'/>
<id>urn:sha1:69be3dff9df767c19a461fadf73ad7331b4bdb4c</id>
<content type='text'>
These functions save/restore the state of the PLIC associated with the
current hart. The context save/restore functions only manipulate a
single context, since most likely the M-mode context is unused and does
not need to be saved.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: irqchip/plic: Add priority save/restore helpers</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2b79b694a80513696daf072db0fd980e7573b212'/>
<id>urn:sha1:2b79b694a80513696daf072db0fd980e7573b212</id>
<content type='text'>
These can be used by platform code to save the PLIC priority state, if
it would otherwise be lost during non-retentive suspend. The platform
is responsible for allocating all necessary storage.

As a space optimization, store the saved priority values as 8-bit
integers, since that is large enough to hold any priority value on the
relevant platforms.

Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
<entry>
<title>lib: irqchip/plic: Add context save/restore helpers</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=415ecf28f7ade7ba5a48a0cc9be8d45a7539dd89'/>
<id>urn:sha1:415ecf28f7ade7ba5a48a0cc9be8d45a7539dd89</id>
<content type='text'>
These can be used by platform code to save the PLIC context state, if
it would otherwise be lost during non-retentive suspend. The platform
is responsible for allocating all necessary storage.

Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
<entry>
<title>lib: irqchip/plic: Factor out a context init function</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8c362e7d065eaf4d55da23a190a464ba870f89aa'/>
<id>urn:sha1:8c362e7d065eaf4d55da23a190a464ba870f89aa</id>
<content type='text'>
This simplifies both the callers and the callees by removing duplicated
code and consolidating the error handling. It also fixes two bugs in the
process:
  1) ie_words was one too large when plic-&gt;num_src was a multiple of 32.
  2) plic_set_ie takes a 32-bit mask, not a Boolean value, so the FPGA
     platforms previously only enabled one out of every 32 interrupts.

Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
<entry>
<title>lib: irqchip/plic: Constify plic_data pointers</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2ea7799d563ed9bbaf3b677728e928a6cd8f580c'/>
<id>urn:sha1:2ea7799d563ed9bbaf3b677728e928a6cd8f580c</id>
<content type='text'>
None of the functions modify the passed-in plic_data, so mark it const.

Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
</feed>
