Delphi-PRAXiS
Seite 4 von 7   « Erste     234 56     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   core2duotemp.c to core2duotemp.pas (https://www.delphipraxis.net/97137-core2duotemp-c-core2duotemp-pas.html)

Razor 27. Aug 2007 09:48

Re: core2duotemp.c to core2duotemp.pas
 
I mean i already have a driver and no i dont understand that code in C. :(

Razor 27. Aug 2007 13:21

Re: core2duotemp.c to core2duotemp.pas
 
Can somebody translate this so i can test it with my driver? :)

devidespe 27. Aug 2007 18:32

Re: core2duotemp.c to core2duotemp.pas
 
@Razor:

I would say its very complex to translate C code into Delphi, and another problem is the driver you have. Every driver contains other methods with different calling parameters, so nobody knows how to access your specific driver.

The simplest way is to read the Intel® 64 and IA-32 Architectures Software Developer's Manual, where chapter 13 (Power And Thermal Management) contains the needed ways to gain the core temperatures. Before that you have to check the processor requirements, and if they are available (via the CPUID command, some bits in the Feature capabilities). The CPUID command is accessable in combination with Delphi itself, for the MSR access you need a device driver with ring 0 access and a delphi application with admin rights to load it.

If you have the routines to read MSR and CPUID functions, the temperature readout is quite simple. Just read the chapter 13 within the above Intel document. If there are other questions just ask. But be sure that nobody translates C code or wrote the Delphi code for you.

Hope that helps...

Razor 27. Aug 2007 18:35

Re: core2duotemp.c to core2duotemp.pas
 
I posted a new topic go look there it contains full source code for this problem. :?

alice 1. Sep 2007 19:02

Re: core2duotemp.c to core2duotemp.pas
 
Zitat:

Zitat von Razor
I posted a new topic go look there it contains full source code for this problem. :?

where?

cu

alice

Razor 9. Nov 2007 10:33

Re: core2duotemp.c to core2duotemp.pas
 
Nonono wroong...ill explain it how it works

There are 2 registers $19C and $EE

If we want to check if a intel core cpu has dts we first use MSREAD command we check and we read $19C but the return must be 1 couse if its 0 the cpu dosent have DTS( Digital Thermal Sensor ).

Next up we try to detect the Tjunction wich on core cpus is 85 and 100 C with this register $EE.

so if the register $EE reads 0x40000000 then the Tjunction is 85C else its 100C.

And folow a simple formula : Core temp = Tjunction - Delta

And since i study electronics these stuff is similar in Zener diode and Silicon Diode ;).

My Core temp for Intel's core cpuz is 85%. :P

hathor 9. Nov 2007 11:05

Re: core2duotemp.c to core2duotemp.pas
 
In my first post, You can read:

// and register 0xEE if bit 30 of reg is 1 then reftemp 85 degrees C else 100 degrees C...

Razor 9. Nov 2007 11:06

Re: core2duotemp.c to core2duotemp.pas
 
Yes but how do we get Delta? :)

hathor 9. Nov 2007 11:14

Re: core2duotemp.c to core2duotemp.pas
 
// temp = reftemp - value of reg 0x19C
temp = reftemp - data;

MSR 0x19C contains the temperature data, this data is represented as Delta in C° between current temperature and Tjunction.

Razor 9. Nov 2007 11:22

Re: core2duotemp.c to core2duotemp.pas
 
Liste der Anhänge anzeigen (Anzahl: 1)
Those who have core 2 duo please test this... :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:53 Uhr.
Seite 4 von 7   « Erste     234 56     Letzte »    

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