2

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)

Junaga
  • 379
  • 2
  • 16

1 Answers1

1

On x86 hardware, it gets a lot of its information from DMI, an API to get information from the BIOS. More details at github : lshw

steve
  • 21,892
  • So the firmware reads the hardware for info(pci/sensors/storage) and gives it to the kernel after the kernel has booted? Just trying to understand this. Also, thanks for the answer! – Junaga Oct 17 '16 at 20:33