diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2012-09-13 17:26:13 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2012-09-21 14:27:08 -0500 |
| commit | f754a2a6f0079f3424e2368ae3c3635ac8440612 (patch) | |
| tree | db7821f2e34e36f40fae69277e0cefb93573adaf /src/kernel/misc.C | |
| parent | 337654733b5bb5ba1a33b41c0fecf78c36185b13 (diff) | |
| download | talos-hostboot-f754a2a6f0079f3424e2368ae3c3635ac8440612.tar.gz talos-hostboot-f754a2a6f0079f3424e2368ae3c3635ac8440612.zip | |
Fixes for winkle state.
The memory profiling tools sometimes encountered a condition where
the kernel stack was becoming corrupted. I tracked it down to the
winkle code storing the winkle-save state at the wrong end of the
stack. Moving the winkle-save area to the bottom of the stack,
which is where I originally intended it to go.
Also noticed that the task issuing the winkle was in "running"
state while waiting for the cores to come out of winkle. Ensure
that the kernel updates the task state with a non-running status
while we are waiting for winkle to complete.
Change-Id: I07a56ea6f24cbc09362f9227d81915da5bc9f148
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1737
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/kernel/misc.C')
| -rw-r--r-- | src/kernel/misc.C | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/misc.C b/src/kernel/misc.C index 3754003d0..9b2872f04 100644 --- a/src/kernel/misc.C +++ b/src/kernel/misc.C @@ -162,7 +162,7 @@ namespace KernelMisc task_t* saveArea = new task_t; memset(saveArea, '\0', sizeof(task_t)); saveArea->context.msr_mask = 0xC030; // EE, PR, IR, DR. - *(reinterpret_cast<task_t**>(cpu->kernel_stack)) = saveArea; + *(reinterpret_cast<task_t**>(cpu->kernel_stack_bottom)) = saveArea; // Execute winkle. kernel_execute_winkle(saveArea); @@ -190,6 +190,7 @@ namespace KernelMisc setTB(iv_timebase); // Restore caller of cpu_master_winkle(). + iv_caller->state = TASK_STATE_RUNNING; TaskManager::setCurrentTask(iv_caller); } |

