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

Incomplete GIC / SGI handling #15

Open
reticulatedpines opened this issue Oct 31, 2023 · 0 comments
Open

Incomplete GIC / SGI handling #15

reticulatedpines opened this issue Oct 31, 2023 · 0 comments

Comments

@reticulatedpines
Copy link
Owner

We have a naive software implementation of GIC / SGI handling, see eos_handle_intengine_gic().

Known bugs:

  • doesn't handle nested interrupts
  • sometimes cpu0 will intend to signal cpu1 but win the race and handle its own interrupt (and vice versa)

Currently we create an interrupt with cpu_interrupt(cpu_id, CPU_INTERRUPT_HARD), this presumably is visible to both cores (although you do have to specify a cpu id...) and maybe real SGI aren't? I assume the actual interrupt is some inter-core signal.

Possibly related, we don't store the cpu_id in the interrupt value we send via "iar". This is wrong according to ARM manual on GICC_IAR and GICC_EOIR. Unsure if this is used to route the interrupt or not, maybe it is on real hardware - we're not emulating this.

@reticulatedpines reticulatedpines changed the title Incomplete GIC / SGI handling` Incomplete GIC / SGI handling Oct 31, 2023
reticulatedpines added a commit that referenced this issue Oct 31, 2023
Ugly multi-purpose commit, hard to dis-entangle since
I'm working from a patch file.

Adds minimal support for R5.

New work to improve SGI handling: cpu1 is now successfully
woken from wfi_sinkhole by cpu0!  There are some known
problems:
#15
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

No branches or pull requests

1 participant