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

panic: use a platform-specific halt routine #496

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

msft-jlange
Copy link
Collaborator

Not all platforms support HLT as a way to halt execution, and therefore the panic halt must be performed through a platform-specific routine. However, at the time of a panic, the global platform object may not yet be initialized. Instead, use a more primitive mechanism for choosing a platform-specific halt routine during panic.

@msft-jlange msft-jlange force-pushed the platform_hlt branch 2 times, most recently from ec465c7 to 5fd436d Compare October 24, 2024 14:23
Copy link
Member

@joergroedel joergroedel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general it looks good, I left a minor change request and a more general comment that does not need to be addressed when updating this PR.

kernel/src/platform/native.rs Outdated Show resolved Hide resolved
kernel/src/svsm.rs Outdated Show resolved Hide resolved
kernel/src/platform/mod.rs Outdated Show resolved Hide resolved
kernel/src/platform/native.rs Outdated Show resolved Hide resolved
Not all platforms support HLT as a way to halt execution, and therefore
the panic halt must be performed through a platform-specific routine.
However, at the time of a panic, the global platform object may not yet
be initialized.  Instead, use a more primitive mechanism for choosing a
platform-specific halt routine during panic.

Signed-off-by: Jon Lange <[email protected]>
Copy link
Member

@joergroedel joergroedel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me now.

@joergroedel joergroedel merged commit 91aebf4 into coconut-svsm:main Oct 30, 2024
3 checks passed
@msft-jlange msft-jlange deleted the platform_hlt branch October 30, 2024 14:37
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.

3 participants