-
Notifications
You must be signed in to change notification settings - Fork 101
[RFC] Initial Cortex-A team #207
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
Conversation
@andre-richter Something I think would be useful here, is generating rust readers/writers of the system registers from the System Register XML. I've been meaning to do it for a while but haven't had the time. (Bikeshed) Perhaps "Arm A profile team" may be a better name as I assume you're not just targeting the Cortex brand of CPUs. |
Good point! Such a tool would be very useful to generate the register definitions that I currently maintain manually for the I will add this point when I update the synopsis. Regarding the name: your argument applies for the M and R profile as well, but here teams are called cortex- currently. I think we should sync here first. @japaric? |
Hi @andre-richter, thanks for setting up this proposal! My terminology may not be very precise, but here are some free form thoughts. I would appreciate guidance in massaging these into requirements for the WG, if deemed appropriate. So what I think we need is a way to have Rust 'accessor' APIs for architecturally specified Cortex-A v{7,8} (and others if needed) registers that support access at all exception levels thereby supporting writing bare-metal code for any exception level (secure monitors at EL3, hypervisors at EL2 etc). The suggestion made by @parched is perfect for automating the generation of such accessors. On top of that, I think we need a collection of common Cortex-A bare-metal programming idioms which are common-place in misc bare-metal programs. I mean simple things like identifying the underlying processor type, or the number of processors at the same affinity level. On to incrementally more complex things like 'set me up an N-level page table set to map X bytes from this VA to this PA'. I think there is a fair set of these idioms that can be expressed in a library that lies one level up from the bare accessor lib. Such an aggregation can help localise brittle code and promote re-use for misc projects. While I agree that a lot of operating system boot strap code, for example, tends to be very implementation specific, I would argue that having such a collection of idioms should promote a more standardised construction of such software. From that point on, having bare-metal programs that become consumers of the above would be needed. I would pony up Redox's AArch64 port as one of them where I can envision a lot of stuff from bootstrap, processor bring-up/tear-down via PSCI (another item that could be folded into back-end of the idioms I speak of for things like 'bring up this processor out of reset', or 'get me the set of services supported by secure FW on this system'), page table setup and management etc. Thoughts ? Thanks. |
Oh an @parched, apologies for the ambiguous thumbs up. That was for the XML descriptions idea. |
Thanks Robin.
From a simple project plan perspective, I would envision your input to
translate to something like this:
1. Write the XML tool
2. Feed outputs into the cortex-a crate for the reg access part.
3. The idioms, in my opinion, should go into the crate as well. Code for
common MMU operations like you described. Maybe GIC code as well or at
least in another crate.
3. Keep publishing and providing projects that use these libs. Redox,
raspi3 tutorials, etc.
Cheers,
Andre
Robin Randhawa <[email protected]> schrieb am Di. 11. Sep. 2018 um
12:28:
… Oh an @parched <https://github.com/parched>, apologies for the ambiguous
thumbs up. That was for the XML descriptions idea.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#207 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AD8E1d6jWnCVZnkQ5ULBsvJM2_M8AyVqks5uZ5AzgaJpZM4WgbK2>
.
|
Thanks @andre-richter. Yes, that sounds right. Agree with the keeping the idioms in the crate. And yes, GIC related idioms are a good fit too. How should we proceed from this point on ? I assume there is some process to follow to kind of formalise things ? |
@raw-bin I updated the initial comment with the proposed content. I propose to proceed the following way:
|
Sounds good. I'll ping @wizofe. I understand he's super pre-occupied with his day job for a couple of months but agree that it would be good to know if he has any agenda items. I am happy to help break things down or detail items. Please let me know as and when you need that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff. I've worked with Cortex-A processors a fair amount the past several years doing Linux/Android bringup (U-Boot, OP-TEE, etc.) and will contribute what knowledge I have when relevant.
The proposed team and initial set of projects/goals seem like a good place to focus starting out and it is exciting to hear about the interest in Rust on the Cortex-A metal.
Couldn't get a response from @wizofe. Probably best to move along. If there's an update from him we can consider rolling it in as appropriate. |
I'm potentially interested but I don't think I'll have time for any code contributions for now as I have some other Rust projects I'm working on. I'm happy to participate in reviews and discussions though :). |
@parched Review duty is fine. Since I understand you also work for ARM, this will be a very helpful to us.
I removed the draft state, we are open for approvement. CC @rust-embedded/all |
Very exciting news @andre-richter, @raw-bin @posborne and @parched. I apologise for my delay, but indeed as Robin said, the next two months are looking quite difficult for me there's currently a Shenzhen production crisis! From my side I am very keen on helping with creating and documenting projects that use those libs, both in Redox (which I need to extend what I've done until now) and the Raspberry Pi (that's my working every day platform and where our product and OS is based on!). On that note, I am very happy to maintain and extend Andre's great
This 'XML tool' sounds also something I could do and it's on my skill level; I would be happy to get some more guidance on this and how to approach it. Looking forward! Rgrds, Ioannis |
I didn't know @parched works for Arm! That makes two of us! :) I'll reach out to him! Between us we should be able to provide any guidance/support from the mothership as needed. |
We're a bit stalled here. Kindly ask you to make use of your voting rights or propose changes to the RFC. @rust-embedded/all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fine with me! Let me know if you need me to do anything. |
We are at 8 approvals. The current WG size is 22. Four more would be needed for majority. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍lgtm
We have a majority now. bors r+ This RFC clearly shows that we need #206, or something like it. |
207: [RFC] Initial Cortex-A team r=hannobraun a=andre-richter This is a proposal for creating a Cortex-A team. This is based on and will close issue #182. Please refrain from approving until I removed the [DRAFT] from the title and every proposed member has his points on the agenda. @raw-bin, @wizofe and me will be the initial members. The following work is planned for this team: ### Maintain a set of ecosystem crates under the embedded WG - [ ] Write a tool that generates accessors for the ARM System Register XML. - [ ] Move [cortex-a](https://github.com/andre-richter/cortex-a) to the WG and keep extending/completing it. - [ ] If feasible, feed the XML accessors into the crate. - [ ] Add ready-to-use idioms for bare-metal use cases. - [ ] MMU idioms - [ ] GIC idioms - [ ] ...? - [ ] Move [register-rs](https://github.com/rust-osdev/register-rs) to the WG. CC @phil-opp for sign-off. - [ ] Discuss if something the likes of `cortex-m-rt` is feasible for cortex-a. ### Provide resources for learning - [ ] Move [rust-raspi3-tutorial](https://github.com/andre-richter/rust-raspi3-tutorial) to the WG ### Make it possible to build AArch64 kernels / programs on stable. - [ ] Add a `rust-std` component for `aarch64-unknown-none` - [ ] Differentiate into further aarch64 targets, e.g. a non-fp version of `aarch64-unknown-none`, and add them as well. ### Stabilization - [ ] Push for a stable core::arch::arm module (see #63) to make the `cortex-a` crate (see its asm module) work on stable w/o depending on GCC. ------------------ @raw-bin and @wizofe, kindly let me know your agenda points and I will edit them into this comment. I understand your Redox work will most probably be a part of it, but I want to leave it to you guys to describe it. Once we are set, I will remove the [DRAFT] and open this for members to approve. @jamesmunns I tend to agree to your thought about having a microprocessor group. However, I think that cortex-a alone is such a complex architecture, it can easily keep the initial three of us busy for years to come. I would argue that we would need separate teams for PPC, RISC-V and the likes. Co-authored-by: Andre Richter <[email protected]>
Build succeeded |
Let me check if I can move it out of there. I'll add a PR for the proposed crates once I'll have some free cycles :) |
227: Add register-rs to the project list of new Cortex-A team r=andre-richter a=phil-opp The crate is currently hosted under the rust-osdev organization: https://github.com/rust-osdev/register-rs. Moving it to the WG was part of the recently accepted [RFC for a Cortex-A team](#207 (comment)). This PR follows the process outlined in https://github.com/rust-embedded/wg/blob/master/rfcs/0136-teams.md#adopting-projects. cc @andre-richter @japaric Co-authored-by: Philipp Oppermann <[email protected]>
Moving it to the WG was part of the recently accepted [RFC for a Cortex-A team](#207 (comment)). It is currently hosted here: https://github.com/andre-richter/cortex-a
233: Add cortex-a to the project list of the Cortex-A team r=andre-richter a=andre-richter Moving it to the WG was part of the recently accepted [RFC for a Cortex-A team](#207 (comment)). It is currently hosted here: https://github.com/andre-richter/cortex-a Co-authored-by: Andre Richter <[email protected]>
Moving it to the WG was part of the recently accepted [RFC for a Cortex-A team](#207). It is currently hosted here: https://github.com/andre-richter/rust-raspi3-tutorial I think it makes sense to give access to the `cortex-a` and `resources` teams. As discussed in #227 (comment), there's not much sense in re-approving with a majority, so I would go ahead as soon as I have at least one approval.
234: Add rust-raspi3-tutorial to the project list of the Cortex-A team r=hannobraun a=andre-richter Moving it to the WG was part of the recently accepted [RFC for a Cortex-A team](#207). It is currently hosted here: https://github.com/andre-richter/rust-raspi3-tutorial I think it makes sense to give access to the `cortex-a` and `resources` teams. As discussed in #227 (comment), there's not much sense in re-approving with a majority, so I would go ahead as soon as I have at least one approval. Co-authored-by: Andre Richter <[email protected]>
This is a proposal for creating a Cortex-A team.
This is based on and will close issue #182. Please refrain from approving until I removed the [DRAFT] from the title and every proposed member has his points on the agenda.
@raw-bin, @wizofe and me will be the initial members.
The following work is planned for this team:
Maintain a set of ecosystem crates under the embedded WG
cortex-m-rt
is feasible for cortex-a.Provide resources for learning
Make it possible to build AArch64 kernels / programs on stable.
rust-std
component foraarch64-unknown-none
aarch64-unknown-none
, and add them as well.Stabilization
cortex-a
crate (see its asm module) work on stable w/o depending on GCC.@raw-bin and @wizofe, kindly let me know your agenda points and I will edit them into this comment.
I understand your Redox work will most probably be a part of it, but I want to leave it to you guys to describe it.
Once we are set, I will remove the [DRAFT] and open this for members to approve.
@jamesmunns I tend to agree to your thought about having a microprocessor group. However, I think that cortex-a alone is such a complex architecture, it can easily keep the initial three of us busy for years to come.
I would argue that we would need separate teams for PPC, RISC-V and the likes.