Hello,

Last year some time, I asked a question about getting a peripheral's assigned memory address(es) from the BIOS.
I was told that the BIOS puts this info in some predefined memory location for the OS to query.
But, where is this location exactly?
How do I find it?
More specifically, let's say you want to write your own bootable code.
Further, your code is going to be really simple.
So simple, in fact, that it only consists of a single instruction.
Your bootable code is going to write a byte or word or double word or whatever to a register or RAM location on a peripheral device, not main RAM or a CPU register.
How do you find out what address(es) have been assigned to that peripheral memory location by the BIOS / UEFI?
Here's a more concrete example:

My bootable code's first and only instruction will write the number 11H to a register located on the sound card.

If the BIOS / UEFI initialization code did its job properly, that sound card register should be mapped into the CPU's memory space and/or IO space.
I need to find that address to accomplish that write.
How do I find it?
This is what real operating systems must do at some point.
When you open control panel / device manager in Windows, you see all the memory ranges for peripherals listed there.
At some point, Windows must have queried the BIOS /UEFI to find this data.

Again, how is this done?

Thanks.




I didn't find the right solution from the internet.
References:
https://www.computerforum.com/threads/h … es.242738/

Marketing Campaign Examples

Отредактировано RyanCaleb (2017-09-04 07:42:33)