<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/firmware/fw_base.S, branch v0.8</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/firmware/fw_base.S?h=v0.8</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/firmware/fw_base.S?h=v0.8'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2020-06-05T03:32:34Z</updated>
<entry>
<title>firmware: Allow fw_platform_init() to return updated FDT location</title>
<updated>2020-06-05T03:32:34Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-05-24T04:33:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=86ec5341e421b3f6ac39c75da648b7a22e56f248'/>
<id>urn:sha1:86ec5341e421b3f6ac39c75da648b7a22e56f248</id>
<content type='text'>
Currently, the fw_platform_init() does not return anything but we can
further improve by allowing fw_platform_init() to return updated FDT
location.

It is certainly not mandatory for fw_platform_init() to return a new
location of FDT (or modify FDT). In fact, the fw_platform_init() can
always return the original FDT location (i.e. 'arg1') unmodified.

This new capability of fw_platform_init() will allow platforms to:
1. Have multiple built-in FDTs and select one
2. Modify FDT before using based on platform specific straps or OTP

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: fw_base: Don't OR forced FW_OPTIONS</title>
<updated>2020-06-05T03:32:32Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-05-23T06:39:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=4ce6b7a82ac2c9f57186c00f23223dd39067555b'/>
<id>urn:sha1:4ce6b7a82ac2c9f57186c00f23223dd39067555b</id>
<content type='text'>
Currently, we are ORing FW_OPTIONS with the options passed by
previous booting stage to fw_dynamic. This causes confusion
because compiling fw_dynamic with FW_OPTIONS=0x2 does not force
enable boot prints as the U-Boot SPL passes options=0x1 in
fw_dyanmic_info.

The best thing to do is always prefer FW_OPTIONS when available.
This is intuitive for OpenSBI users and easy in debugging.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: fw_base: Make builtin DTB available to fw_platform_init()</title>
<updated>2020-06-05T03:32:30Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-05-23T06:07:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=64f140830d758ebcf9d9b6ab071ae24fcc37b884'/>
<id>urn:sha1:64f140830d758ebcf9d9b6ab071ae24fcc37b884</id>
<content type='text'>
Currently, fw_prev_arg1() is called after fw_platform_init() which
caused builtin DTB to be not available to fw_platform_init().

To allow builtin DTB available to fw_platform_init(), we should
call fw_save_info() and fw_prev_arg1() before fw_platform_init().

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Correct spelling mistakes</title>
<updated>2020-05-18T05:12:29Z</updated>
<author>
<name>Daniel Schaefer</name>
<email>daniel.schaefer@hpe.com</email>
</author>
<published>2020-05-15T09:38:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=38a4b54cdc3fd77574c4ef166154819a976e9fa0'/>
<id>urn:sha1:38a4b54cdc3fd77574c4ef166154819a976e9fa0</id>
<content type='text'>
Signed-off-by: Daniel Schaefer &lt;git@danielschaefer.me&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: fw_base: Introduce optional fw_platform_init()</title>
<updated>2020-05-01T05:03:02Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-04-26T09:01:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=4d063538f0493916dc6263276c4c84f31446db41'/>
<id>urn:sha1:4d063538f0493916dc6263276c4c84f31446db41</id>
<content type='text'>
We add optional fw_platform_init() function which will allow
platform specific code to update "struct sbi_platform platform"
before it is used.

The fw_platform_init() can be a regular C function so before
callint it we:
1. zero-out BSS section
2. Setup temporary trap handler to catch bugs
3. Setup temporary stack pointer

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: fw_base: Remove CSR_MTVEC update check</title>
<updated>2020-05-01T03:58:38Z</updated>
<author>
<name>Charles Papon</name>
<email>charles.papon.90@gmail.com</email>
</author>
<published>2020-05-01T03:58:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5bdf022d07f1efcf8bc1647c78a294ab2baf4c9b'/>
<id>urn:sha1:5bdf022d07f1efcf8bc1647c78a294ab2baf4c9b</id>
<content type='text'>
Remove unnecessary CSR_MTVEC read to reduce the openSBI CSR requirement.

