AMD CS5535 Calculating Processor Speed, Memory Controller Initialization, CPU Identification

Page 16

32430C

Initialization

4.1.2Calculating Processor Speed

Entry Conditions:

Stack and No-Stack versions required. 8254 timer available (port 61).

Procedure:

Utilize the Real Time Stamp Counter (RTSC).

Disable the L1 cache.

Set up a channel of the 8254 Timer chip to count for a predetermined amount of time.

Read the CPU RTSC and save the initial count value.

Poll counter and wait for it to roll over.

Read the CPU RTSC and save as the final count.

Subtract the initial value of the RTSC from the final value.

EDX:EAX now contains the number of clock ticks in the predetermined amount of time.

To get the value in MHz, divide the number of clocks by the time represented in microseconds (i.e., 5 ms = 5000).

4.1.2.1CPU Identification

The CPUID check should be done as soon as possible. Use the CPUID instruction.

Check the Major and Minor Revision fields located in the GLCP_CHIP_REVID register (MSR Address 4C000017h[7:0]) for the silicon revision.

4.1.3Memory Controller Initialization

Registers:

MC_CF07_DATA (MSR Address 2000018h)

MC_CF8F_DATA (MSR Address 2000019h)

MC_CFCLK_DBUG (MSR Address 200001Dh)

The memory controller in the GX processor supports SDRAM and DDR memory. The memory controller and the RAM are programmed via settings read from the SPD. The SPD is required for detection of PC66, PC100, PC133 and DDR RAM.

In the case of a closed system, where the RAM is soldered to the motherboard and there is no SPD, memory settings can be stored in CMOS for initialization.

The SDRAM clock is set up prior to reset by the clock initialization.

Address, bank, registered/unbuffered, and other values read from the SPD.

Size memory in DIMM socket(s).

Program Memory Controller.

Set default refresh to an appropriate value.

16

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

Image 16
Contents April Publication ID 32430CAdvanced Micro Devices, Inc. All rights reserved TrademarksContents Contents List of Figures GeodeLink Architecture TopologyList of Figures List of Tables List of Tables Overview1 IntroductionAssumption Model Specific Registers2 Example MSR TransactionLoad MSR specified by ECX into Edxeax Write the value in Edxeax to MSR specified by ECXModel Specific Registers GeodeLink Architecture3 AMD GeodeGX Processor CS5535 Companion DeviceGeodeLink MSR Addressing DescriptorsAddressing Example Memory Descriptor TypesSet Clocks and Reset Processor InitializationSysref Mdiv VdivMemory Controller Initialization Calculating Processor SpeedCPU Identification GeodeLink Modules Initialization Test Extended DramSize Memory Default Region Configuration Properties Bit Descriptions Descriptor Allocation Glpci RegionsDescriptor MSR Address AMD Geode CS5535 Companion Device Initialization Chipset IDSet ID Select Idsel Gliu InitializationMulti Function General Purpose Timers MFGPTs IRQ MapperKeyboard Emulation Logic KEL 1+ System Management Bus SMBusPower Management Logic AcpiFlash Interface Other Legacy DD InitializationDiverse Device I/O Locations ATA-5 / Hard Drive InitializationUniversal Serial Bus USB 7 AC97 Audio Controller InitializationVirtual System Architecture Initialization PCI Bus InitializationGeodeLink Control Processor Initialization Allocate Processor Frame Buffer and VSA2 MemoryMiscellaneous Initializations Initialize Graphics SubsystemMonochrome Support Dual Monitor Support32430C Implementation5 ClockingScratchpad Initialization Post CodesImplementation Setup Options6 32430C ROM Memory7MapVSA Frame Buffer Memory MappedVSA PCI GeodeROM Flow GX Processor/CS5535 Device VSA Document Revision History Table A-1. Revision HistoryRevision # Revisions / Comments Initial release