How to determine port numbers for peripherals?

I know that peripherals, such as a hard driver, floppy disk driver, etc., are controlled by reading / writing certain control registers on their device controllers.

I am interested in the following questions:

  • Is it true that when these peripheral devices are connected to a computer, the addresses (port numbers) of their control registers are thus determined by the way they are connected to the address bus (i.e., hard wiring rules, and not some soft things )?
  • Who defines the port number assignment scheme?
  • If I was provided with a bare computer (without an operating system and with many peripherals), how can I determine the purpose of the port number so that I can use them to control the peripherals.

Finally and as usual, thanks for your patience and response. 8 ^)

+3
source share
2 answers

For a bare computer, which is a relatively new PC-compatible machine, you can find the answers in the “Regular PCI” description:

In a typical system, the firmware (or operating system) requests all PCI buses at startup (via the PCI configuration space) to find out which devices are present and which system resources (memory space, I / O space, interrupt lines, etc.) . He then allocates resources and tells each device what its distribution is.

PCI , , , .

...

, PCI 256 PCI-. PCI . -, , . , PCI . BIOS /.

, () / , . , .

+3

, / ( ) . , IBM PC , , IBM PC.

AFAIK, -. , ( , , PCI) , . , P'n'P, .

AFAIK, / () , ATA (IDE) HDD FDD-, PS/2 .. , .

0

Source: https://habr.com/ru/post/1742663/


All Articles