AMD CS5536 Computer Hardware User Manual


 
AMD Geode™ LX Processor/CS5536 Companion Device GeodeROM Porting Guide 11
2
Model Specific Registers 40680B
2.0Model Specific Registers
There are two ways to read or write Model Specific Registers (MSRs) in an AMD Geode™ LX processor-based system.
Software running 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
FS
2
(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 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.1 Example 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, ‘doeG’ + ‘XL-e’ ; No change to eax
WRMSR
; Done