Author Topic: Hardware Enumerator [Beta Test]  (Read 2420 times)

Raistlin

  • Member
  • **
  • Posts: 238
Hardware Enumerator [Beta Test]
« on: January 24, 2017, 10:19:31 PM »
Hi all,

Please find attached test piece for my ongoing project that includes a hardware enumerator.

Should work on Windows                 : Everything since XP (WORKSTATION AND SERVER)
Should support run on all Hardware : Since the 486 CPU

I'd be interested in your feedback concerning:
1) ANY DEVIATIONS REPORTED from commercial products like CPU-Z etc.
2) Any crashes without explanation.

CURRENT STATUS OF ATTACHMENT : UPDATED TO VER 0.4
- ADDED : Network support should now correctly detect default NIC with Gateway etc (thanks to Sinsi for spotting)
- ADDED : Storage environment of running User/process
- ADDED : Manifest and VersionInfo block to get rid of nasty heuristic AV false positives (thanks hutch for the idea)
- ADDED : More fine grained Internal Error flags to spot detection problems

Thanks
Raistlin
« Last Edit: February 20, 2017, 01:13:39 AM by Raistlin »

jj2007

  • Member
  • *****
  • Posts: 7558
  • Assembler is fun ;-)
    • MasmBasic
Re: Hardware Enumerator [Beta Test]
« Reply #1 on: January 24, 2017, 11:23:10 PM »
No problems on Win7-64 with an Intel Core i5 :t

sinsi

  • Member
  • ****
  • Posts: 996
Re: Hardware Enumerator [Beta Test]
« Reply #2 on: January 24, 2017, 11:38:55 PM »
Running Windows 2000 Pro under VMware gives me "TestID.exe is not a valid Win32 application." You might need an older linker and use the "/subsystem:windows,5.0" switch.
Works fine under Windows 10 Pro x64.
I can walk on water but stagger on beer.

Raistlin

  • Member
  • **
  • Posts: 238
Re: Hardware Enumerator [Beta Test]
« Reply #3 on: January 24, 2017, 11:45:16 PM »
Thanks so much @ Sinsi & jj2007 - will do the link thingum and update the zip attachment
Test on as many platforms as you can get hold of please. Windows CE / Home etc. anyone ?

sinsi

  • Member
  • ****
  • Posts: 996
Re: Hardware Enumerator [Beta Test]
« Reply #4 on: January 24, 2017, 11:50:35 PM »
Changed the version in the header to 5.0 and got a little further...

"The procedure entry point GetNativeSystemInfo could not be located in the dynamic link library kernel32.dll."

From MSDN: GetNativeSystemInfo function
Quote
To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later.
So, Windows XP or later.
I can walk on water but stagger on beer.

Raistlin

  • Member
  • **
  • Posts: 238
Re: Hardware Enumerator [Beta Test]
« Reply #5 on: January 24, 2017, 11:53:08 PM »
Ouch - that sux - erm... my bad - thanks for the info Sinsi - Windows XP and up it is.... :icon_redface:

EDIT : It seems that x64 (WOW) OS test, requires GetNativeSystemInfo API (XP/2003 & up) to detect accurately and
           thus a GetSystemInfo (Win 2000) won't cut it. Well spotted.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4813
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Hardware Enumerator [Beta Test]
« Reply #6 on: January 25, 2017, 12:00:25 AM »
Works fine on my Win 10 64 Professional. Processor ID and data is correct, memory specs are right, everything seems to work well.  :t
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

sinsi

  • Member
  • ****
  • Posts: 996
Re: Hardware Enumerator [Beta Test]
« Reply #7 on: January 25, 2017, 12:28:12 AM »
XP Pro x64 error"
Quote
The application, C:\Documents and Settings\Administrator\Desktop\TestID.exe, generated an application error The error occurred on 01/24/2017 @ 23:41:46.015 The exception generated was c0000005 at address 00402B6C (TestID)
I can walk on water but stagger on beer.

