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

fix(aia): external interrupt priority from PLIC or IMSIC #785

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

sinceforYy
Copy link
Contributor

@sinceforYy sinceforYy commented Jan 17, 2025

  • The current external interrupts come from two sources, PLIC and IMSIC.
    The external interrupt priority number of PLIC is 0, and the external interrupt priority number of IMSIC is 1~2047.
    We use the global variable external_interrupt_select to determine the source of the external interrupt.
    If the external interrupt comes from PLIC, external_interrupt_select = false;
    if the external interrupt comes from IMSIC, external_interrupt_select = true.

  • The case where the priority number is greater than 255 is added to the interrupt priority comparison method.

  • The priority number of each interrupt in the iprios array occupies 8 bits, and its read data is masked by the corresponding bit of the xie register, so when writing the xie register, the read data of the iprios array needs to be updated.

@sinceforYy sinceforYy force-pushed the fix-csr-imsic branch 4 times, most recently from 49a30ac to 1a19e49 Compare January 21, 2025 05:58
* The current external interrupts come from two sources, CLINT and IMSIC.
  The external interrupt priority number of CLINT is 0, and the external interrupt priority number of IMSIC is 1~2047.
  We use the global variable external_interrupt_select to determine the source of the external interrupt.
  If the external interrupt comes from CLINT, external_interrupt_select = false;
  if the external interrupt comes from IMSIC, external_interrupt_select = true.

* The case where the priority number is greater than 255 is added to the interrupt priority comparison method.

* The priority number of each interrupt in the iprios array occupies 8 bits, and its read data is masked by the corresponding bit of the xie register,
  so when writing the xie register, the read data of the iprios array needs to be updated.
@sinceforYy sinceforYy changed the title fix(aia): external interrupt priority from PLIC or IMSIC fix(aia): external interrupt priority from CLINT or IMSIC Jan 21, 2025
@sinceforYy sinceforYy merged commit 3869753 into master Jan 22, 2025
7 checks passed
@sinceforYy sinceforYy deleted the fix-csr-imsic branch January 22, 2025 02:30
@sinceforYy sinceforYy changed the title fix(aia): external interrupt priority from CLINT or IMSIC fix(aia): external interrupt priority from PLIC or IMSIC Jan 22, 2025
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.

2 participants