Skip to content

feat: implement divide-error exception handler - #34

Open
cellrishi-code wants to merge 7 commits into
feat/exception-handlersfrom
feat/divide-error-handler
Open

cellrishi-code wants to merge 7 commits into
feat/exception-handlersfrom
feat/divide-error-handler

Conversation

@cellrishi-code

Copy link
Copy Markdown
Owner

Summary

Adds the x86_64 divide-error (#DE / vector 0) exception path to Rustalis.

Changes

  • Register a dedicated divide-error handler in the static IDT.
  • Log the faulting RIP and code segment before entering the kernel panic path.
  • Add unit coverage verifying the #DE IDT entry is populated.
  • Add an opt-in divide-error-self-test feature using Rust inline assembly to intentionally trigger integer division by zero.
  • Compile both exception self-test features in CI.
  • Document the new exception boundary and self-test.

Closes #32

Dependency

This is a stacked PR on #33 (feat/exception-handlers). Once #33 is merged, this PR can be retargeted to main and merged independently.

The normal boot path does not intentionally trigger a divide error.

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.

1 participant