g2gps opened a new pull request, #8762: URL: https://github.com/apache/nuttx/pull/8762
## Summary Currently WIP: Add support for the risc-v Litex port for targeting the vexriscv_smp core. Uses the work implemented in #8643, referencing #8602. I'm using the qemu-rv port as inspiration for how everything should be put together, but I'd greatly appreciate feedback on if I'm heading in the correct direction. Obviously, it's a WIP. The build for the non-smp core is broken, and there's a bit hacking here and there. I'm just trying to get something working first. ## Impact On completion, the additions should enable: - Still use the current vexrisc core for 'flat builds' - Use the vexriscv_smp core for a kernel build, build applications against this configuration into a romfs, a run from userspace. Here's what I have working: - Build the kernel. - Build the applications with the exported build, load them into a ramdisk, mount this during the kernel bringup, and launch a application (hello world). - MMU. Here's what's currently not working, or implemented: - I can't seem to set the compare register for m-timer. As a workaround, I'm using the peripheral timer, timer0. - I haven't turned on the MMU. - Interrupts with the PLIC are not reliable. I've had to juggle the the isr dispatch to read the `LITEX_PLIC_CLAIM` register and then offset it. But I'm not sure if this is correct. - I'm finding that there are quite a few not implemented instructions in `arch_elf.c`. I'm adding them in as I come accross them. So far it's enough to get the `hello_world` example up and running. - I'm not certain UART interrupts are working, again back the the PLIC implementation. - `litex_head.S` - Seems to be enough to get things running. But there could be something missing here which is stopping the PLIC from working as expected. - The VPage addresses and ranges I've setup seem to be OK, but I'm not sure if I'm going to run into issues down the line. ## Testing There's currently quite a large set of external tools used for testing. If someone would like to run this locally, I can provide a rundown on request. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
