<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm63xx/u-boot/arch/riscv/cpu/start.S, branch master</title>
<subtitle>Broadcom-s U-Boot</subtitle>
<id>https://git.openwrt.org/project/bcm63xx/u-boot/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/bcm63xx/u-boot/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/'/>
<updated>2019-05-09T08:46:46Z</updated>
<entry>
<title>riscv: prior_stage_fdt_address should only be used when OF_PRIOR_STAGE is enabled</title>
<updated>2019-05-09T08:46:46Z</updated>
<author>
<name>Rick Chen</name>
</author>
<published>2019-04-30T05:49:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=f9281b8905d50d1f284df92f53534ffb8d2558a8'/>
<id>urn:sha1:f9281b8905d50d1f284df92f53534ffb8d2558a8</id>
<content type='text'>
This patch will fix prior_stage_fdt_address write failure problem, when
AE350 boots from flash.

When AE350 boots from flash, prior_stage_fdt_address will be flash
address, we shall avoid it to be written.

Signed-off-by: Rick Chen &lt;rick@andestech.com&gt;
Cc: Greentime Hu &lt;greentime@andestech.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
</content>
</entry>
<entry>
<title>riscv: Introduce CONFIG_XIP to support booting from flash</title>
<updated>2019-05-09T08:46:46Z</updated>
<author>
<name>Rick Chen</name>
</author>
<published>2019-04-30T05:49:33Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=bdce38965e79143ed58bf1c6d39c650ff3dfefd1'/>
<id>urn:sha1:bdce38965e79143ed58bf1c6d39c650ff3dfefd1</id>
<content type='text'>
When U-Boot boots from flash, during the boot process,
hart_lottery and available_harts_lock variable addresses
point to flash which is not writable. This causes boot
failures on AE350. Introduce a config option CONFIG_XIP
to support such configuration.

Signed-off-by: Rick Chen &lt;rick@andestech.com&gt;
Cc: Greentime Hu &lt;greentime@andestech.com&gt;
Reviewed-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>riscv: hang if relocation of secondary harts fails</title>
<updated>2019-04-08T01:44:26Z</updated>
<author>
<name>Lukas Auer</name>
</author>
<published>2019-03-17T18:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=8ac39e2974d9f1395969a500e692f45717c4ccf2'/>
<id>urn:sha1:8ac39e2974d9f1395969a500e692f45717c4ccf2</id>
<content type='text'>
Print an error message and hang if smp_call_function() returns an error,
indicating that relocation of the secondary harts has failed.

Signed-off-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>riscv: do not rely on hart ID passed by previous boot stage</title>
<updated>2019-04-08T01:44:26Z</updated>
<author>
<name>Lukas Auer</name>
</author>
<published>2019-03-17T18:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=e04324025275dee6e3e9a968c8d12e98c9b47567'/>
<id>urn:sha1:e04324025275dee6e3e9a968c8d12e98c9b47567</id>
<content type='text'>
RISC-V U-Boot expects the hart ID to be passed to it via register a0 by
the previous boot stage. Machine mode firmware such as BBL and OpenSBI
do this when starting their payload (U-Boot) in supervisor mode. If
U-Boot is running in machine mode, this task must be handled by the boot
ROM. Explicitly populate register a0 with the hart ID from the mhartid
CSR to avoid possible problems on RISC-V processors with a boot ROM that
does not handle this task.

Suggested-by: Rick Chen &lt;rick@andestech.com&gt;
Signed-off-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-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;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Rick Chen &lt;rick@andestech.com&gt;
Tested-by: Rick Chen &lt;rick@andestech.com&gt;
</content>
</entry>
<entry>
<title>riscv: add support for multi-hart systems</title>
<updated>2019-04-08T01:44:26Z</updated>
<author>
<name>Lukas Auer</name>
</author>
<published>2019-03-17T18:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=3dea63c8445b25eb3de471410bbafcf54c9f0e9b'/>
<id>urn:sha1:3dea63c8445b25eb3de471410bbafcf54c9f0e9b</id>
<content type='text'>
On RISC-V, all harts boot independently. To be able to run on a
multi-hart system, U-Boot must be extended with the functionality to
manage all harts in the system. All harts entering U-Boot are registered
in the available_harts mask stored in global data. A hart lottery system
as used in the Linux kernel selects the hart U-Boot runs on. All other
harts are halted. U-Boot can delegate functions to them using
smp_call_function().

