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

diagnose: support newer kernels #484

Merged
merged 3 commits into from
Apr 25, 2024
Merged

diagnose: support newer kernels #484

merged 3 commits into from
Apr 25, 2024

Commits on Apr 22, 2024

  1. diagnose: support newer kernels

    Currently, the `humility diagnose` command contains its own code for
    looking up the task table. This code only uses the `TASK_TABLE_BASE`
    symbol used by older kernels, and does not look for the
    `TASK_TABLE_SPACE` symbol used by newer kernels. This means that on a
    recent kernel, the `diagnose` command will fail:
    
    ```console
    $ humility -t gimletlet diagnose
    humility: attached to 0483:3754:000B00154D46501520383832 via ST-Link V3
    
    --- Initial Inspection ---
    
    Taking initial snapshot of task status...
    humility diagnose failed: expected symbol TASK_TABLE_BASE not found
    
    ```
    
    This commit changes `humility diagnose` to use the
    `HubrisArchive::task_table` method to look up the task table, instead.
    Unlike the previous code, this method will look for both the
    `TASK_TABLE_BASE` and `TASK_TABLE_SIZE` symbols of older kernels, _and_
    the `TASK_TABLE_SPACE` symbol of newer kernels. Now, it works for my
    recent Hubris build:
    
    ```console
    $ humility -t gimletlet diagnose
    humility: attached to 0483:3754:000B00154D46501520383832 via ST-Link V3
    
    --- Initial Inspection ---
    
    Taking initial snapshot of task status...
    System last rebooted 791183 ticks ago; assuming tick=millisecond, 791.183s ago
    Snapshot taken, 25 tasks in application.
    
    --- Tasks: First Pass ---
    
    Checking for any suspicious task attributes...
    
    --- Advancing Time ---
    
    Resuming core for a bit...
    Core halted after 1001 more ticks.
    
    --- Tasks: Second Pass ---
    
    --- Generating Coredump ---
    
    humility: dumping to hubris.core.0
    humility: dumped 731.46KB in 29 seconds
    Leaving CPU halted in case you want to inspect.
    
    --- End Of Report ---
    
    ```
    
    Fixes #483
    hawkw committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    d9f19c6 View commit details
    Browse the repository at this point in the history
  2. rm error context

    the error from `task_table` is actually already more descriptive
    hawkw committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    f6b13cd View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. Configuration menu
    Copy the full SHA
    d3dde7a View commit details
    Browse the repository at this point in the history