<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/opensbi.git, branch SDK_v2.1.0</title>
<subtitle>StarFive Tech OpenSBI for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/opensbi.git/atom?h=SDK_v2.1.0</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/opensbi.git/atom?h=SDK_v2.1.0'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/'/>
<updated>2022-02-04T05:46:29+00:00</updated>
<entry>
<title>lib: utils/serial: Round UART8250 baud rate divisor to nearest integer</title>
<updated>2022-02-04T05:46:29+00:00</updated>
<author>
<name>Jakub Luzny</name>
<email>jakub.luzny@codasip.com</email>
</author>
<published>2022-01-21T15:06:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=ce4c0188d96b2c20c2e08d24646a5e517fe15a4b'/>
<id>urn:sha1:ce4c0188d96b2c20c2e08d24646a5e517fe15a4b</id>
<content type='text'>
Previously, it was rounded down and that gives suboptimal results when
non-standard clock sources or baud rates are used.

Signed-off-by: Jakub Luzny &lt;jakub.luzny@codasip.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: fix compilation when strings.h is included</title>
<updated>2022-02-04T05:34:19+00:00</updated>
<author>
<name>Petro Karashchenko</name>
<email>petro.karashchenko@gmail.com</email>
</author>
<published>2022-01-28T07:13:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=6ad8917b7e27e5e80fb9268492b9111b17ed2024'/>
<id>urn:sha1:6ad8917b7e27e5e80fb9268492b9111b17ed2024</id>
<content type='text'>
In a systems that provide strings.h and it is included
together with sbi_bitops.h the compilation error appears.
The ffs() and fls() are provided by strings.h

Signed-off-by: Petro Karashchenko &lt;petro.karashchenko@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>Makefile: fix build with binutils 2.38</title>
<updated>2022-02-04T05:17:24+00:00</updated>
<author>
<name>Aurelien Jarno</name>
<email>aurelien@aurel32.net</email>
</author>
<published>2022-01-28T17:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=5d53b55aa77ffeefd4012445dfa6ad3535e1ff2c'/>
<id>urn:sha1:5d53b55aa77ffeefd4012445dfa6ad3535e1ff2c</id>
<content type='text'>
From version 2.38, binutils default to ISA spec version 20191213. This
means that the csr read/write (csrr*/csrw*) instructions and fence.i
instruction has separated from the `I` extension, become two standalone
extensions: Zicsr and Zifencei. As the kernel uses those instruction,
this causes the following build failure:

 CC        lib/sbi/sbi_tlb.o
