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

hal/ia32: Extend exception context, when DEBUG flag is set #559

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

astalke
Copy link
Contributor

@astalke astalke commented Jun 10, 2024

Description

This PR adds additional information to exception dump, when DEBUG flag is set during compilation.
List of important changes:

  • Add FPU context to dump (included only if FPU was used by a program)
  • Add cr0, cr3 and c4 registers to dump
  • Add error code for exceptions that include it and it is useful (so there is no displayed error code for double fault, because it is always 0)
  • Fix some minor issues: incorrect mnemonic for double fault and lack of static keyword for _exceptions_setIDTStub

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: ia32-generic-qemu

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

hal/ia32/exceptions.c Show resolved Hide resolved
hal/ia32/exceptions.c Outdated Show resolved Hide resolved
hal/ia32/exceptions.c Show resolved Hide resolved
Some exceptions include an error code, this change adds the display of
this code if DEBUG is set.

JIRA: RTOS-841
This change adds cr0, cr3 and cr4 to exception description, when DEBUG
flag is set.

JIRA: RTOS-841
Function `_exceptions_setIDTStub` is not used outside of exceptions.c,
so it should be static.

JIRA: RTOS-841
Double Fault had an incorrect mnemonic #BF, changed it to #DF

JIRA: RTOS-841
Copy link

Unit Test Results

7 460 tests  ±0   6 745 ✅ ±0   37m 26s ⏱️ - 1m 43s
  420 suites ±0     715 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit afdb553. ± Comparison against base commit 7634e1e.

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.

None yet

1 participant