Skip to content
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

Add GICv3 and UARTs to the morello board #229

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

damaki
Copy link

@damaki damaki commented Jul 27, 2023

This adds support for the interrupt controller (GICv3) and the three PL011 UARTs on the emulated morello board. The purpose is to improve the emulation for bare-metal applications running on the morello board which use interrupts (e.g. timers) and UART communications.

The configuration of the GICv3 and UARTs is based on the code in the "virt" machine (hw/arm/virt.c).

@jrtc27
Copy link
Member

jrtc27 commented Jul 27, 2023

If you need the morello board you probably should be using the FVP, otherwise you should be using the virt board. It exists solely to be able to run the conformance tests. Our goal for Morello QEMU is purely ISA emulation, not also peripherals.

@arichardson
Copy link
Member

I think it's useful to have both a "Morello ISA" model (board=virt?) and a model that mostly approximates the real hardware. Obviously we won't emulate everything (GPU/Network/etc.) but if it's this simple to add some of the other peripherals I don't see why not?

@damaki
Copy link
Author

damaki commented Jul 27, 2023

Thanks for the feedback!

Our testing infrastructure is based around QEMU, and the FVP is unfortunately too heavy for our needs.

The virt board is unsuitable for our purposes since we're targeting a bare-metal environment and need something a bit more representative of the Morello board to run our bare-metal Ada language conformance tests. The only peripherals we need to support our bare-metal conformance tests are the interrupt controller (GICv3) and UART, and it was quite simple to add support for them.

@arichardson
Copy link
Member

I don't think this does any harm, so I'd be happy to merge it (assuming the addresses are correct - not managed to check that). I do agree that the virt board is probably better to be used in most cases.

@jrtc27
Copy link
Member

jrtc27 commented Jul 27, 2023

My concern is feature creep for something that was never meant to be used in any situation other than running the compliance tests. I don't think we want to be supporting people actually using it outside of that? It should probably have been named morello-ack from the start. After all, it's got a (cut-down) trickbox in there that doesn't exist in the real hardware.

@jrtc27 jrtc27 changed the base branch from qemu-cheri to dev July 27, 2023 19:43
@arichardson
Copy link
Member

My concern is feature creep for something that was never meant to be used in any situation other than running the compliance tests. I don't think we want to be supporting people actually using it outside of that? It should probably have been named morello-ack from the start. After all, it's got a (cut-down) trickbox in there that doesn't exist in the real hardware.

That's a good point (although the trickbox is not there by default if I read the code correctly). I am a bit conflicted here, but I think having the Morello machine type more closely match HW is a good thing. That said, ideally your OS/baremetal application should try to discover the addresses of peripherals instead of relying on hardocded values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants