Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi CPUID Intel&AMD (https://www.delphipraxis.net/114801-cpuid-intel-amd.html)

Razor 31. Mai 2008 20:39


CPUID Intel&AMD
 
So in order to detect type of cpus ive came to a point that i have to do get the next things done until i can do so..

-Stepping
-Model
-Vendor name
-Multiplier <done
-Cpuid
-Bus
-Stock Speed
-Cache(l1,l2,l3)
-Codename

So after i have all of this ill just check for everything and then with this detect an intel qx9650 for example


And ofcourse ive searched forum and found nothing usefull for the things above...Except Muetze's cache unit wich does nothing for my quad q6600 since i have 8 mb of L2.

Can direct me in the right way,so i dont do something stupid again.And give me some tips on how to do it.

soulies 31. Mai 2008 23:06

Re: CPUID Intel&AMD
 
hoi,

my idea - use the unit 'jclsysinfo' with the function 'CPUID' ;

CPUID itself is a structure of TCPUInfo which contains mostly
all the parameters you asked for.

cya

Muetze1 31. Mai 2008 23:57

Re: CPUID Intel&AMD
 
Zitat:

Zitat von Razor
Except Muetze's cache unit wich does nothing for my quad q6600 since i have 8 mb of L2.

It's not actual, because intel extended the cache line tag fields later on, after the unit was build.

Here in this forum is another unit by me for detecting cpu type, vendor, model, family and revision/stepping, etc. This unit has also to be updated to the new values to be usable on the new dual/quadcores.

But before you ask: I have all that units and even a bigger one in the actual form here, but it is closed source, so nothing I can give you...

Razor 1. Jun 2008 09:11

Re: CPUID Intel&AMD
 
I even made the function to read BUS Speed and multiplier of the Intel Core. :P

However since i have a quad core and it uses speedstep it changes its frequency.From 1600 Mhz to 2400 Mhz.
Multi 6>9.How to get the cpu speed that is changing..

And muetze i woulndt ask anyways since wouldnt give me nothing.Ive pretty much figured everything by myself.. :zwinker:
And you dont need it anyways otherwise you would be programing a tool just like mee.

Muetze1 1. Jun 2008 13:15

Re: CPUID Intel&AMD
 
Zitat:

Zitat von Razor
And muetze i woulndt ask anyways since wouldnt give me nothing.

That's right, because you still copy your sources.

Zitat:

Zitat von Razor
Ive pretty much figured everything by myself.. :zwinker:

Now you read the documentation before trying, yes - a big step, but transforming it into code is still not a process in acquiring knowledge and use it, it is try & error. You still missing the basics and you still do not know some general things about programming.

/EDIT: update your delphi version in your profile...

Razor 1. Jun 2008 13:18

Re: CPUID Intel&AMD
 
Zitat:

However since i have a quad core and it uses speedstep it changes its frequency.From 1600 Mhz to 2400 Mhz.
Multi 6>9.How to get the cpu speed that is changing..
I've tried almost everything and code still shows my max speed =2400 while its actually 1600.Ahh!

//Sure

Edit2/ I can calculate the next things now> Rated FSB,Bus speed,voltage,multiplier,Wats,Current.
+A friend said i have to readmsr the address 0x19.

Muetze1 1. Jun 2008 13:31

Re: CPUID Intel&AMD
 
Zitat:

Zitat von Razor
+A friend said i have to readmsr the address 0x19.

It is not an address, it is a register number...

Razor 1. Jun 2008 13:32

Re: CPUID Intel&AMD
 
But wich register it is i have no idea.Googled and nothing($19).

Muetze1 1. Jun 2008 13:33

Re: CPUID Intel&AMD
 
Zitat:

Zitat von Razor
But wich register it is i have no idea.Googled and nothing($19).

Intel documents the whole thing in detail. You've got the documentation, I know, since you looked in it as we chatted.

Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 3B: System Programming Guide (Part 2)

Razor 1. Jun 2008 13:34

Re: CPUID Intel&AMD
 
Ill look but i cant guarantee nothing.. :)

Razor 1. Jun 2008 13:40

Re: CPUID Intel&AMD
 
I looked in here but http://download.intel.com/design/pro...als/253668.pdf found absolutly nothing.

Basicly i need realistic cpu speed calculation.

Muetze1 1. Jun 2008 13:51

Re: CPUID Intel&AMD
 
Boy, do not be so stupid!

Zitat:

Zitat von Razor
I looked in here but http://download.intel.com/design/pro...als/253668.pdf found absolutly nothing.

What's the title of the document from that link?

Zitat:

Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 3A: System Programming Guide (Part 1)
And what did I wrote?

Zitat:

Zitat von Muetze1
Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 3B: System Programming Guide (Part 2)


Razor 1. Jun 2008 13:52

Re: CPUID Intel&AMD
 
Sh#! thanks Muetze ill look in to it and ofcourse after i finish it post a working prototype.

lbccaleb 1. Jun 2008 14:05

Re: CPUID Intel&AMD
 
extract the package from:

dsp-worx.de

and look at the file "CPUMeter.pas"! i think this can help you ;-)

edit:
also have a look at "FastcodeCPUID.pas"!

Razor 1. Jun 2008 14:06

Re: CPUID Intel&AMD
 
It has to be the TIME-STAMP COUNTER otherwise i am stupid as a rock.

Zitat:

TIME-STAMP COUNTER
The Intel 64 and IA-32 architectures (beginning with the Pentium processor) define a
time-stamp counter mechanism that can be used to monitor and identify the relative
time occurrence of processor events. The counter’s architecture includes the
following components:
• TSC flag — A feature bit that indicates the availability of the time-stamp counter.
The counter is available in an if the function CPUID.1:EDX.TSC[bit 4] = 1.
• IA32_TIME_STAMP_COUNTER MSR (called TSC MSR in P6 family and
Pentium processors) — The MSR used as the counter.
• RDTSC instruction — An instruction used to read the time-stamp counter.
• TSD flag — A control register flag is used to enable or disable the time-stamp
counter (enabled if CR4.TSD[bit 2] = 1).
The time-stamp counter (as implemented in the P6 family, Pentium, Pentium M,
Pentium 4, Intel Xeon, Intel Core Solo and Intel Core Duo processors) is a 64-bit
counter that is set to 0 following a RESET of the processor. Following a RESET, the
counter increments even when the processor is halted by the HLT instruction or the
external STPCLK# pin. Note that the assertion of the external DPSLP# pin may cause
the time-stamp counter to stop.
Processor families increment the time-stamp counter differently:
• For Pentium M processors (family [06H], models [09H, 0DH]); for Pentium 4
processors, Intel Xeon processors (family [0FH], models [00H, 01H, or 02H]);
and for P6 family processors: the time-stamp counter increments with every
internal processor clock cycle.


Zitat:

IA32_TIME_STAMP_COUNTER = $10; MSR REGISTER

The internal processor clock cycle is determined by the current core-clock to busclock
ratio. Intel® SpeedStep® technology transitions may also impact the
processor clock.
• For Pentium 4 processors, Intel Xeon processors (family [0FH], models [03H and
higher]); for Intel Core Solo and Intel Core Duo processors (family [06H], model
[0EH]); for the Intel Xeon processor 5100 series and Intel Core 2 Duo processors
(family [06H], model [0FH]): the time-stamp counter increments at a constant

edit2/ lbccaleb,If it shows speed from cpu its usefull.

Razor 1. Jun 2008 14:28

Re: CPUID Intel&AMD
 
lbccaleb,its usefull but no cpu speed :pale:

Razor 1. Jun 2008 15:44

Re: CPUID Intel&AMD
 
Liste der Anhänge anzeigen (Anzahl: 1)
Here i made something...Its interesting goo look. :wink:

Razor 2. Jun 2008 09:20

Re: CPUID Intel&AMD
 
Well?Nobody? :shock:

DevidEspenschied 2. Jun 2008 10:11

Re: CPUID Intel&AMD
 
Zitat:

Zitat von Razor
A friend said i have to readmsr the address 0x19.

Simply have a look at Volume 2 of this document: here

Appendix B (page 469) contains the model-specific registers, which are described for the corresponding processor technology.

Razor 4. Jun 2008 19:09

Re: CPUID Intel&AMD
 
I did that read everything however i need to extract the VID-Voltage Id.
IA32_PERF_STATUS is the msr address.


Delphi-Quellcode:
function tform1.getcoremulti:integer;
 var

 eax,edx:dword;
 begin
  RdMSR($198, eax,edx) ;
  result:=    eax SHR 8 and $ff
 end;

However how to read voltage?

soulies 5. Jun 2008 07:14

Re: CPUID Intel&AMD
 
Zitat:

However how to read voltage?
WMI :
SQL-Code:
Select CurrentVoltage from Win32_Processor
Return: CPU_ID & Voltage


cya

hathor 5. Jun 2008 08:00

Re: CPUID Intel&AMD
 
Zitat:

Zitat von soulies
Zitat:

However how to read voltage?
WMI :
SQL-Code:
Select CurrentVoltage from Win32_Processor
Return: CPU_ID & Voltage


cya

Du solltest nicht irgendwelchen Schwachsinn veröffentlichen, was Du nicht selbst getestet hast!

Versuche selbst mal, mit diesem Code CurrentVoltage herauszufinden und veröffentliche das Ergebnis.

soulies 5. Jun 2008 08:45

Re: CPUID Intel&AMD
 
Zitat:

Du solltest nicht irgendwelchen Schwachsinn veröffentlichen
mag sein das ich die frage nicht verstanden habe ...

bei mir liefert :
SQL-Code:
Select CurrentVoltage from Win32_Processor
CurrentVoltage : 14
CPU_ID : CPU0

und mit
Zitat:

Description("The CurrentVoltage specifies the voltage of the processor.
Bits 0-6 of the field contain the processor's current voltage times 10.
This value is only set when SMBIOS designates a voltage value.
hätte ich gedacht: 14 / 10 = 1.4 Volts


aber wahrscheinlich hast du recht

hathor 5. Jun 2008 09:32

Re: CPUID Intel&AMD
 
@soulies:

Danke für Deine Antwort - bei mir zeigt es 33 an: das wären 3,3 Volt. Real wird er mit 0,95 V gefüttert.
Viele WMI-Werte werden nicht oder falsch angezeigt. Da sollte Microsoft endlich mal nachbessern, statt zu meinen, die Welt mit blödsinnigen BS beglücken zu müssen!

Razor 5. Jun 2008 14:03

Re: CPUID Intel&AMD
 
Yea i almost did it and its NOT FROM THE SMBUS,its reading directly off cpu via READMSR.

Muetze1 5. Jun 2008 14:44

Re: CPUID Intel&AMD
 
Zitat:

Zitat von Razor
Yea i almost did it and its NOT FROM THE SMBUS,its reading directly off cpu via READMSR.

Nobody said to read something from the SMBus. Please ask, if you do not understand what is written here. They use the WMI interface to gather the named information and WMI gets this information from the SMBIOS (and not SMBus!).

And the SMBIOS get's it from the CPU or the chipset/voltage controller directly. But this is another aspect. They offered just an alternative to gather that informationen (even without using such a ring-0 driver) using WMI.

Razor 5. Jun 2008 14:49

Re: CPUID Intel&AMD
 
if it works we dont know...using VID tables from intel datasheet could also work

Razor 6. Jun 2008 15:15

Re: CPUID Intel&AMD
 
But how to get the VID have you tried Muetze?

Muetze1 6. Jun 2008 15:18

Re: CPUID Intel&AMD
 
Zitat:

Zitat von Razor
But how to get the VID have you tried Muetze?

I am never interested in the VID so I never tried, but it is not complex to get it...

Razor 6. Jun 2008 15:22

Re: CPUID Intel&AMD
 
Wich MSR is it.I'll do everything else.I need to calculate Power for Intel Core Cpus.Nobody has done this..

P=C*V^2 *f

P=power
C=capitance
V=voltage
f=frequency


Msr > IA32_PERF_STATUS > $198H

eax > 0x0600061B

The voltage ID is hidding here 1B.But i need a table to recognize wich voltage is it.

Razor 6. Jun 2008 19:36

Re: CPUID Intel&AMD
 
Some usefull info :)

Pentium-M (centrino) - Celeron-M
Frequency to FID
FID = frequency / bus_speed (bus speed is usually 100 or 133 Mhz, depending on the model).


FID to Frequency
frequency = FID * bus_speed (in Mhz) (bus speed is usually 100 or 133 Mhz, depending on the model).


Voltage to VID
VID = (voltage - 700) / 16


VID to Voltage
voltage = (VID * 16) + 700 (in milivolts).

Razor 7. Jun 2008 19:32

Re: CPUID Intel&AMD
 
Result...

http://img.techpowerup.org/080607/Capture004.jpg

Razor 9. Jun 2008 16:03

Re: CPUID Intel&AMD
 
800 views and no replys or interest sad sad.. :?

Zacherl 9. Jun 2008 16:42

Re: CPUID Intel&AMD
 
You could publish some code ..

Muetze1 10. Jun 2008 00:47

Re: CPUID Intel&AMD
 
What do you expect that we should reply? It is just a picture. So, nice Photoshop? nice Label Caption assignment? Or nice work? We do not know and we also can not verify.

Does it run just on your CPU? Runs it also on other CPUs? Is the result correct? Is the result correct for other CPUs?

What did you expect? Something like "Oh, nice - you're still trying..."? So dude, please tell me what did you expect, that you are now yelling about no reaction?

Razor 10. Jun 2008 08:23

Re: CPUID Intel&AMD
 
Muetze you suck in english sorry to tell you that but yea skipping class isn't a good idea :P
And no its no photoshop again you are soo funny.
IA32_PERF_STATUS is for all sorts of things but how can i find out max multiplier.


I'll write my own component i don't some snippets off this forum.Meh :zwinker:

hathor 10. Jun 2008 09:14

Re: CPUID Intel&AMD
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hi, David! Give us more...

Razor 10. Jun 2008 09:15

Re: CPUID Intel&AMD
 
Hehe you found out right :-D.Well its gonna look like that yea however people say i copy cpuz style.Damn i hate them..Yes i will post more after i finish writting component.


I will also make shared memory hathor!

Razor 10. Jun 2008 09:57

Re: CPUID Intel&AMD
 
Someone test this please.... :)

Delphi-Quellcode:
function TCpuinfo.getcoremulti_current:integer;
var
eax,edx:dword;
begin
  RdMSR($198, eax,edx) ;
  result:=eax SHR 8 and $ff// Current multiplier
end;

function TCpuinfo.getcoremulti_max:integer;
var
eax,edx:dword;
begin
  RdMSR($198, eax,edx) ;
  result:=edx SHR 8 and $ff// Maximum multiplier
end;

function TCpuinfo.getcoremulti_low:integer;
var
eax,edx:dword;
begin
  RdMSR($198, eax,edx) ;
  result:=edx SHR 24 and $ff// Low multiplier
end;

hitzi 10. Jun 2008 10:13

Re: CPUID Intel&AMD
 
Test what? What should happen? What do you expect? Oh and your functions dont work - RdMSR is unknown. You said nothing about what is needed for running these functions and I dont read all of your threads to understand where this RdMSR is defined.

I'm sorry to tell you "test failed!" ;)


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:01 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz