AMD CS5535 manual Model Specific Registers2, Example MSR Transaction

Page 11

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

Image 11
Contents Publication ID 32430C AprilTrademarks Advanced Micro Devices, Inc. All rights reservedContents Contents GeodeLink Architecture Topology List of FiguresList of Figures List of Tables List of Tables Introduction Overview1Assumption Write the value in Edxeax to MSR specified by ECX Model Specific Registers2Example MSR Transaction Load MSR specified by ECX into EdxeaxModel Specific Registers CS5535 Companion Device GeodeLink Architecture3AMD Geode GX ProcessorMemory Descriptor Types GeodeLink MSR AddressingDescriptors Addressing ExampleMdiv Vdiv Set Clocks and ResetProcessor Initialization SysrefCPU Identification Calculating Processor SpeedMemory Controller Initialization Size Memory Test Extended DramGeodeLink Modules Initialization Default Region Configuration Properties Bit Descriptions Descriptor MSR Address Glpci RegionsDescriptor Allocation Gliu Initialization AMD Geode CS5535 Companion Device InitializationChipset ID Set ID Select IdselSystem Management Bus SMBus Multi Function General Purpose Timers MFGPTsIRQ Mapper Keyboard Emulation Logic KEL 1+Other Legacy DD Initialization Power Management LogicAcpi Flash Interface7 AC97 Audio Controller Initialization Diverse Device I/O LocationsATA-5 / Hard Drive Initialization Universal Serial Bus USBAllocate Processor Frame Buffer and VSA2 Memory Virtual System Architecture InitializationPCI Bus Initialization GeodeLink Control Processor InitializationDual Monitor Support Miscellaneous InitializationsInitialize Graphics Subsystem Monochrome Support32430C Post Codes Implementation5Clocking Scratchpad InitializationImplementation Setup Options6 32430C VSA Memory7MapROM VSA PCI Memory MappedFrame Buffer GeodeROM Flow GX Processor/CS5535 Device VSA Initial release Document Revision HistoryTable A-1. Revision History Revision # Revisions / Comments