Win32_Processor has no processor id - windows

Almost system has win32 processor id, but I find one system has no processor id.
PS C:\Windows\system32> Get-WmiObject Win32_Processor
Caption : Intel64 Family 6 Model 165 Stepping 5
DeviceID : CPU0
Manufacturer : GenuineIntel
MaxClockSpeed : 3600
Name : Intel(R) Core(TM) i9-10850K CPU # 3.60GHz
SocketDesignation :
PS C:\Windows\system32> (Get-WmiObject Win32_Processor).ProcessorId
PS C:\Windows\system32>
It returns null. so I use MiTeC SMBIOS Explorer to check smbios, there is no processor information (type 4)
It's not virtual machine. Is any reason it doesn't has processor information? If exist something bios option please tell me..
System Informaion
cpu: i9-10850k
baseboard: asus rog strix z490-h gaming
os: windows 10 pro 21h2

SMBIOS processor id in processor information (4) is documented as the values of registers EAX and EDX for CPUID leaf 1 on x86. If you actually care about the CPU features then call IsProcessorFeaturePresent or CPUID yourself.
I don't know why the value is not reported. Most likely because the BIOS is not setting the values for it or Microsoft removed the support in WMI.

Related

PCIe Not enough MMIO resources for SR-IOV

I'm trying to write a kernel module for an Intel FPGA design supporting PCIe SR-IOV and placed in the x16 PCIe slot of an IBase M991 Mainboard (Q170 PCH, VT-d activated in BIOS, Integrated graphics only mode enabled).
The CPU is an Intel Core i7-6700TE, which also supports virtualization.
Furthermore I'm using a Yocto - Morty Distribution (Linux Kernel 4.19) with the following Kconfigs enabled:
CONFIG_PCI_IOV=y
CONFIG_PCI_DEBUG=y
CONFIG_INTEL_IOMMU_SVM=y
CONFIG_PCI_REALLOC_ENABLE_AUTO=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_IRQ_REMAP=y
CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
CONFIG_DYNAMIC_DEBUG=y
When doing all of this I see my driver loading (probe function gets called), but after calling pci_enable_sriov with the number of VF I want to activate I get the kernel message
not enough MMIO resources for SR-IOV
What am I doing wrong here? Is there an init function I need to call?
Many thanks for your help.
Edit: More information about the PCIe device:
1 PF, 8 VF
2 BARs (BAR0 and BAR2)
non prefetchable, 32 bit BARs
each BAR size is 4 kB (12bit)

How can I check the size of the ROM chip which contains BIOS?

I'm having an AMD ASUS mainboard which support 2nd gen of Ryzen and AMD promised that changing mainboard is not necessary for upgrading a new CPU. But according to this article, not all of mainboards can be upgraded to new Ryzen CPU due to the tiny size of the ROM chip. So I want to check my ROM chip's size to check if my mainboard is compatible with a new CPU. I'm using both Windows and Linux so I can use solutions of both OS.
Thanks a lot, and sorry for my bad English.
Use MSSmBios_RawSMBiosTables for fetching the specified firmware table from the firmware table provider.
$Biostables = Get-WmiObject -ComputerName . -Namespace root\wmi -Query "
SELECT * FROM MSSmBios_RawSMBiosTables"
Write-Host $("Your ROM Size: " + (64 * $obj.SMBiosData[9] + 64) + " KiB")

Windows Affinity

When setting the Windows CPU affinity mask for Core 2, is the mask supposed to be 0x0010 or 0x0001? I have seen an example where the mask was set to 0x0010 for Core 0 but this didn't make much sense?
0x0000 allows no CPUs to be scheduled for this process/thread at all. (it will be suspended, assuming setting the affinity doesn't fail during parameter validation, which might be different on different Windows versions)
0x0001 allows Core 0, only
0x0002 allows Core 1, only
0x0003 allows both Core 0 and Core 1.
You can taskset it as well
("taskset -cp 2 %d"% os.getpid())

How do I get hardware info such as CPU name, total RAM, etc. with VB6?

Title pretty much explains it all. I need to get some hardware information such as CPU info, and total RAM with VB6. Ideally, it would return something like this for the CPU:
Intel Core 2 Quad Q8500 2.66 GHz
and for the RAM something simple like an integer for the amount of MB the computer has total.
in plain C, if interested:
#include <intrin.h>
int cpuInfo[4] = {-1};
char CPUBrandString[0x40];
memset(CPUBrandString, 0, sizeof(CPUBrandString));
__cpuid(cpuInfo, 0x80000002);
memcpy(CPUBrandString, cpuInfo, sizeof(cpuInfo));
__cpuid(cpuInfo, 0x80000003);
memcpy(CPUBrandString + 16, cpuInfo, sizeof(cpuInfo));
__cpuid(cpuInfo, 0x80000004);
memcpy(CPUBrandString + 32, cpuInfo, sizeof(cpuInfo));
You could use WMI to get this information:
http://msdn.microsoft.com/en-us/library/aa394084(v=VS.85).aspx
This information is also available in the registry (if WMI isn't to your liking):
HKLM/HARDWARE/DESCRIPTION/System/CentralProcessor
NOTE: Registry keys and locations may change. The WMI API is designed as a more stable source for this kind of information.
RAM - GetPhysicallyInstalledSystemMemory (GlobalMemoryStatusEx on earlier versions)
CPU - GetSystemInfo (not in the desired friendly form, I'm afraid). There is a very extensive discussion of more detailed CPU info retrieval here.

How can I programmatically determine the maximum user-mode space of the (windows) OS?

I'm writing a diagnostic app which needs to log what the user has set as his user-mode space a.k.a. user-mode virtual address space
a.k.a. the /3GB switch in WinXP or the increaseuserva switch in bcdedit on Vista/Win7.
Either of C++ or C++/CLI will do.
Any ideas ?
GlobalMemoryStatusEx will give you a MEMORYSTATUSEX struct with ullTotalVirtual:
The size of the user-mode portion of the virtual address space of the calling process, in bytes. This value depends on the type of process, the type of processor, and the configuration of the operating system. For example, this value is approximately 2 GB for most 32-bit processes on an x86 processor and approximately 3 GB for 32-bit processes that are large address aware running on a system with 4-gigabyte tuning enabled.
Note that you'd have to mark your EXE as LARGEADDRESSAWARE in order to see 3GB in your process.
I think there's another function that also returns this info (no - not GlobalMemoryStatus which is deprecated) along with processor info - but I can't recall it ATM.

Resources