I am writing a very simple operating system as a learning tool for myself. My current task is detecting as much about the hardware as possible.
I have so far been able to find a lot of information about the CPU using the CPUID instruction. The one thing I can't seem to find is the number or physical and/or logical cores. Is there a way to do this using a combination of x86 assembly and C?
I am writing the operating system, so the code can be run in supervisor mode, and there are no system libraries to query for this information.