Updated bootloader for hardware

116 views
Skip to first unread message

Justin Tullos

unread,
Apr 15, 2020, 11:35:26 AM4/15/20
to Keystone Enclave Forum
Hello,

Has there been any more push to update the FSBL from the U540 platform, or work on moving to the other boot platforms?

I was following some of the conversations on the SiFive forums regarding the U540 FSBL and Keystone, but wasn't sure if there was any active development for hardware. 

Thank you,
Justin

David William Kohlbrenner

unread,
Apr 21, 2020, 8:25:04 PM4/21/20
to Justin Tullos, Keystone Enclave Forum
Hi,
The current U540 bootloader we have in our repositories will work for a hifive unleashed development board.
We'll be adding support for other Linux-booting board's bootloaders as they become available.

Are there any issues you are having with the current bootloader?

-David

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/2fc4ac82-2901-440d-8fac-cc8d8f6d0290%40googlegroups.com.

Justin Tullos

unread,
Apr 21, 2020, 9:20:59 PM4/21/20
to Keystone Enclave Forum
Hey David,

I was having issues with getting it to work with a VCU118 FPGA based on the instructions MCD500 posted for Keystone. The ZSBL was having problems copying the FSBL from the SD card. I even verified the DTB, checked out the memory mappings, verified the addresses in the elf file. The ZSBL initialized the SD card correctly, but returns Error 0xa for SD copy error.

But I was able to get ahold of another VC707, and it works just fine at 50MHz. So I'll work on the timing issue another day with the VCU118.

I was trying to get Keystone running at 100MHz with the VC707, and it loads and boots up into Linux until the serial driver loads and the output gets corrupted. I'm thinking it's because I built the SiFive Keystone build. Or some timing that gets changed with that driver.

David William Kohlbrenner

unread,
Apr 22, 2020, 2:18:02 PM4/22/20
to Justin Tullos, Keystone Enclave Forum
Unfortunately due to quarantine we don't have access to our FPGAs, so I can't try things out.
I don't know when we'll regain access, but it is likely to be some time.
Glad to hear the 50MHz on the 707 is working though.

Hopefully someone else on the list has access to similar boards and can help.

Good luck,
David

-David

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

Justin Tullos

unread,
Apr 23, 2020, 7:50:49 AM4/23/20
to Keystone Enclave Forum
Not a problem! 

It sounds like the same issue that others were having due to the 5.3 Linux Kernel, even in this group: https://groups.google.com/forum/#!topic/keystone-enclave-forum/v4LmMf-0vOg

But that's for someone using the FU540. 
I took a look at the DTS in /linux/arch/riscv/boot and made some changes to align with the VC707 DTS, but still no fix for the UART. After building BBL with --enable print device tree, I realized the DTS got passed to the Linux kernel from the FSBL. But everything looks correct so far. Attached is what it looks like once the booting hits 8250/16550 driver. 


On Wednesday, April 22, 2020 at 2:18:02 PM UTC-4, David William Kohlbrenner wrote:
Unfortunately due to quarantine we don't have access to our FPGAs, so I can't try things out.
I don't know when we'll regain access, but it is likely to be some time.
Glad to hear the 50MHz on the 707 is working though.

Hopefully someone else on the list has access to similar boards and can help.

Good luck,
David

-David

On Tue, Apr 21, 2020 at 6:21 PM Justin Tullos <jctu...@gmail.com> wrote:
Hey David,

I was having issues with getting it to work with a VCU118 FPGA based on the instructions MCD500 posted for Keystone. The ZSBL was having problems copying the FSBL from the SD card. I even verified the DTB, checked out the memory mappings, verified the addresses in the elf file. The ZSBL initialized the SD card correctly, but returns Error 0xa for SD copy error.

But I was able to get ahold of another VC707, and it works just fine at 50MHz. So I'll work on the timing issue another day with the VCU118.

I was trying to get Keystone running at 100MHz with the VC707, and it loads and boots up into Linux until the serial driver loads and the output gets corrupted. I'm thinking it's because I built the SiFive Keystone build. Or some timing that gets changed with that driver.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.
Capture.PNG

Justin Tullos

unread,
Apr 23, 2020, 4:00:37 PM4/23/20
to Keystone Enclave Forum
Hey David,

I figured out the issue. 

I forgot to compile the FSBL when generating the bitstream with the official gcc, and it was compiling with the one in Keystone. So far so good now, I have the VC707 running at 100MHz just fine.

David William Kohlbrenner

unread,
Apr 23, 2020, 4:03:26 PM4/23/20
to Justin Tullos, Keystone Enclave Forum
Thats great!
Glad it worked out. If there is a specific list of steps you had to take, please let us know and we can add them to our documentation.

-David

On Thu, Apr 23, 2020 at 1:00 PM Justin Tullos <jctu...@gmail.com> wrote:
Hey David,

I figured out the issue. 

I forgot to compile the FSBL when generating the bitstream with the official gcc, and it was compiling with the one in Keystone. So far so good now, I have the VC707 running at 100MHz just fine.

On Thursday, April 23, 2020 at 7:50:49 AM UTC-4, Justin Tullos wrote:
Not a problem! 

It sounds like the same issue that others were having due to the 5.3 Linux Kernel, even in this group: https://groups.google.com/forum/#!topic/keystone-enclave-forum/v4LmMf-0vOg

But that's for someone using the FU540. 
I took a look at the DTS in /linux/arch/riscv/boot and made some changes to align with the VC707 DTS, but still no fix for the UART. After building BBL with --enable print device tree, I realized the DTS got passed to the Linux kernel from the FSBL. But everything looks correct so far. Attached is what it looks like once the booting hits 8250/16550 driver. 

On Wednesday, April 22, 2020 at 2:18:02 PM UTC-4, David William Kohlbrenner wrote:
Unfortunately due to quarantine we don't have access to our FPGAs, so I can't try things out.
I don't know when we'll regain access, but it is likely to be some time.
Glad to hear the 50MHz on the 707 is working though.

Hopefully someone else on the list has access to similar boards and can help.

Good luck,
David

-David

On Tue, Apr 21, 2020 at 6:21 PM Justin Tullos <jctu...@gmail.com> wrote:
Hey David,

I was having issues with getting it to work with a VCU118 FPGA based on the instructions MCD500 posted for Keystone. The ZSBL was having problems copying the FSBL from the SD card. I even verified the DTB, checked out the memory mappings, verified the addresses in the elf file. The ZSBL initialized the SD card correctly, but returns Error 0xa for SD copy error.

But I was able to get ahold of another VC707, and it works just fine at 50MHz. So I'll work on the timing issue another day with the VCU118.

I was trying to get Keystone running at 100MHz with the VC707, and it loads and boots up into Linux until the serial driver loads and the output gets corrupted. I'm thinking it's because I built the SiFive Keystone build. Or some timing that gets changed with that driver.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/245ca8e9-f212-4f1f-a4d2-75f9ab3384cc%40googlegroups.com.

Justin Tullos

unread,
Apr 23, 2020, 6:28:36 PM4/23/20
to Keystone Enclave Forum
David,

Definitely. I plan to make some additions to the make file in the FSBL and I can pass them along soon. 

Justin
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

Troy Benjegerdes

unread,
Apr 24, 2020, 8:32:27 AM4/24/20
to Justin Tullos, Keystone Enclave Forum
Is this based on the SiFive FSBL? 

What would you need to support U-boot for keystone?

I would like to try to collect all of these things into a single wrapper that you can run a git clone and type 'make' and get a useful result. I used to maintain a branch of the sifive freedom-u-sdk to do that, is there something else that might be a better top-level?

I'm also somewhat familiar with https://github.com/ucb-bar/chipyard , although it's got a bit of a problem now since the rocket-chip version it uses has not kept up with SiFive's changes.

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/8f2d6ecc-36a7-4993-9e0c-44123f4256b4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages