-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docsite content: hardware: instructions if board not in the list #316
Comments
We have this porting page. Questions:
@lsf37 @Indanz @Ivan-Velickovic @gernotheiser @wom-bat opinions? |
No, I did start making the page up to date a while ago. I can't find the changes right now but I'll have a look when I get back from leave in a week and make a PR.
I can add instructions for RISC-V but I don't have enough knowledge for x86. Someone else would probably have to do that part.
I think the porting page should also contain what is necessary to have it accepted by the Foundation. Right now it isn't clear to me if porting just the kernel is sufficient or if contributing platform support should also contain changes for sel4test etc. This becomes more complicated now with seL4 Microkit as well. I guess it's not fair to expect contributors to add support to projects that they don't plan to use (e.g sel4test or Microkit) but at the same time that will make the eco-system more fragmented. |
The TSC discussed this back in Feb 2021 and reached he following conclusion:
Note that this was back in D61 times still and could be revisited. In general, the goal is not to receive as many platform ports as possible. Each new port adds maintenance work for a very small set of people. The only way this can scale is if the set of people who maintain code increases with the set of contributions. "Platform owner" is not quite the same as criteria for accepting a platform port, but we should minimise accepting unmaintained ports, so either we maintain ourselves and have the necessary hardware, or there needs to be an owner for a new port that comes in. The absolute minimum for a new port should be that it passes sel4test and sel4bench, otherwise it's not even clear which features are there. Adding further things like CAmkES, VMs, microkit, etc could (maybe should) be optional, but from the perspective of people wanting to use a port, it's very annoying if we have a big table of supported platforms when then most of the infrastructure then doesn't work for it. |
Ah okay I did not realise it was something the TSC has already discussed. I couldn't find this information myself so I think whatever the TSC decides on should be either linked to from the porting page or on the porting page itself. |
Agreed, I should definitely put this somewhere more public. |
No, I don't think so. Porting it yourself is only one of the options. And there are also different kind of porting: Porting to a new architecture, porting to a new CPU, porting to a new board with existing SoC, porting to a new SoC. First thing should be to see if an already supported platform uses the same SoC and if so, adjust for the changes with an external DTS file.
I think so yes.
That too, but it should be on the porting page.
ARM and RISC-V don't have a standardised system platform like x86 has. For those it's pretty much necessary to compile per platform. x86 historically never needed a binary per platform, all differences are runtime discoverable, from PCI devices to CPU features. So there is no need to "port" from one x86 platform to another, they should all be pretty compatible. That said, there are vendor and CPU generation specific features for e.g. virtualisation and IOMMU which currently only have some Intel support and nothing for AMD. So porting on x86 means adding support for newer features, which then can be used on all platforms having those features, while porting on ARM/RISC-V usually implies adding support for a specific platform. Because of this, unlike ARM/RISC-V, where people expect to need to put some effort in before being able to use seL4, x86 users just expect things to work and aren't as quickly inclined to put the effort into making their use case work themselves.
I disagree strongly with this. If you want people to use seL4 more widely, you need as many platforms as possible. Also, the more platforms are supported, the more cpu versions and uart/timer drivers will be implemented, reducing the effort for future ports. That said, I don't think it's necessary to actively support hardware that's not for sale any more. For AArch64 for instance, a platform port isn't that much work, except if it uses a yet unsupported CPU or interrupt controller. For user space it's pretty much limited to adding timer and UART drivers. However, because the build system does things per platform, it's not easy to just configure a user's board and build for that, it needs to be added explicitly. To me it would make more sense if seL4 had generic support for different cpu types etc. and had example configurations for specific boards. That's more or less what we have now, but AFAIK there's no way for a user to build seL4 without selecting a platform specifically and setting the variables normally set in config.cmake. For ARM and RISC-V it would make much more sense to do things per range of SoCs, instead of per board.
But all those configurations are almost platform independent. The only addition MCS has is that the timer needs to be reconfigurable, so it might stress the timer driver more and flush out bugs there (but modern hardware has standardised system timers). The hardware specific part of multicore support is mostly the cache synchronisation instructions, but otherwise it should also be platform independent. IOMMU and VCPU need specific hardware support, but those are, like multicore, architecture dependent, not platform dependent. seL4 currently misses a low level hardware test which tests whether all the low-level hardware functionality does what the seL4 kernel assumes it does. If we had that, testing whether a specific platform works could be much quicker. Easier said than done to implement this though, bugs can be subtle or timing sensitive and some features may just be impossible to test.
Infrastructure should be independent from ports. Other than missing timer and UART drivers, which are easily copied from sel4test/sel4bench, what's needed for basic support for CAmkES, VMs, microkit? Users probably have to update the DTS file for their usage anyway. I think the requirements for a new platform should depend on how much it differs from already supported ones. If the changes are limited to src/plat/ and a UART driver, the bar should be very low (sel4test and sel4bench passing). The more changes or new hardware types added, the higher the bar. For new hardware the Foundation should get a board for the CI system. The TSC list of requirements sounds like something that should be required for things like Morello support. But if you want people to contribute ports at all, the bar shouldn't be that high for most ports. |
Thanks @Ivan-Velickovic @Indanz and @lsf37 for your comments. Trying to summarise (feel free to comment): we should have a porting page, linked from the hardware page, that has:
@Ivan-Velickovic when do you think you will be able to have that done? Do you think you could have it done in the next 3-4 weeks? Let us know if you need help. Once it's done I'll work on drafting the extra info above aiming to have it all done by mid March to fit in the project. @Indanz you raise a number of other points, which I don't know enough about to comment on. Waiting on @lsf37 to comment :) |
I'll do it tomorrow, thanks for reminding me. |
@Ivan-Velickovic this seems to still be open. Would you be able to have it updated as soon as you can (for Arm and RISC-V)? It is part of the NCSC deliverable. Thanks! |
Other than that, the rest should now be done in this PR: seL4/docs#230 I've re-used the kernel contribution code, which was very detailed but not in any sub-menu and only linked (AFAICT) from the Tutorial's page. |
On https://docs.sel4.systems/Hardware/ we want to have instructions on what to do if the board you want is not in the list.
The text was updated successfully, but these errors were encountered: