Hi,
I was wondering if there is a way to build a list of the hardware of a computer at boot time... The idea is to be dispensed to use the BIOS. Why ? Personally, I don't like it Its interruptions are hiding all the interesting stuff, and it is not funny.
So, theoretically, it should be possible to write small boot-time drivers using IN and OUT instructions. Why wouldn't it be possible since it is what the BIOS does ? Whatever, I would like to now if there is a way to use the I/O instructions to know what kind of hardware is connected (maybe only to know which bootable devices are present) and execute code in consequence.
Thanks beforehand
Boot-time list of hardware
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Boot-time list of hardware
For the vast majority of hardware, you don't really need bios involvement to detect what's out there. The only thing you typically can't do is to try to reset or configure such hardware because you might interfere with the bios' own plans.
As far as implementations are concerned, the mechanics for detection work pretty much the same.
As far as implementations are concerned, the mechanics for detection work pretty much the same.
Re: Boot-time list of hardware
AFAIK most if not all modern peripherals are connected via PCI of some description. (USB is a PCI device IIRC).
Given the PCI I/O ports are mostly fixed addresses, it is totally possible to probe connected devices at boot-time (possibly in real mode too, although I foresee some problems with the higher MMIO regions).
Given the PCI I/O ports are mostly fixed addresses, it is totally possible to probe connected devices at boot-time (possibly in real mode too, although I foresee some problems with the higher MMIO regions).
[nx] kernel: http://github.com/zhiayang/nx
Re: Boot-time list of hardware
It gets a little more fun if you actually remember that the BIOS loads and executes your code. Already there, you have failed to not use the BIOS. Worse, it just loads the master boot record and I bet you can't store a whole real driver in there - you have to use the BIOS again to load a couple more parts of your boot-loader. That's twice you've used the BIOS. However, now you can load enough code such that your boot-loader can use real drivers to communicate with real hardware and execute your operating system entirely without BIOS help.
Oh wait, that's how actual operating systems work. They just use the BIOS to bootstrap themselves and then never use it again. It doesn't really matter, it's just a thing that gets you running.
Oh wait, that's how actual operating systems work. They just use the BIOS to bootstrap themselves and then never use it again. It doesn't really matter, it's just a thing that gets you running.