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

kernel: process: omit debug addrs for fixed apps #1930

Merged
merged 2 commits into from Jul 10, 2020

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Jun 12, 2020

If an app is compiled for a fixed address, then we do not need to custom make an LST file based on where it actually executed. The make lst command will work just fine. This updates the message that is printed on a panic for apps which are compiled with fixed addresses.

Testing Strategy

This pull request was tested by verifying the correct message is printed on hail.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Our example panic printout is still valid since the PIC app version did not change.

Formatting

  • Ran make prepush.

@bradjc bradjc added the kernel label Jun 12, 2020
kernel/src/process.rs Outdated Show resolved Hide resolved
kernel/src/process.rs Show resolved Hide resolved
brghena
brghena previously approved these changes Jun 12, 2020
/// Return Ok(Flash Address, RAM address) if this app has
/// fixed_addresses, Err(()) otherwise.
fn check_for_fixed_address(flash: &'static [u8]) -> Result<(u32, u32), ()> {
// Need to re-parse the TBF header to find if this app has fixed
Copy link
Member

Choose a reason for hiding this comment

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

This feels like a lot of work and non-trivial duplicated logic. Wouldn't it be easier to just store whether the app is PIC in the struct ProcessDebug ?

Copy link
Contributor Author

@bradjc bradjc Jun 14, 2020

Choose a reason for hiding this comment

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

What would happen if #1830 (or something similar) was merged?

Copy link
Member

Choose a reason for hiding this comment

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

Oy.. preaching to the choir, but oh what a nightmare cfgs are.

By the same token though, if we're in the space-optimized side of the cfg, this whole detail-laden panic handler is gone anyway, right?

If an app is compiled for a fixed address, then we do not need to custom
make an LST file based on where it actually executed. The `make lst`
command will work just fine.
@bradjc
Copy link
Contributor Author

bradjc commented Jul 8, 2020

Ok changed it to save the fixed addresses rather than re-parse them. I don't really know which is better.

@bradjc bradjc force-pushed the kernel-process-make-debug branch from 6565551 to f832848 Compare July 8, 2020 14:48
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit 1c3fc23 into master Jul 10, 2020
@bors bors bot deleted the kernel-process-make-debug branch July 10, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants