Author Topic: Hardware Enumerator [pre-release]  (Read 8167 times)

Raistlin

  • Member
  • ***
  • Posts: 354
Hardware Enumerator [pre-release]
« on: January 24, 2017, 10:19:31 PM »
Hi all,

Please find attached test piece for my ongoing project that includes a system profiler.

Should work on Windows                 : Everything since XP SP3 (WORKSTATION AND SERVER)
Should support run on all Hardware : Since the 486 CPU, but realistically PII-233 Mhz and up (XP minimum system requirements)

I'd be interested in your feedback concerning:
1) Any deviations reported from commercial products like CPU-Z, HWiNFO etc.
2) Any crashes without explanation.
3) Any data corruptions

CURRENT STATUS OF ATTACHMENT : UPDATED TO VER 0.8 & SAMPLE  :biggrin:

-STATUS: a DLL you can use in your own projects (non-commercial, non-open source) with sample GUI dialog implementation

-ADDED: Minor Bug Fixes [Thanks goes out to Siekmanski, zed151, AW27 for reporting these]
-ADDED: Detections for DirectX, Default DirectSound Adapter, MotherBoard & BIOS, dotNET4

Known issues or perhaps of intellectual interest:
1) If a machine is running a VM (hyper-visor installed - as typically found in Win 8.1 on wards) the CPUID switches for x2APIC and VMX/SVM
    are typically disabled by the OS. This can cause CPUID topology detection algorithms to misbehave. It also requires the programmer to then
    start comparing OS versus CPUID reported information, in order to determine if the application is running inside a host or client instance.
    Lastly, we know Intel supports x2APIC on all CPUs after 2009. AMD only started supporting x2APIC on the later Ryzen CPUs, circa beginning 2018.
2) A display adapter brand detect, is intimately reliant on proper driver installation. Failing proper driver installation, the Windows
    default/generic display driver reports as a blank string, even though it shows up in device manager as "Generic VGA..whatever".
3) The MTU size in Windows may possibly under-report, typically during high bandwidth utilization scenarios (background downloads)
    due to TCP/IP egress scaling. 
4) Timings, on an i5 laptop = Windows based detects are around 1 second versus Console based detects at 0.5 or less seconds.
    The overhead on GUI apps seems to be significant in the reflected context.

Let me know what you think
Raistlin
« Last Edit: July 01, 2018, 08:06:06 PM by Raistlin »
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

jj2007

  • Member
  • *****
  • Posts: 8509
  • 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: 1059
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: 354
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 ?
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

sinsi

  • Member
  • *****
  • Posts: 1059
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: 354
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.
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5484
  • 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: 1059
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: 354
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
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

Adamanteus

  • Member
  • **
  • Posts: 193
    • LLC "AMS"
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: 1550
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)
Creative coders use backward thinking techniques as their strategy.

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: 5484
  • 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: