For example:
Where does the lshw
- list hardware program read the info out?
(I mean on a software level, that there are probably some ROM chips here and there is of course the case)
Basically everything, (the user could potentially want to know) about the machine and system internals, is provided to the user by the kernel with virtual filesystems. i.e. procfs mounted at /proc
right?
So is the only way to read (non process/user-land stuff),(means the actual system-software/kernel/os infos and not some isolated process which gets told everything) is through that virtual filesystems.
How does the kernel get it? I mean does it see the ROM chips/Sensors as I/O Hardware and do they have an physical address which is memory mapped?
For the CPU I know that x86 has a special instruction which puts the cpuinfo in a register out of which it can be read with additionall instructions.(i.e. lscpu
)
/sys
– strugee Oct 17 '16 at 21:41/proc
, just with different information available. see https://en.wikipedia.org/wiki/Sysfs – strugee Oct 17 '16 at 22:58