[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Kernel Extensions and Device Support Programming Concepts

SMP Subcommands

Note
The subcommands in this section are only valid for SMP machines.

KDB processor states are:

start and stop Subcommands

The stop subcommand can be used to stop all or a specific processor. The start subcommand can be used to start all or a specific processor. When a processor is stopped, it is looping inside KDB. A state of stopped means that the processor does not go back to the operating system.

Note
These subcommands are only available within the KDB Kernel Debugger; they are not included in the kdb command.
Syntax

 

start cpu number | all

stop cpu number | all

Example

   KDB(1)> stop 0 stop processor 0
   KDB(1)> cpu display processors status
   cpu 0 status VALID STOPPED action STOP
   cpu 1 status VALID DEBUG
   KDB(1)> start 0 start processor 0
   KDB(1)> cpu display processors status
   cpu 0 status VALID action START
   cpu 1 status VALID DEBUG
   KDB(1)> b sy_decint set break point
   KDB(1)> e exit the debugger
   Breakpoint
   .sy_decint+000000    mflr    r0                  <.dec_flih+000014>
   KDB(0)> cpu display processors status
   cpu 0 status VALID DEBUG action RESUME
   cpu 1 status VALID DEBUGWAITING
   KDB(0)> cpu 1 switch to processor 1
   Breakpoint
   .sy_decint+000000    mflr    r0                  <.dec_flih+000014>
   KDB(1)> cpu display processors status
   cpu 0 status VALID SWITCHED action SWITCH
   cpu 1 status VALID DEBUG
   KDB(1)> cpu 0 switch to processor 0
   KDB(0)> cpu display processors status
   cpu 0 status VALID DEBUG
   cpu 1 status VALID SWITCHED action SWITCH
   KDB(0)> q exit the debugger

cpu Subcommand

The cpu subcommand can be used to switch from the current processor to the specified processor.

Syntax

 

cpu [cpu number | any]

Without an argument, the cpu subcommand prints processor status. For the KDB Kernel Debugger the processor status indicates the current state of the processor (i.e. stopped, switched, debug, etc...). For the kdb command, the processor status displays the address of the PPDA for the processor, the current thread for the processor, and the CSA address.

For the KDB Kernel Debugger, a switched processor is blocked until next start or cpu subcommand. Switching between processors does not change processor state.

Note
If a selected processor can not be reached, it is possible to go back to the previous one by typing ^\\ twice.
Example

   KDB(4)> cpu display processors status
   cpu 0 status VALID SWITCHED action SWITCH
   cpu 1 status VALID SWITCHED action SWITCH
   cpu 2 status VALID SWITCHED action SWITCH
   cpu 3 status VALID SWITCHED action SWITCH
   cpu 4 status VALID DEBUG action RESUME
   cpu 5 status VALID SWITCHED action SWITCH
   cpu 6 status VALID SWITCHED action SWITCH
   cpu 7 status VALID SWITCHED action SWITCH
   KDB(4)> cpu 7 switch to processor 7
   Debugger entered via keyboard.
   .waitproc+0000B0     lbz    r0,0(r30)           r0=0,0(r30)=ppda+0014D0
   KDB(7)> cpu display processors status
   cpu 0 status VALID SWITCHED action SWITCH
   cpu 1 status VALID SWITCHED action SWITCH
   cpu 2 status VALID SWITCHED action SWITCH
   cpu 3 status VALID SWITCHED action SWITCH
   cpu 4 status VALID SWITCHED action SWITCH
   cpu 5 status VALID SWITCHED action SWITCH
   cpu 6 status VALID SWITCHED action SWITCH
   cpu 7 status VALID DEBUG
   KDB(7)> 

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]