Every hart has a valid pointer to the global data structure and a 8KiB
stack by default. The stack size is set with CONFIG_STACK_SIZE_SHIFT.

Signed-off-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>riscv: save hart ID in register tp instead of s0</title>
<updated>2019-04-08T01:44:26Z</updated>
<author>
<name>Lukas Auer</name>
</author>
<published>2019-03-17T18:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=1446b26f7652124f0e3e98c348cdbc4fc55eb0cb'/>
<id>urn:sha1:1446b26f7652124f0e3e98c348cdbc4fc55eb0cb</id>
<content type='text'>
The hart ID passed by the previous boot stage is currently stored in
register s0. If we divert the control flow inside a function, which is
required as part of multi-hart support, the function epilog may not be
called, clobbering register s0. Save the hart ID in the unallocatable
register tp instead to protect the hart ID.

Signed-off-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Rick Chen &lt;rick@andestech.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>riscv: delay initialization of caches and debug UART</title>
<updated>2019-04-08T01:44:26Z</updated>
<author>
<name>Lukas Auer</name>
</author>
<published>2019-03-17T18:28:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=2503ccc55ff2031ae2ff476fb06f666e6d1c7a64'/>
<id>urn:sha1:2503ccc55ff2031ae2ff476fb06f666e6d1c7a64</id>
<content type='text'>
Move the initialization of the caches and the debug UART until after
board_init_f_init_reserve. This is in preparation for SMP support, where
code prior to this point will be executed by all harts. This ensures
that initialization will only be performed once on the main hart running
U-Boot.

Signed-off-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>riscv: Save boot hart id to the global data</title>
<updated>2018-12-18T01:56:27Z</updated>
<author>
<name>Bin Meng</name>
</author>
<published>2018-12-12T14:12:45Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=51ab4570f3920ae3d6822c96fe03ffb97e2072b4'/>
<id>urn:sha1:51ab4570f3920ae3d6822c96fe03ffb97e2072b4</id>
<content type='text'>
At present the hart id passed via a0 in the U-Boot entry is saved
to s0 at the beginning but does not preserve later. Save it to the
global data structure so that it can be used later.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>riscv: Move trap handler codes to mtrap.S</title>
<updated>2018-12-18T01:56:27Z</updated>
<author>
<name>Bin Meng</name>
</author>
<published>2018-12-12T14:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=4b3f5ed5ac1a4376c29c3010d25049c03de4ed57'/>
<id>urn:sha1:4b3f5ed5ac1a4376c29c3010d25049c03de4ed57</id>
<content type='text'>
Currently the M-mode trap handler codes are in start.S. For future
extension, move them to a separate file mtrap.S.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>riscv: ax25-ae350: Pass dtb address to u-boot with a1 register</title>
<updated>2018-12-05T06:14:16Z</updated>
<author>
<name>Rick Chen</name>
</author>
<published>2018-12-03T09:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=48cbf6246052de10d35b616b5efb2f783904a49d'/>
<id>urn:sha1:48cbf6246052de10d35b616b5efb2f783904a49d</id>
<content type='text'>
ax25-ae350 use CONFIG_OF_BOARD via a2 and CONFIG_SYS_SDRAM_BASE
to boot from ram which allow the board to override the fdt
address originally.

But after this patch
riscv: save hart ID and device tree passed by prior boot stage
It provide prior_stage_fdt_address which offer a temporary
memory address to keep the dtb address passing from loader(gdb)
to u-boot with a1.

So passing via a2 and CONFIG_SYS_SDRAM_BASE is redundant and
can be removed. And it also somehow may corrupted BBL if it
was be arranged in CONFIG_SYS_SDRAM_BASE.

In board_fdt_blob_setup()
When boting from ram:
prior_stage_fdt_address will be use to reserved dtb temporarily.

When booting from ROM:
dtb will be pre-burned in CONFIG_SYS_FDT_BASE, if it is flash base.
Or CONFIG_SYS_FDT_BASE maybe a memory map space (NOT RAM or ROM)
which is provided by HW.

Signed-off-by: Rick Chen &lt;rick@andestech.com&gt;
Cc: Greentime Hu &lt;greentime@andestech.com&gt;
</content>
</entry>
</feed>
