[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Kernel Extensions and Device Support Programming Concepts

bat/Block Address Translation Subcommands for the KDB Kernel Debugger and kdb Command


dbat Subcommand

On POWER PC machine, the dbat subcommand may be used to display dbat registers. (See POWER PC Operating Environment Architecture (book III) and POWER PC Implementation Definition for the Processor (book IV) to have more information about bat register fields).

Example

   KDB(3)> dbat display POWER 601 BAT registers
   BAT0 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0
   BAT1 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0
   BAT2 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0
   BAT3 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0

   KDB(1)> dbat display POWER 604 data BAT registers
   DBAT0 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   DBAT1 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   DBAT2 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   DBAT3 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0

   KDB(0)> dbat display POWER 620 data BAT registers
   DBAT0 0000000000000000 000000000000001A
    bepi 000000000000 brpn 000000000000 bl 0000 vs 0 vp 0 wimg 3 pp 2
   DBAT1 0000000000000000 00000000C000002A
    bepi 000000000000 brpn 000000006000 bl 0000 vs 0 vp 0 wimg 5 pp 2
   DBAT2 0000000000000000 000000008000002A
    bepi 000000000000 brpn 000000004000 bl 0000 vs 0 vp 0 wimg 5 pp 2
   DBAT3 0000000000000000 00000000A000002A
    bepi 000000000000 brpn 000000005000 bl 0000 vs 0 vp 0 wimg 5 pp 2

ibat Subcommand

On POWER PC machine, the ibat subcommand may be used to display ibat registers. (See POWER PC Operating Environment Architecture (book III) and POWER PC Implementation Definition for the Processor (book IV) for more information about bat register fields).

Example

   KDB(0)> ibat display POWER 601 BAT registers
   BAT0 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0
   BAT1 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0
   BAT2 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0
   BAT3 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 ks 0 kp 0 wimg 0 pp 0

   KDB(2)> ibat display POWER 604 instruction BAT registers
   IBAT0 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   IBAT1 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   IBAT2 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   IBAT3 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0

   KDB(0)> ibat display POWER 620 instruction BAT registers
   IBAT0 0000000000000000 0000000000000000
    bepi 000000000000 brpn 000000000000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   IBAT1 0000000000000000 0000000000000000
    bepi 000000000000 brpn 000000000000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   IBAT2 0000000000000000 0000000000000000
    bepi 000000000000 brpn 000000000000 bl 0000 vs 0 vp 0 wimg 0 pp 0
   IBAT3 0000000000000000 0000000000000000
    bepi 000000000000 brpn 000000000000 bl 0000 vs 0 vp 0 wimg 0 pp 0

mdbat Subcommand

Each dbat register may be altered by the mdbat subcommand. The processor data bat register is altered immediately. KDB takes care of the valid bit, the word with valid bit is set at last.

Example

   On POWER 601 processor
   KDB(0)> dbat 2 display bat register 2
   BAT2: 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 wimg 0 ks 0 kp 0 pp 0
   KDB(0)> mdbat 2 alter bat register 2
   BAT register, enter <RC> twice to select BAT field, enter <.> to quit
   BAT2 upper 00000000 = <CR/LF>
   BAT2 lower 00000000 = <CR/LF>
   BAT field, enter <RC> to select field, enter <.> to quit
   BAT2.bepi: 00000000 = 00007FE0
   BAT2.brpn: 00000000 = 00007FE0
   BAT2.bl  : 00000000 = 0000001F
   BAT2.v   : 00000000 = 00000001
   BAT2.ks  : 00000000 = 00000001
   BAT2.kp  : 00000000 = <CR/LF>
   BAT2.wimg: 00000000 = 00000003
   BAT2.pp  : 00000000 = 00000002
   BAT2: FFC0003A FFC0005F
    bepi 7FE0 brpn 7FE0 bl 001F v 1 wimg 3 ks 1 kp 0 pp 2
    eaddr = FFC00000, paddr = FFC00000 size = 4096 KBytes
   KDB(0)> mdbat 2 clear bat register 2
   BAT register, enter <RC> twice to select BAT field, enter <.> to quit
   BAT2 upper FFC0003A = 0
   BAT2 lower FFC0005F = 0
   BAT2 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 wimg 0 ks 0 kp 0 pp 0

   On POWER 604 processor
   KDB(0)> mdbat 2 alter bat register 2
   BAT register, enter <RC> twice to select BAT field, enter <.> to quit
   DBAT2 upper 00000000 = 
   DBAT2 lower 00000000 = 
   BAT field, enter <RC> to select field, enter <.> to quit
   DBAT2.bepi: 00000000 = 00007FE0
   DBAT2.brpn: 00000000 = 00007FE0
   DBAT2.bl  : 00000000 = 0000001F
   DBAT2.vs  : 00000000 = 00000001
   DBAT2.vp  : 00000000 = <CR/LF>
   DBAT2.wimg: 00000000 = 00000003
   DBAT2.pp  : 00000000 = 00000002
   DBAT2 FFC0007E FFC0001A
    bepi 7FE0 brpn 7FE0 bl 001F vs 1 vp 0 wimg 3 pp 2
    eaddr = FFC00000, paddr = FFC00000 size = 4096 KBytes [Supervisor state]
   KDB(0)> mdbat 2 clear bat register 2
   BAT register, enter <RC> twice to select BAT field, enter <.> to quit
   DBAT2 upper FFC0007E = 0
   DBAT2 lower FFC0001A = 0 
   DBAT2 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0

mibat Subcommand

Each ibat register may be altered by the mibat subcommand. The processor instruction bat register is altered immediately.

Example

   On POWER 601 processor
   KDB(0)> ibat 2 display bat register 2
   BAT2: 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 wimg 0 ks 0 kp 0 pp 0
   KDB(0)> mibat 2 alter bat register 2
   BAT register, enter <RC> twice to select BAT field, enter <.> to quit
   BAT2 upper 00000000 = <CR/LF>
   BAT2 lower 00000000 = <CR/LF>
   BAT field, enter <RC> to select field, enter <.> to quit
   BAT2.bepi: 00000000 = 00007FE0
   BAT2.brpn: 00000000 = 00007FE0
   BAT2.bl  : 00000000 = 0000001F
   BAT2.v   : 00000000 = 00000001
   BAT2.ks  : 00000000 = 00000001
   BAT2.kp  : 00000000 = <CR/LF>
   BAT2.wimg: 00000000 = 00000003
   BAT2.pp  : 00000000 = 00000002
   BAT2: FFC0003A FFC0005F
    bepi 7FE0 brpn 7FE0 bl 001F v 1 wimg 3 ks 1 kp 0 pp 2
    eaddr = FFC00000, paddr = FFC00000 size = 4096 KBytes
   KDB(0)> mibat 2 clear bat register 2
   BAT register, enter <RC> twice to select BAT field, enter <.> to quit
   BAT2 upper FFC0003A = 0
   BAT2 lower FFC0005F = 0
   BAT2 00000000 00000000
    bepi 0000 brpn 0000 bl 0000 v 0 wimg 0 ks 0 kp 0 pp 0

   On POWER 604 processor
   KDB(0)> mibat 2
   BAT register, enter <RC> twice to select BAT field, enter <.> to quit
   IBAT2 upper 00000000 = <CR/LF>
   IBAT2 lower 00000000 = <CR/LF>
   BAT field, enter <RC> to select field, enter <.> to quit
   IBAT2.bepi: 00000000 = <CR/LF>
   IBAT2.brpn: 00000000 = <CR/LF>
   IBAT2.bl  : 00000000 = 3ff
   IBAT2.vs  : 00000000 = 1
   IBAT2.vp  : 00000000 = <CR/LF>
   IBAT2.wimg: 00000000 = 2
   IBAT2.pp  : 00000000 = 2
   IBAT2 00000FFE 00000012
    bepi 0000 brpn 0000 bl 03FF vs 1 vp 0 wimg 2 pp 2
    eaddr = 00000000, paddr = 00000000 size = 131072 KBytes [Supervisor state]

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]