Mux are costly in FPGA. Allowing CSR_MTVEC to be write only is usefull
for the FMax/Area of FPGA softcore.

https://github.com/SpinalHDL/opensbi.git branch mtvec

Signed-off-by: Charles Papon &lt;charles.papon.90@gmail.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi_trap: Simplify sbi_trap_handler() API</title>
<updated>2020-03-28T08:02:23Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-20T03:23:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=40b221baffd6bb348b63367784d4f6fcff53c24a'/>
<id>urn:sha1:40b221baffd6bb348b63367784d4f6fcff53c24a</id>
<content type='text'>
This patch simplify sbi_trap_handler() API as follows:
1. Remove current hartid local variable because sbi_trap_handler()
   itself does not need it.
2. Remove scratch parameter because none of the functions directly
   called by sbi_trap_handler() require it.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: sbi_platform: Introduce HART index to HART id table</title>
<updated>2020-03-19T04:00:01Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-15T06:09:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c51f02cf143b081c2a81717393a0e6cef2ce2521'/>
<id>urn:sha1:c51f02cf143b081c2a81717393a0e6cef2ce2521</id>
<content type='text'>
A platform can have discontinuous and/or sparse HART ids so we
cannot always assume a set of HARTs with continuous HART ids.

This patch adds support for discontinuous and sparse HART ids by
introducing HART index to HART id table. This table has platform
hart_count entries and it maps HART index to HART id.

The HART index to HART id table has only two restrictions:
1. HART index &lt; sbi_platform hart_count
2. HART id &lt; SBI_HARTMASK_MAX_BITS

Example1:
Let's say we have a platform with 2 HART ids 11 and 22, for such a
a platform:
hart_count = 2
hart_index2id[0] = 11
hart_index2id[1] = 22

Example2:
Let's say we have a platform with 5 HARTs ids 0, 1, 2, 3, and 4
but out of these HART with id 0 is not usable so for such a platform:
hart_count = 5
hart_index2id[0] = -1U
hart_index2id[1] = 1
hart_index2id[2] = 2
hart_index2id[3] = 3
hart_index2id[4] = 4
OR
hart_count = 4
hart_index2id[0] = 1
hart_index2id[1] = 2
hart_index2id[2] = 3
hart_index2id[3] = 4

With HART index to HART id table in place, the hart_disabled()
callback is now redundant so we remove it as well.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: fw_base: Optimize _hartid_to_scratch() implementation</title>
<updated>2020-03-13T06:48:51Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-11T13:55:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=eeae3d95827ec33e74d853596b89ee49d83ff751'/>
<id>urn:sha1:eeae3d95827ec33e74d853596b89ee49d83ff751</id>
<content type='text'>
This patch optimizes _hartid_to_scratch() in following ways:
1. Use caller saved registers instead of callee saved registers
   so that we don't need to save/restore registers on stack
2. Remove second redundant mul instruction by re-arranging
   instructions

Overall, we reduce 9 instructions in _hartid_to_scratch()
implementation.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>firmware: Fix placement of .align directives</title>
<updated>2020-01-10T04:00:27Z</updated>
<author>
<name>Andreas Schwab</name>
<email>schwab@suse.de</email>
</author>
<published>2020-01-09T11:49:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6ffe1bed09be1cb2db8755b30c0258849184400b'/>
<id>urn:sha1:6ffe1bed09be1cb2db8755b30c0258849184400b</id>
<content type='text'>
Move the .align directives after switching the section.  We want to align
the start of the current section, not the end of the previous section.
This also obsoletes the misguided workaround of disabling relaxation.

Signed-off-by: Andreas Schwab &lt;schwab@suse.de&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
</feed>
