Method and device for enumerating input/output devices
First Claim
1. A method for enumerating input/output (IO) devices in a computer system, wherein the computer system comprises a plurality of nodes and a system main processor, each of the nodes includes a node main processor and an IO centralized controller connected to an IO device, wherein the system main processor is one of the node main processors, and wherein the method comprises:
- instructing, by the system main processor, the node main processor in each node to simultaneously enumerate the IO centralized controller and the IO device connected to the IO centralized controller;
acquiring, by the system main processor, information of IO devices enumerated by the node main processors;
pre-allocating, by the system main processor, resources to each node;
establishing, by the system main processor, a resource pre-allocation table in a computer system memory; and
allocating, by the system main processor, resources to each node according to the resource pre-allocation table, wherein;
the allocating resources to each node according to the resource pre-allocation table comprises;
instructing each node main processor to scan the IO centralized controller and the IO device connected to the IO centralized controller in each node, andwhen the IO device is found;
allocating resources to the IO device according to the resource pre-allocation table,recording resource allocation information in the computer system memory,writing a resource allocation record into a register of the IO device, andsetting a non-resource allocation configuration item of the IO device.
2 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the present disclosure relate to a method and a device for enumerating input/output devices (IO devices). The method for enumerating input/output devices includes: acquiring an identifier of each processor and an identifier of each input/output (IO) centralized controller in a system; separately instructing processors to simultaneously enumerate a specific IO centralized controller and an input/output IO device connected to the specific IO centralized controller, according to the identifier of each processor and the identifier of each IO centralized controller; and acquiring related information of IO devices enumerated by the instructed processors. According to the embodiments of the present disclosure, the work of enumerating the system IO devices may be allocated to multiple processors to be carried out simultaneously, so as to greatly reduce time consumed in the enumeration process, and to accelerate a system initialization process.
10 Citations
4 Claims
-
1. A method for enumerating input/output (IO) devices in a computer system, wherein the computer system comprises a plurality of nodes and a system main processor, each of the nodes includes a node main processor and an IO centralized controller connected to an IO device, wherein the system main processor is one of the node main processors, and wherein the method comprises:
-
instructing, by the system main processor, the node main processor in each node to simultaneously enumerate the IO centralized controller and the IO device connected to the IO centralized controller; acquiring, by the system main processor, information of IO devices enumerated by the node main processors; pre-allocating, by the system main processor, resources to each node; establishing, by the system main processor, a resource pre-allocation table in a computer system memory; and allocating, by the system main processor, resources to each node according to the resource pre-allocation table, wherein;
the allocating resources to each node according to the resource pre-allocation table comprises;instructing each node main processor to scan the IO centralized controller and the IO device connected to the IO centralized controller in each node, and when the IO device is found; allocating resources to the IO device according to the resource pre-allocation table, recording resource allocation information in the computer system memory, writing a resource allocation record into a register of the IO device, and setting a non-resource allocation configuration item of the IO device.
-
-
2. A method for enumerating input/output (IO) devices in a computer system, wherein the computer system comprises a plurality of processors and a plurality of IO centralized controllers, each IO centralized controller being connected to an IO device, wherein one of the processors is a system main processor, and wherein the method comprises:
-
arranging, by the system main processor, the IO centralized controllers into multiple groups; for each group of the IO centralized controllers, instructing, by the system main processor, a designated processor from the processors to simultaneously enumerate each IO centralized controller and the IO device connected to each IO centralized controller; acquiring, by the system main processor, information of IO devices enumerated by the designated processors; pre-allocating resources to each group of IO centralized controllers according to the number of the IO centralized controllers in each group; establishing a resource pre-allocation table in a computer system memory; and allocating resources to the enumerated IO devices according to the resources pre-allocated to each group of IO centralized controllers, wherein;
the allocating resources to the enumerated IO devices according to the resources pre-allocated to each group of IO centralized controllers comprises;for each group of the IO centralized controllers, instructing the designated processor to scan each IO centralized controller and the IO device connected to each IO centralized controller; and when the IO device is found; allocating resources to the IO device according to resources pre-allocated to each group of IO centralized controllers, recording resource allocation information in the computer system memory, writing a resource allocation record into a register of the IO device, and setting a non-resource allocation configuration item of the IO device.
-
-
3. A non-transitory computer readable storage medium, comprising instructions which, when executed in a computer system, wherein the computer system comprises a plurality of nodes and a system main processor, each of the nodes includes a node main processor and an IO centralized controller connected to an IO device, and the system main processor is one of node main processors, cause the computer system to carry out steps of:
-
instructing, by the system main processor, the node main processor in each node to simultaneously enumerate the IO centralized controller and the IO device connected to the IO centralized controller; acquiring, by the system main processor, information of IO devices enumerated by the node main processors; pre-allocating, by the system main processor, resources to each node; establishing, by the system main processor, a resource pre-allocation table in a computer system memory; and allocating, by the system main processor, resources to each node according to the resource pre-allocation table, wherein;
the allocating resources to each node according to the resource pre-allocation table comprises;instructing each node main processor to scan the IO centralized controller and the IO device connected to the IO centralized controller in each node, and when the IO device is found; allocating resources to the IO device according to the resource pre-allocation table, recording resource allocation information in the computer system memory, writing a resource allocation record into a register of the IO device, and setting a non-resource allocation configuration item of the IO device.
-
-
4. A non-transitory computer readable storage medium, comprising instructions which, when executed in a computer system, wherein the computer system comprises a plurality of processors and a plurality of IO centralized controllers, each IO centralized controller being connected to an IO device, one of the processors being a system main processor, cause the computer system to carry out steps of:
-
arranging, by the system main processor, the IO centralized controllers into multiple groups; for each group of the IO centralized controllers, instructing, by the system main processor, a designated processor from the processors to simultaneously enumerate each IO centralized controller and the IO device connected to each IO centralized controller; acquiring, by the system main processor, information of the IO devices enumerated by the designated processors; pre-allocating, by the system main processor, resources to each node; establishing, by the system main processor, a resource pre-allocation table in a computer system memory; and allocating, by the system main processor, resources to each node according to the resource pre-allocation table, wherein the allocating resources to the enumerated IO device according to the resources pre-allocated to each group of IO centralized controllers comprises; for each group of the IO centralized controllers, instructing the designated processor to scan each IO centralized controller and the IO device connected to each IO centralized controller; and when the IO device is found; allocating resources to the IO device according to resources pre-allocated to each group of IO centralized controllers, recording resource allocation information in the computer system memory, writing a resource allocation record into a register of the IO device, and setting a non-resource allocation configuration item of the IO device.
-
Specification