<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/sbi_scratch.h, branch v1.6</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_scratch.h?h=v1.6</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_scratch.h?h=v1.6'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2024-11-11T12:23:32Z</updated>
<entry>
<title>include: sbi: Fix typo error</title>
<updated>2024-11-11T12:23:32Z</updated>
<author>
<name>Zhang RunMin</name>
<email>runmin.zhang@ingenic.com</email>
</author>
<published>2024-10-23T07:20:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=db8f03e51237168c7fcff3d6aaa9058d6675b017'/>
<id>urn:sha1:db8f03e51237168c7fcff3d6aaa9058d6675b017</id>
<content type='text'>
Fix typo in comments describing SBI_SCRATCH_FW_HEAP_SIZE_OFFSET.

Signed-off-by: Zhang RunMin &lt;runmin.zhang@ingenic.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Optimize reads of mhartid and mscratch</title>
<updated>2024-10-28T05:21:37Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2024-10-25T18:45:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=62447cd7aa17097cefdb0d7a2f1312ff55fcda27'/>
<id>urn:sha1:62447cd7aa17097cefdb0d7a2f1312ff55fcda27</id>
<content type='text'>
csr_read() is marked as volatile and clobbering memory, which is
generally the safe thing to do. However, these two CSRs do not have any
side effects, and the values returned do not change between calls. The
compiler can generate better code if we allow it to reorder calls to
these functions and cache the return value. Introduce csr_read_relaxed()
for this use case.

Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Store the hart index in struct sbi_scratch</title>
<updated>2024-09-25T06:30:47Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2024-08-30T15:49:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=9d7a983060dc379ae788ed1879371211a1005c6f'/>
<id>urn:sha1:9d7a983060dc379ae788ed1879371211a1005c6f</id>
<content type='text'>
This is a more efficient way to get the index of the current hart than
calling a function to loop through the hartindex -&gt; hartid lookup table.

Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Add trap_context pointer in struct sbi_scratch</title>
<updated>2024-03-19T06:01:20Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2024-03-11T07:09:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=60ffc154c84dfe93b23bd02566310deb153a4360'/>
<id>urn:sha1:60ffc154c84dfe93b23bd02566310deb153a4360</id>
<content type='text'>
To track nested traps, the struct sbi_scratch needs a pointer the
current trap context so add trap_context pointer in struct sbi_context.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Tested-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Remove sbi_trap_exit() and related code</title>
<updated>2024-03-19T06:01:18Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2024-03-11T05:34:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ebb697ad8cdd5c281a94e7801fc0c1d99d6a891e'/>
<id>urn:sha1:ebb697ad8cdd5c281a94e7801fc0c1d99d6a891e</id>
<content type='text'>
Over the years, no uses of sbi_trap_exit() have been found so remove
it and also remove related code from fw_base.S and sbi_scratch.h.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Tested-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Remove sbi_scratch_last_hartid() macro</title>
<updated>2023-09-24T06:11:54Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-09-01T16:11:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=22d6ff86750e0e40ff5966dc4671e2845b0536cb'/>
<id>urn:sha1:22d6ff86750e0e40ff5966dc4671e2845b0536cb</id>
<content type='text'>
The sbi_scratch_last_hartid() macro is not of much use on platforms
with really sparse hartids so let us replace use of this macro with
other approaches.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Introduce HART index in sbi_scratch</title>
<updated>2023-09-24T06:09:21Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-09-12T04:20:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=d1e4dff45b2d3ce2c88d09e98ae5795d323b2267'/>
<id>urn:sha1:d1e4dff45b2d3ce2c88d09e98ae5795d323b2267</id>
<content type='text'>
We introduce HART index and related helper functions in sbi_scratch
where HART index is contiguous and each HART index maps to a physical
HART id such that 0 &lt;= HART index and HART index &lt; SBI_HARTMASK_MAX_BITS.

The HART index to HART id mapping follows the index2id mapping provided
by the platform. If the platform does not provide index2id mapping then
identity mapping is assumed.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Print scratch size and usage at boot time</title>
<updated>2023-06-05T10:16:22Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-20T08:32:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2a04f7037317c6c5b591b160a074c700de9b3378'/>
<id>urn:sha1:2a04f7037317c6c5b591b160a074c700de9b3378</id>
<content type='text'>
The scratch space being a scarce resource so let us print it's
size and usage at boot time.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>platform: Allow platforms to specify heap size</title>
<updated>2023-06-05T10:15:33Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-17T05:58:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5cf9a540164a018a31a679578a27eb964af0340d'/>
<id>urn:sha1:5cf9a540164a018a31a679578a27eb964af0340d</id>
<content type='text'>
We extend struct sbi_platform and struct sbi_scratch to allow platforms
specify the heap size to the OpenSBI firmwares. The OpenSBI firmwares
will use this information to determine the location of heap and provide
heap base address in per-HART scratch space.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>include: sbi_scratch: Add helper macros to access data type</title>
<updated>2023-06-05T10:12:50Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-06-05T06:52:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=aad7a377051136c2e0f4adeea2689167a294d2b4'/>
<id>urn:sha1:aad7a377051136c2e0f4adeea2689167a294d2b4</id>
<content type='text'>
Reading and writing a data type in scratch space is a very common
use-case so let us add related helper macros in sbi_scratch.h.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
</feed>