&lt;&lt;BUILDDIR&gt;&gt;/lib/sbi/sbi_tlb.c: Assembler messages:
&lt;&lt;BUILDDIR&gt;&gt;/lib/sbi/sbi_tlb.c:190: Error: unrecognized opcode `fence.i'
make: *** [Makefile:431: &lt;&lt;BUILDDIR&gt;&gt;/build/lib/sbi/sbi_tlb.o] Error 1

The fix is to specify those extensions explicitly in -march. However as
older binutils version do not support this, we first need to detect
that.

Signed-off-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Disable interrupt and inhibit counting in M-mode during init</title>
<updated>2022-02-04T04:40:28+00:00</updated>
<author>
<name>Atish Patra</name>
<email>atishp@rivosinc.com</email>
</author>
<published>2022-01-07T18:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=a26dc609df04ca4704873b683ac03855f20b056e'/>
<id>urn:sha1:a26dc609df04ca4704873b683ac03855f20b056e</id>
<content type='text'>
Currently, the mhpmevent CSRs are untouched during hart init during
cold/warm boot. Ideally, we should clear out all the bits except
overflow and MINH bit. That is required to disable overflow
interrupt and inhibit counting in M-mode to avoid any spurious
interrupts before perf start.

Signed-off-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Disable interrupt during config matching</title>
<updated>2022-02-04T04:38:57+00:00</updated>
<author>
<name>Atish Patra</name>
<email>atishp@rivosinc.com</email>
</author>
<published>2022-01-07T18:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=3b7c204dcaa58e415ad7451c2a690bb88773abbf'/>
<id>urn:sha1:3b7c204dcaa58e415ad7451c2a690bb88773abbf</id>
<content type='text'>
PMU overflow interrupt should be disabled durinig initial configuration of
counters. They should be enabled while starting counters.

Fixes: 730f01bb41a6 ("lib: sbi: Support sscofpmf extension in OpenSBI")
Signed-off-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Map only the counters enabled in hardware</title>
<updated>2022-02-04T04:37:07+00:00</updated>
<author>
<name>Atish Patra</name>
<email>atishp@rivosinc.com</email>
</author>
<published>2022-01-07T18:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=632f59392bbaa05176376b7d7a9f77f611816614'/>
<id>urn:sha1:632f59392bbaa05176376b7d7a9f77f611816614</id>
<content type='text'>
The counter mapping in DT may be incorrect if all the counters specified
in the mapping are actually not physically present in the hardware.
OpenSBI should only keep a mapping of counters enabled in hardware and
defined in DT. This assume that all the programmable hpmcounters are
consecutive as it doesn't make sense to build a system with sparse
hpmcounters.

Signed-off-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: fix pointer of type 'void *' used in arithmetic</title>
<updated>2022-01-21T16:28:12+00:00</updated>
<author>
<name>Jukka Laitinen</name>
<email>jukka.laitinen@iki.fi</email>
</author>
<published>2022-01-19T09:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=5d025eb2353550eadbd2fa9b8083a92fe9b07bd9'/>
<id>urn:sha1:5d025eb2353550eadbd2fa9b8083a92fe9b07bd9</id>
<content type='text'>
Using "void *" in arithmetic causes errors with strict compiler settings:
"error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]"

Avoid these by calculating on "char *" where 1-byte data size is assumed.

Signed-off-by: Jukka Laitinen &lt;jukkax@ssrc.tii.ae&gt;
Reviewed-by: Dong Du &lt;Dd_nirvana@sjtu.edu.cn&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>platform: sifive_fu740: fix reset when watchdog is running</title>
<updated>2022-01-21T16:14:57+00:00</updated>
<author>
<name>Aurelien Jarno</name>
<email>aurelien@aurel32.net</email>
</author>
<published>2022-01-05T07:20:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=fb688d9e9d4099d6945c9e460b9cd2c8c4d8a29b'/>
<id>urn:sha1:fb688d9e9d4099d6945c9e460b9cd2c8c4d8a29b</id>
<content type='text'>
When the watchdog is running the HiFive Unmatched board does not reboot
properly and shuts down itself a few seconds after reboot, in the early
stages of the u-boot loading. On a Linux kernel this happens when the
da9063_wdt module is loaded. This does not happen if the module is
unloaded before reboot or if the watchdog module is loaded with
"stop_on_reboot=1".

Fix that by stopping the watchdog before attempting to reset the board.
This is done by zeroing the TWDSCALE field of CONTROL_D register, unless
it was already set to 0.

Reported-by: Tianon Gravi &lt;tianon@debian.org&gt;
Signed-off-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Reviewed-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
Tested-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>platform: sifive_fu740: do not use a global in da9063_reset/shutdown</title>
<updated>2022-01-21T16:11:33+00:00</updated>
<author>
<name>Aurelien Jarno</name>
<email>aurelien@aurel32.net</email>
</author>
<published>2022-01-05T07:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=8257262dbf4fc934c2f21a42dcd9c0f41a378d46'/>
<id>urn:sha1:8257262dbf4fc934c2f21a42dcd9c0f41a378d46</id>
<content type='text'>
da9063_reset() and da9063_shutdown() take the chip address in argument
(like similar functions), but in practice use the da9063 global struct
instead. Fix that.

Signed-off-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Reviewed-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/sys: Extend HTIF library to allow custom base address</title>
<updated>2022-01-11T12:47:49+00:00</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-01-06T03:46:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=6dde43584f185f71a8dd713deb438d7c724a9ad5'/>
<id>urn:sha1:6dde43584f185f71a8dd713deb438d7c724a9ad5</id>
<content type='text'>
Some of RISC-V emulators provide HTIF at fixed base address so for
such emulators users have to hard-code HTIF base address in the
linker script.

To address this problem, we let users optionally provide fixed HTIF
base address via platform support (or device tree).

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Dong Du &lt;Dd_nirvana@sjtu.edu.cn&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
</feed>
