News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Hardware Enumerator [pre-release]

Started by Raistlin, January 24, 2017, 10:19:31 PM

Previous topic - Next topic

Raistlin

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.


[SOURCECODE of pre-alpha which links to the v0.8 sample (not fully in-line referenced) now attached, the final version code will perhaps never be released]
[NOTE: This source code release is for educational purposes only, tied to rules of the forum, specifically the non-negotiable rule of Member contributed code (rule# 7)]

Let me know what you think
Raistlin
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

jj2007

No problems on Win7-64 with an Intel Core i5 :t

sinsi

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.

Raistlin

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

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
QuoteTo compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later.
So, Windows XP or later.

Raistlin

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--

Works fine on my Win 10 64 Professional. Processor ID and data is correct, memory specs are right, everything seems to work well.  :t

sinsi

XP Pro x64 error"
QuoteThe 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)

pro3carp3

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

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

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

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

Hi Raistlin,

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 a strategy.

adeyblue

Quote from: Raistlin on January 25, 2017, 04:53:34 PM
@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--

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.