Skip to content

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

Open
astalke wants to merge 5 commits into
masterfrom
astalke/RTOS-841
Open

hal/ia32: Extend exception context, when DEBUG flag is set#559
astalke wants to merge 5 commits into
masterfrom
astalke/RTOS-841

Conversation

@astalke
Copy link
Copy Markdown
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

Comment thread hal/ia32/exceptions.c
Comment thread hal/ia32/exceptions.c Outdated
Comment thread hal/ia32/exceptions.c
Comment thread hal/ia32/exceptions.c
astalke added 4 commits June 10, 2024 12:15
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
@astalke astalke force-pushed the astalke/RTOS-841 branch from db5d463 to afdb553 Compare June 10, 2024 10:15
@github-actions
Copy link
Copy Markdown

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.

2 participants