AMP on Freedom U500

Hello all,

Is it possible to run multiple OSes in AMP mode on U500 platform?

Thanks,
Badal

By AMP do you mean assymetric multiprocessor, or something else?

At the moment, linux does not work on even SMP due to software problems that we are working on. If linux does not work, I find it unlikely that any other OS works.

Krste thinks you meant running multiple OSes where some are secure real time and others not. In that case, the answer is that the hardware can do it, but there is no software support for hypervisor mode written yet.

ā€œtime for community to get to workā€¦ā€ ā€” Krste Asanovic

Thanks for reply Welsley.

Just an update; SMP linux has been working for some weeks now.

Should SMP Linux work with the rocket-chip pointed to by freedom master? Iā€™m able to boot the freedom-u-sdk bbl with 2 processors on spike, but when I try to boot SMP Linux with 2 Rocket tiles I either get a hang or a kernel NULL pointer dereference. The same rocket configuration is able to boot the non-SMP kernel.

I think the problem could be related to my additions for the PLIC to the configstring for the second core. I understand the configstring has been replaced now, but is there an example configstring for 2 Tile U500 on the current freedom master?

Thanks a lot!

Rocket-chip head implements the priv-1.10 specification. You will need to use the priv-1.10 branches of riscv-linux and spike to match.

FYI the config string does not exist anymore. spike, rocket, and linux after priv-1.10 all use device tree.

