Determing the frequency of the system bus

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
DaveHK

Determing the frequency of the system bus

Post by DaveHK »

Does anyone know a reliable way to calculate or measure the system bus clock frequency ?

It is relatively easy to calculate the processor speed by means of the TSC, and of course, this processor clock must be some multiple of the bus clock, but I can't figure out a good way to calculate either the multiplier or the clock freququency.

I did implement one succesful method utilising the APIC timer which runs at bus clock frequency, but unfortunately, with the exception of multiple CPU systems, most BIOSes seem to disable the APIC in hardware, which is irreversible without some open-heart motherboard maintenance - any ideas ?
Chase

RE:Determing the frequency of the system bus

Post by Chase »

I don't think you can on most cpus. It seems there is a way one the most recent cpus. The cpuid programs from intel and from cpuid.com will try to determine it on the latest cpus. I'm sure you could get the info from the mb or bios with enough docs but it wouldn't be portable.

If you use cpuid to identify a cpu and it's cache sizes couldn't you get a rough idea by seeing how many memory writes you could do within a certain time frame?
VoidLogic

RE:Determing the frequency of the system bus

Post by VoidLogic »

Ask AMD to e-mail you there MMX libraries (they did for me), and in that code are ASM routines to ID all processors modern and old. Based on the model you know the cache size, ex Celeron I 0k, Celeron II 128k. The only expetion is on old machines were the level 2 cache is stored on the motherboad, ex Pentiums, K6s.

VoidLogic
Post Reply