AMD CS5535 manual Model Specific Registers2, Example MSR Transaction, Rdmsr, Wrmsr

Models: CS5535

1 36
Download 36 pages 11 Kb
Page 11
Image 11
Model Specific Registers2

Model Specific Registers

32430C

 

 

Model Specific Registers2

There are two ways to read or write Model Specific Registers (MSRs) in a Geode™ GX processor system. Software run- ning on the processor can use the RDMSR and WRMSR instructions, and modules within the processor can use the GeodeLink™ MSR transactions. The second method allows debug modules, such as the System Navigator from FS2 (First Silicon Solutions), to program MSRs.

All MSRs are 64 bits wide. The MSR addresses are 32 bits, where each unique address refers to a 64-bit data quantity.

To communicate with modules on the GeodeLink interface, the address of that module must be known. Addresses are obtained by either scanning the GeodeLink interface or having prior knowledge of the chip topology. This is discussed in detail in Section 3.0 "GeodeLink™ Architecture" on page 13.

RDMSR:

Input

ECX - Address to read.

Output

EDX:EAX - 64 bits data returned.

WRMSR:

Input

ECX - Address to write.

EDX:EAX - 64 bits data written.

Output

None.

2.1Example MSR Transaction

Read and write extended CPUID registers.

This example will change the CPUID.

RDMSR:

Load MSR specified by ECX into EDX:EAX.

WRMSR:

Write the value in EDX:EAX to MSR specified by ECX.

MSR_CPUID0 EQU 00003000h

MSR_CPUID1 EQU 00003001h

mov

ecx, MSR_CPUID0

 

 

RDMSR

 

; get values

 

mov

edx, ‘cdeR’

; write edx:eax to MSR in ecx. No change to eax.

 

WRMSR

 

 

 

mov

ecx, MSR_CPUID1

 

 

RDMSR

 

 

 

mov

edx, ‘duol’

; No change to eax

 

WRMSR

 

 

 

; Done

 

 

 

 

 

AMD Geode™ GX Processor/CS5535 Companion Device GeodeROM Porting Guide

11

Page 11
Image 11
AMD CS5535 manual Model Specific Registers2, Example MSR Transaction, Rdmsr, Wrmsr