Right, I was referring to the rocket-chip pointed to by freedom master (https://github.com/ucb-bar/rocket-chip/tree/4146f6a792277297bd80d4b6f1b6f2b3cb0f31d7) and the freedom-u-sdk master (not the priv-1.10 branch).

Iā€™m fine with waiting until priv-1.10 is merged if it is non-trivial to get the SMP boot working with the current freedom repo pointers. Are there plans to update the freedom repository sometime soon after that point? If not I can go ahead and start working on updating things to track the priv-1.10 branches.

Iā€™m not sure when priv-1.10 will get merged. I believe the blocking issue is documentation.

The freedom-u-sdk/priv-1.10 branch should boot SMP against spike/priv-1.10 and rocket-chip/master. I do not know why the freedom/master and freedom-u-sdk/master donā€™t work together.

In case itā€™s of use to anyone, SMP on rocket-chip/master boots against freedom-u-sdk/priv-1.10 if you bump the riscv-pk submodule.

In case anyone else is porting freedom U500 to other FPGAā€™s, I ported the vc707 dev kit to a Ultrascale 190 on a PCIe card, using the Xilinx DMA driver to load bbl.bin from the x86 host into the DDR4 on the card:

It successfully boots Linux with an 8-core configuration.

2 Likes

Great work Austin! Good to see Freedom platform up and running on a different FPGA platform.

hello Austin,
is your freedom priv-1.10 match with your freedom-u-sdk priv-1.10 version?
Iā€™ve tried you github version of priv-1.10 freedom with vcs simulation, seems there is some boot problem in the bootrom, the bootrom image compiled for vc707 is start from 0x1000, but the bootromā€™s addr in this version of rocket is from 0x10040, so instrction fetched not right. and boot fail.

Also your vu190 freedom has compile errors, like:

[info] Compiling 7 Scala sources to /data/home/user/risc-v/sifive/austin/freedom_vu190/target/scala-2.11/classesā€¦
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:10: object HasPeripheryGPIOModule is not a member of package sifive.blocks.devices.gpio
[error] import sifive.blocks.devices.gpio.{PeripheryGPIOKey, HasPeripheryGPIO, HasPeripheryGPIOBundle, HasPeripheryGPIOModule, GPIOPin, GPIOPinToIOF, GPIOPinIOFCtrl, GPIOInputPinCtrl, JTAGPinsIO, JTAGGPIOPort}
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:11: object HasPeripheryMockAONModule is not a member of package sifive.blocks.devices.mockaon
[error] import sifive.blocks.devices.mockaon.{PeripheryMockAONKey, HasPeripheryMockAON, HasPeripheryMockAONBundle, HasPeripheryMockAONModule, MockAONWrapperPadsIO}
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:12: object HasPeripheryPWMModule is not a member of package sifive.blocks.devices.pwm
[error] import sifive.blocks.devices.pwm.{PeripheryPWMKey, HasPeripheryPWM, HasPeripheryPWMBundle, HasPeripheryPWMModule, PWMGPIOPort}
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:13: object HasPeripherySPIModule is not a member of package sifive.blocks.devices.spi
[error] import sifive.blocks.devices.spi.{PeripherySPIKey, HasPeripherySPI, HasPeripherySPIBundle, HasPeripherySPIModule, PeripherySPIFlashKey, HasPeripherySPIFlash, HasPeripherySPIFlashBundle, HasPeripherySPIFlashModule, SPIPinsIO, SPIGPIOPort}
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:14: object HasPeripheryUARTModule is not a member of package sifive.blocks.devices.uart
[error] import sifive.blocks.devices.uart.{PeripheryUARTKey, HasPeripheryUART, HasPeripheryUARTBundle, HasPeripheryUARTModule, UARTGPIOPort}
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:19: not found: type PeripheryDebugBundle
[error] trait PeripheryDebugTRSTnBundle extends PeripheryDebugBundle {
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:20: not found: value p
[error] override val jtag = (p(IncludeJtagDTM)).option(new JTAGIO(hasTRSTn = true).flip)
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:43: not found: type BaseTop
[error] class E300ArtyDevKitSystem(implicit p: Parameters) extends BaseTop
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:44: not found: type PeripheryBootROM
[error] with PeripheryBootROM
[error] ^
[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/everywhere/e300artydevkit/Top.scala:45: not found: type PeripheryDebug
[error] with PeripheryDebug

please have a check thanks.

I didnā€™t update everything for the vc707 and the arty as I donā€™t actually have them, so only the vu190 works. With some more recent changes to rocket-chip and sifive-blocks, the vc707 and arty donā€™t compile and I havenā€™t bothered fixing them in the vu190 branch. So if you just temporarily remove those folders, everything in the u500vu190devkit directory should compile.

Hi Austin;
thanks for quick reply.
i have tried this again, by rm the target/builds/project dir, still these errors got.

[error] /data/home/user/risc-v/sifive/austin/freedom_vu190/src/main/scala/unleashed/u500vc707devkit/Top.scala:113: type mismatch;
[error] found : sifive.freedom.unleashed.u500vc707devkit.U500VC707DevKitSystem
[error] required: T
[error] val sys = Module(LazyModule(new U500VC707DevKitSystem).module)
[error] ^
[error] 56 errors found
[error] (freedomPlatforms/compile:compileIncremental) Compilation failed
[error] Total time: 12 s, completed Jun 23, 2017 10:24:34 PM
make: *** [/data/home/user/risc-v/sifive/austin/freedom_vu190/builds/u500vu190devkit/sifive.freedom.unleashed.u500vu190devkit.U500VU190DevKitConfig.fir] Error 1

user@ubuntu14 2021 22:24:34 /data/home/user/risc-v/sifive/austin/freedom_vu190
$ git status
On branch vu190
Your branch is up-to-date with ā€˜origin/vu190ā€™.

nothing to commit, working directory clean

Not the target directory. Literally remove all the scala source code in src/main/scala/unleashed/u500vc707devkit and src/main/scala/everywhere/e300artydevkit so that you are only building the u500vu190devkit code.

Iā€™ve rm these dir , and it works!

by the way, is the freedom-u-sdk under your git you build the bbl.bin?
for using the Xilinx DMA driver to load bbl.bin from the x86 host into the DDR4, where i can get the driver?

thanks for instruction!

Yes, that freedom-u-sdk on priv-1.10 branch should work.

https://www.xilinx.com/support/answers/65444.html

You can send me a PM if you need further help with it.