pro3carp3

  • Regular Member
  • *
  • Posts: 7
Re: Hardware Enumerator [Beta Test]
« Reply #8 on: January 25, 2017, 03:10:02 AM »
In comparing to CPU-Z I find a difference with the cache information:

CPU-Z:
L1 Inst: 32k X 4, 8-way
L1 Data: 32K x 4, 8-way
L2: 256K, 4-way
L3: 6MB, 12-way

ExternalD:
L1 Inst: 32k X 2, 8-way
L1 Data: 32K x 2, 8-way
L2: 256K, 8-way
L3: 6MB, 12-way

 My CPU:
Intel i5 6400 Skylake 1151LGA
LGC

TWell

  • Member
  • ****
  • Posts: 748
Re: Hardware Enumerator [Beta Test]
« Reply #9 on: January 25, 2017, 08:23:39 AM »
AMD
CPU-Z:
L1 Inst: 32k X 2, 2-way
L1 Data: 32K x 2, 8-way
L2: 512K X 2, 16-way

ExtremeID:
L1 Inst: 32k X 0, 2-way
L1 Data: 32K x 0, 16-way
L2: 512K, 16-way

Raistlin

  • Member
  • **
  • Posts: 238
Re: Hardware Enumerator [Beta Test]
« Reply #10 on: January 25, 2017, 04:53:34 PM »
Thanks to TWell/pro3carp3/sinsi(again)/hutch   - for the feedback

@sinsi - could you please possibly attach a debugger onto application (ex. ollydbg) and
             email me the screenshot at which point the access violation occurs. I'll boot a VM
             with XP and replicate - thanks so much for all the effort

@Twell/pro3carp3 - Thanks for you're time - I'am working on the bug

Adamanteus

  • Member
  • **
  • Posts: 180
Re: Hardware Enumerator [Beta Test]
« Reply #11 on: January 25, 2017, 08:02:06 PM »
For  AMD Athlon(tm) X4 760K Quad Core Processor :
- SSE 5 - is
- L2 Cache 2048Kb - 524Kb
- Windows Vista SP no - is SP 1
- AVX - I not found in it

and Detection complited with errors ...

- but interface excellent !!!

Siekmanski

  • Member
  • *****
  • Posts: 1094
Re: Hardware Enumerator [Beta Test]
« Reply #12 on: January 25, 2017, 08:28:31 PM »
Hi Raistlin,

Code: [Select]
i7-4930K  Windows 8.1 / Server 2012R2

L1 Instr Cache 32 KB X 2   ( should be 32 X 6 KB)
L1 Data  Cache 32 KB X 2   ( should be 32 X 6 KB)
L2 Cache       256 KB      ( should be 256 X 6 KB)
L3 Cache       12288 KB    ( is correct)

adeyblue

  • Member
  • **
  • Posts: 89
    • Airesoft
Re: Hardware Enumerator [Beta Test]
« Reply #13 on: January 26, 2017, 06:41:55 AM »
@sinsi - could you please possibly attach a debugger onto application (ex. ollydbg) and
             email me the screenshot at which point the access violation occurs. I'll boot a VM
             with XP and replicate - thanks so much for all the effort
It's offset 0x2b6c into the exe as the address given hints (it also crashed for me on XP32 VM at the same place), just before sending a LB_ADDSTRING message. It crashes because esi is 0 and is dereferenced (it's loaded with a global that seems like it should hold memory from GlobalAlloc, but doesn't)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4813
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Hardware Enumerator [Beta Test]
« Reply #14 on: January 26, 2017, 12:25:59 PM »
I just downloaded both cpuz and the version posted here again and had no problems running it at all on Win 10 64 professional. Processor is a 6 core Haswell running at 3.3 gig.

Cache data is identical
Instruction set recognition correct on both and identical.
Processor details identical (core count etc)

The old version of cpuz crashed and blue screened win 10 and had to reboot but TestID has run correctly each time I have run it.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: