Intel® System Debugger User Guide

ID 648476
Date 06/13/2024
Confidential
Document Table of Contents

WinDbg* Support for RegDB

This chapter describes the WinDbg* over Intel(R) Direct Connect Interface (Intel(R) DCI) extension that provides support for Register Database.

Commands

To set cpu information, introduce the cpu name in specific format. First letter of names in capital letter, without blank spaces.

!setcpu <cpuName>

To set pch information, we need to introduce the pch name in specific format. First letter of names in capital letter, without blank spaces.

!setpch <pchName>

To set cpu and pch information, we need to introduce the name in specific format. First letter of names in capital letter, without blank spaces.

!settarget <cpuName> <pchName>

To load register database xrd file containing the register information.

!loadxrd

To modify default path to xrd database file.

!setxrdpath <xrdPath>

To print DML link to base registers.

!baseregs

To get name of MSR by MSR offset.

!getmsrname <offset>

To enumerate base Architectural registers.

!enumarchregs

To enumerate base Platform registers.

!enumplatfregs

To show information about specific Architectural register.

!showarchreg <registerName>

To read value of Architectural register.

!readarchreg <registerName>

To write value of Architectural register. Value must be in hexadecimal format.

!writearchreg <registerName> <value>

To show information about specific Platform register. Parent name is optional. If only register name is specified, all registers that correspond to that name will be printed.

!showarchreg <registerName> <parentName>

To read value of Platform register. Parent name is optional. If only register name is specified, all registers that correspond to that name will be printed.

!readarchreg <registerName> <parentName>

To write value of Platform register. Value must be in hexadecimal format.

!writearchreg <registerName> <value> <parentName>

Using the extension

First, user needs to load the corresponding database. Target platform will be autoconfigured by WinDBG extension.

::

0: kd> !loadxrd Intel(R) System Debug extension support for RegDB RegDB: Loaded the platform registers for AlderLake Successful load of xrd database.

Then the architectural and/or platform registers can be printed by using DML links from baseregs.

0: kd> !baseregs
Enumeration of base registers:
Architectural Registers
Platform Registers
0: kd> !enumarchregs
Enumeration of thread arch regs:
Name                                |     Offset | Description
Architectural MSRs
IA32_P5_MC_ADDR                     |          0 | p5 mc addr
IA32_P5_MC_TYPE                     |        0x1 | p5 mc type
IA32_MONITOR_FILTER_SIZE            |        0x6 | monitor filter size
...
0: kd> !enumplatfregs
Enumeration of platform regs:
Name                                               | Description
ADL_Host_Bridge (B0:D0:F0)
RID_CC                                             | Revision ID
PXPEPBAR_0_0_0_PCI                                 | PXPEPBAR PCI
...

In order to read or write a platform register value, user should introduce register name and parent name, in order to read a specific register.

0: kd> !readplatfreg BCTRL adl_direct_media_interface_bar
Name                                | Description                                             |    Bits | Value
undefined                           | not defined                                             |       0 | 0
SE                                  | SERR# Enable                                            |       1 | 0x1
undefined                           | not defined                                             |   2 - 7 | 0
0: kd> !showplatfreg BCTRL adl_direct_media_interface_bar
Name                                | Description                                             |    Bits | Write |  Read
undefined                           | not defined                                             |       0 |     0 |     1
SE                                  | SERR# Enable                                            |       1 |     1 |     1
undefined                           | not defined                                             |   2 - 7 |     0 |     1
0: kd> !writeplatfreg BCTRL 0 adl_direct_media_interface_bar
Successful write: 0

User can perform the corresponding operations on architectural registers by using the commands for architectural registers.

0: kd> !showarchreg STAR
Name                                | Description                              |    Bits | Write |  Read
SYSCALL_TARGET_EIP                  | SYSCALL_TARGET_EIP                       |  0 - 31 |     1 |     1
SYSCALL_CS_SS                       | SYSCALL_CS_SS                            | 32 - 47 |     1 |     1
SYSRET_CS_SS                        | SYSRET_CS_SS                             | 48 - 63 |     1 |     1
0: kd> !readarchreg STAR
Name                                | Description                              |    Bits | Value
SYSCALL_TARGET_EIP                  | SYSCALL_TARGET_EIP                       |  0 - 31 | 0
SYSCALL_CS_SS                       | SYSCALL_CS_SS                            | 32 - 47 | 0
SYSRET_CS_SS                        | SYSRET_CS_SS                             | 48 - 63 | 0
0: kd> !writearchreg STAR 0xff
Successful write value 0xff