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

Move architecture-dependent debugging print code to arch/cortex-m #1115

Merged
merged 2 commits into from
Aug 16, 2018

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Jul 14, 2018

Pull Request Overview

This pull finishes up #1113 by moving the SCB_REGISTERS variable to the cortex-m crate and all of the printing code that is architecture specific to the cortex-m crate.

I believe this is the last step to having process.rs be architecture agnostic.

Blocked on #1113.

Testing Strategy

This pull request was tested by running crash dummy and hail on hail and seeing the panic output.

TODO or Help Wanted

n/a

Documentation Updated

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

Formatting

  • Ran make formatall.

bradjc added a commit that referenced this pull request Jul 17, 2018
@bradjc bradjc changed the title Move arch-specific debugging print to cortex-m crate Move architecture-dependent debugging print code to arch/cortex-m Jul 17, 2018
@bradjc bradjc mentioned this pull request Jul 18, 2018
2 tasks
@ppannuto ppannuto added the blocked Waiting on something, like a different PR or a dependency. label Jul 18, 2018
bradjc added a commit that referenced this pull request Jul 31, 2018
@bradjc bradjc force-pushed the arch-agnostic7 branch 2 times, most recently from e63317f to 98129d5 Compare August 13, 2018 18:21
@bradjc
Copy link
Contributor Author

bradjc commented Aug 13, 2018

Ok please review! This moves the arch-specific debug printing to the arch crate.

@bradjc bradjc removed the blocked Waiting on something, like a different PR or a dependency. label Aug 13, 2018

/// Display architecture specific (e.g. CPU registers or status flags) data
/// for a process identified by its stack pointer.
unsafe fn print_process_arch_detail(
Copy link
Member

Choose a reason for hiding this comment

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

my only complaint is the difference in naming between this method ( print_process_arch_detail) and fault_str. They do similar things---write a formatted string out to a Write, but one is print_ and the other is _str. Maybe fault_fmt and process_detail_fmt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@bradjc
Copy link
Contributor Author

bradjc commented Aug 14, 2018

This PR isn't very exciting, and really should go quickly with #1113. So last call (it has been open for a month now).

@bradjc bradjc added the last-call Final review period for a pull request. label Aug 14, 2018
@bradjc
Copy link
Contributor Author

bradjc commented Aug 16, 2018

bors r+

bors bot added a commit that referenced this pull request Aug 16, 2018
1115: Move architecture-dependent debugging print code to arch/cortex-m r=bradjc a=bradjc

### Pull Request Overview

This pull finishes up #1113 by moving the `SCB_REGISTERS` variable to the cortex-m crate and all of the printing code that is architecture specific to the cortex-m crate.

I believe this is the last step to having process.rs be architecture agnostic.

~~Blocked on #1113.~~


### Testing Strategy

This pull request was tested by running crash dummy and hail on hail and seeing the panic output.


### TODO or Help Wanted

n/a


### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make formatall`.


Co-authored-by: Brad Campbell <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 16, 2018

Build succeeded

@bors bors bot merged commit ae001a8 into master Aug 16, 2018
@bors bors bot deleted the arch-agnostic7 branch August 16, 2018 02:07
bors bot added a commit that referenced this pull request Aug 16, 2018
1121: Kernel: add comments r=alevy a=bradjc

### Pull Request Overview

This pull request:

- Adds comments to data structures in the kernel.
- ~~Removes the need for `Callback` to be `mut` (which has ramifications for the capsules).~~
- ~~Removes the need for `Allocator` to be `mut`.~~

~~Blocked on #1115.~~

### Testing Strategy

This pull request was tested by compiling.


### TODO or Help Wanted

n/a


### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make formatall`.


Co-authored-by: Brad Campbell <[email protected]>
@cmcavity cmcavity mentioned this pull request Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call Final review period for a pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants