WO2017079951A1 - Computer device and registration method for io device of the computer device - Google Patents

Computer device and registration method for io device of the computer device Download PDF

Info

Publication number
WO2017079951A1
WO2017079951A1 PCT/CN2015/094497 CN2015094497W WO2017079951A1 WO 2017079951 A1 WO2017079951 A1 WO 2017079951A1 CN 2015094497 W CN2015094497 W CN 2015094497W WO 2017079951 A1 WO2017079951 A1 WO 2017079951A1
Authority
WO
WIPO (PCT)
Prior art keywords
name
port
memory
computer
processor
Prior art date
Application number
PCT/CN2015/094497
Other languages
French (fr)
Chinese (zh)
Inventor
成永光
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201580071742.6A priority Critical patent/CN107111644A/en
Priority to PCT/CN2015/094497 priority patent/WO2017079951A1/en
Publication of WO2017079951A1 publication Critical patent/WO2017079951A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of computer technology, and in particular, to a technology for registering an input/output (IO) device when a computer device is started.
  • IO input/output
  • the processor of a computer device is generally connected to each IO device through a bus interface, such as a Peripheral Component Interface Express (PCIE) interface, to implement control of the IO device by the processor.
  • PCIE Peripheral Component Interface Express
  • the name of the IO device needs to be registered to the system by the driver, and then the processor can recognize the IO device and control the IO device by the registered name.
  • the specific registration method is as follows: after the computer device is powered on, the Basic Input Output System (BIOS) is started, the operating system is booted, the operating system loads the IO device driver, and the IO device driver uses the common name of the IO device "name%d" "Submitted to the operating system, "name” is the category of the IO device, generally the name of the bus interface to which the IO device is connected, “%d” indicates the number of the IO device to be assigned by the operating system, and the operating system detects the same The order of the class IO devices is assigned a number for the IO device.
  • BIOS Basic Input Output System
  • the IO device connected to the bus interface changes, such as accessing a new IO device, or unplugging the originally connected device, the original device may have been allocated.
  • the name of the IO device changes.
  • the processor of the computing device in FIG. 1 provides two hard disk interfaces, that is, a first hard disk interface and a second hard disk interface.
  • the IO device is generally connected.
  • the position of the bus interface in the bus is sequentially registered with the IO device, where the position of the first hard disk interface in the bus is prior to the second hard disk interface.
  • the operating system assigns the first hard disk the name disk1, but in the process of using the first hard disk.
  • the second hard disk is connected to the interface, and the system first allocates the second hard disk connected to the first hard disk interface because the first hard disk interface is located in the bus before the second hard disk interface.
  • Name disk1 the first hard disk connected to the second hard disk interface
  • the name disk2 is assigned, and the name assigned to the first hard disk is disk1. In this way, the name of the IO device connected to the same bus interface is not fixed and will always change.
  • the upper layer application generally accesses the IO device by driving the name of the registered IO device, if the IO device The name is not fixed, but changes, application access errors will occur.
  • the upper-layer application accesses the first hard disk through the IO device name disk1, but the first hard disk is restarted after the computer accesses the new IO device.
  • the name becomes disk2, and the name of the second hard disk becomes disk1.
  • the upper layer application accesses the second hard disk through the IO device name disk1 instead of the first hard disk, and an access error occurs.
  • Embodiments of the present invention provide a registration technology of an IO device when a computer device is started.
  • a fixed name is registered for each IO device.
  • a first aspect of the embodiments of the present invention provides a computer device, where the computer device includes a processor, an IO device, a memory, and a BIOS memory, where the IO device, the memory, and the BIOS memory are connected to the processor.
  • Storing a system boot program and a name of the IO device in the BIOS memory in the process of executing the boot program, the processor loads a name of the IO device into the memory, and drives the IO device
  • the processor acquires a name of the IO device from the memory, and registers the IO device according to the acquired name of the IO device.
  • the IO device name is stored in the BIOS memory in advance, when registering, the IO device name is directly registered using the name of the preset stored IO device, so that the name of the IO device can be fixed without It changes due to the influence of other factors.
  • the processor configures a name of the IO device according to a user input during execution of the system booting procedure, and stores the name of the IO device in the BIOS memory. In this way, the user can configure the name of the IO device as needed.
  • the processor receives a user input by providing a configuration operation interface during execution of the system boot process.
  • the provided user interface allows the user to configure the IO device name.
  • the IO device includes at least two A device port
  • the name of the IO device stored in the BIOS memory includes a port name of each device port
  • each device port is registered when the processor registers with the IO device. In this way, a fixed name can be further registered for each port of the IO device.
  • each device port of the IO device has a function number, and when the name of the IO device is configured, the processor is based on the received user input and the The feature number of each device port determines the port name for each device port.
  • the port name includes an IO device type and a port number
  • the input of the user is the IO device type and an IO device number
  • the port number is used by the IO device
  • the number and the function number of the device port are determined, and the port number is incremented as the function number is incremented on the basis of the IO device number. This automatically generates a device name for multiple ports of each IO device.
  • the processor loads the name of the IO device into the memory in a Type 9 format in SMBIOS.
  • the IO device name is loaded into the memory using the Type 9 format in the BIOS's existing SMBIOS, simplifying the operation.
  • a second aspect of the embodiments of the present invention provides an IO device registration method for a computer device, where the BIOS memory of the computer device stores a system boot program and an IO device name, and the method includes:
  • the IO device name is obtained from the memory, and the IO device is registered according to the acquired IO device name.
  • the IO device name is stored in the BIOS memory in advance, when registering, the IO device name is directly registered using the name of the preset stored IO device, so that the name of the IO device can be fixed without It changes due to the influence of other factors.
  • the method further includes: during the execution of the system booting procedure, configuring a name of the IO device according to a user input; storing the name of the IO device in In the BIOS memory. In this way, the user can root Configure the name of the IO device as needed.
  • the processor receives a user input by providing a configuration operation interface during execution of the system boot process.
  • the provided user interface allows the user to configure the IO device name.
  • the IO device includes at least two device ports, and the name of the IO device stored in the BIOS memory includes a port name of each device port, in the pair IO When the device registers, it registers each device port of the IO device. In this way, a fixed name can be further registered for each port of the IO device.
  • each device port of the IO device has a function number; when configuring the name of the IO device, according to the input of the received user and each of the The feature number of the device port determines the port name for each device port.
  • the port name includes an IO device type and a port number
  • the input of the user is the IO device type and an IO device number
  • the port number being by the IO
  • the device number and the function number of the device port are determined, and the port number is incremented as the function number is incremented on the basis of the IO device number. This automatically generates a device name for multiple ports of each IO device.
  • the name of the IO device is loaded into the memory in a Type 9 format in SMBIOS.
  • the IO device name is loaded into the memory using the Type 9 format in the BIOS's existing SMBIOS, simplifying the operation.
  • Embodiments of the present invention register a fixed name for each IO device.
  • the name of the IO device does not change with the registration order of the IO device each time the computer is started.
  • the change so that the IO device connected to multiple IO device interfaces of the same type of computer device changes, such as newly inserted, or unplugged, so that the name of the IO device should not change, to avoid errors.
  • the deployment efficiency is improved.
  • FIG. 1 is a schematic diagram showing changes in the name of an IO device registered when an IO device is registered to a computer device by the prior art.
  • FIG. 2 is a structural diagram of a server to which an embodiment of the present invention is applied.
  • FIG. 3 is a flowchart of a method for configuring a name of an IO device of a computer device according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for registering a name of an IO device of a computer device according to an embodiment of the present invention.
  • FIG. 5 is a structural diagram of a data center to which an embodiment of the invention is applied.
  • FIG. 6 is a structural diagram of two servers serving the same application server in the data center shown in FIG. 5.
  • the server 20 includes a CPU 201, a memory 203, a BIOS memory 204, a bus 202, and an IO device.
  • the memory 203, the BIOS memory 204, the hard disk 205, the first network card 206, and the second network card 207 communicate with the CPU 201 via the bus 202.
  • the hard disk 205, the first network card 206, and the second network card 207 shown in FIG. 2 are all IO devices of the server 20.
  • the bus 202 can include a Peripheral Component Interconnect (PCI) interface, an Accelerated Graphical Port (AGP) interface, or a PCI-E interface.
  • PCI Peripheral Component Interconnect
  • AGP Accelerated Graphical Port
  • the server 20 includes at least two IO devices of the same type.
  • the IO devices of the same type are the first network card 206 and the second network card 207.
  • other IO devices of the same type such as a hard disk, may also be used.
  • the first network card 206 and the second network card 207 both include two ports Port 1 and Port 2.
  • BIOS boot program (not shown) is stored in the BIOS memory 204. After the server 20 is powered on, the CPU 201 acquires the system boot program from the BIOS memory 204, and runs the system boot program. An operating system (not shown) stored in the hard disk 205 is booted into the memory 203, and then the operating system is executed, and a driver (not shown) of each IO device is called from the hard disk 205. Each IO device is registered.
  • a fixed name can be set for each IO device before the IO device is registered, and the set name is stored.
  • the BIOS memory In order to enable the same type of IO device to register a fixed name every time the server 20 starts up, a fixed name can be set for each IO device before the IO device is registered, and the set name is stored. In the BIOS memory.
  • the manufacturer of the server may rewrite the system boot program before the server leaves the factory, so that the system boot program is provided with a configuration interface for setting the IO device name when the CPU 201 is running, and the specific setting method is shown in FIG. 3 . Said.
  • the CPU 301 runs a system boot program (step S302), and the system boot program can provide an interface for asking the user whether to perform IO device name setting, and the user can select the IO device on the operation interface as needed.
  • the CPU 301 provides an IO device configuration interface to the user through the system boot program in response to the user's operation (step S303), and the user can input the name of the IO device to be set through the configuration interface, and the input name includes Two parts, one part is the category of the IO device, the category is generally the name of the bus interface to which the IO device is connected, and the other is the number of the IO device.
  • the CPU 301 After receiving the setting input of the user (step 304), the CPU 301 receives the received The name of the IO device set by the user is stored in the BIOS memory 204 (step S305).
  • the name of the IO device set by the user is stored in the BIOS memory 204, a mapping relationship between the IO device name and the port connecting the IO device is established. In this way, the IO device name can be associated with the port to which the IO device is connected.
  • the IO device is subsequently driven, since the name of the IO device is bound to the interface of the connected IO device, the name of the IO device does not change as the interface driving order changes.
  • the IO device itself includes a plurality of ports.
  • the first network card 206 in this embodiment includes two ports port1 and port2, each of port1 and port2. Both have a feature number.
  • the first network card 207 in this embodiment includes two ports port1 and port2, and each of port1 and port2 has a function number.
  • the CPU 201 generates port names for port1 and port2 respectively according to the received category of the IO device input by the user, the number of the IO device, and the function number of each port of the IO device input by the user.
  • the port name includes an IO device type and a port number.
  • the port number is determined by the IO device number and a function number of the device port, and the port number is incremented as the function number increases on the basis of the IO device number.
  • the function numbers of each port are generally fixed, and are generally numeric and arranged in order.
  • the function numbers of the two ports of the first NIC are 1 and 2 respectively (for example, the function number of port1 is 1, port) If the function number of 2 is 2), after the CPU 301 receives the IO device type and the IO device number input by the user, the type of the IO device remains unchanged, and the port number is incremented as the function number is incremented, for example, assuming the user The IO device type of the first NIC is eth, and the IO device number is 1, the CPU 301 generates the port name eth1 for the port port 1 of the first NIC with the function number 1, and is the port with the function number 2 of the first NIC.
  • Port2 generates the port name eth2, and assumes that the IO device type of the second NIC input by the user is eth, and the IO device number is 3, the CPU 301 generates the port name eth3 for the port port 1 of the second NIC with the function number 1 being the second port. Port port 2 with the function number 2 of the NIC generates the port name eth4. The generated port name is then stored in the BIOS memory 204.
  • the function number of the IO device port may not be a number, and the port name generation may not necessarily be a number.
  • the function number is incremented and incremented, and any manner of generating the port name of the IO device by the number input by the user and the port number is included in the protection scope of the present invention.
  • the IO device name can be registered by using the IO device name stored in the BIOS memory 204.
  • the specific registration method is as shown in FIG. 4.
  • the CPU calls the driver driver IO device (step S401), loads the IO device name from the BIOS memory 204 to the memory 203 (step S402), after the operating system is loaded, CPU301 can be shipped
  • the driver of each IO device registers each IO device (step S403), and at the time of registration, determines whether there is a name of the IO device in the memory 203 (step S404), and if so, acquires the name of the IO device Registration is performed, and if not, the CPU 301 assigns the device name to the IO device, and then registers with the assigned device name (step S405).
  • step S402 when the IO device name is loaded from the BIOS memory 204 to the memory 203, the mapping relationship between the IO device name and the port connecting the IO device is loaded.
  • the driver registers an IO device, the name of the IO device can be found according to the port to which the IO device is connected.
  • the CPU 301 drives each port of the IO device, that is, the port name of each port of the IO device is obtained from the memory, and the acquired port name pair is utilized. Each port of the IO device is registered.
  • each IO device registers the same name each time it is started, so that the application does not access the IO device with the same name. Will produce an error.
  • step S402 the CPU 201 loads the device name of the IO device into the memory through Type 9 in the SMBIOS (system management BIOS), which is a motherboard or system manufacturing.
  • SMBIOS system management BIOS
  • the unified specification that is required to display the product management information in a standard format, wherein Type 9 is used to manage the system slot information of the motherboard, that is, the bus interface information of the computer device in this embodiment.
  • the IO device registration method of the computer device is also applicable to batch configuration and registration of IO devices of a plurality of servers of a data center.
  • FIG. 6 it is a schematic diagram of an architecture of a data center including multiple servers.
  • One data center 60 includes a plurality of servers 600, and a plurality of servers 600 are connected to the switch 601.
  • the external application server 602 obtains the required data from the server 600 of the data center 60 by connecting to the switch 601.
  • a server 600 is difficult to meet the data requirements of the application server 602, that is, multiple servers 600 are required to provide data services for one application server 602, while servers 600 that serve the same application server 602 require the same configuration.
  • the first server 70 and the second server 71 provide services for the same application server, and the first processor 701 of the first server 70 is connected to the first network card 702 and the second network card 703, the second The second processor 711 of the server 71 is connected to the third network card 712 and the fourth network card 714.
  • the first network card 701 of the first server 70 is the same as the third network card 712 of the second server 71.
  • the second network card 702 of the first server 70 is the same as the fourth network card 714 of the second server 71.
  • the network cards all have two ports port1. And port2, the application server needs to provide services for the application server through port1 of the first network card 701 and port1 of the third network card 712.
  • the operating system may first drive the first.
  • the network card 701 registers, assigns the names of the two ports port1 and port2 of the first network card to eth0 and eth1, and then drives the second network card 702 to register, and assigns the names of the two ports port1 and port2 of the second network card 702 respectively.
  • the operating system may first drive the fourth network card 714 to register, and assign the names of the two ports port1 and port of the fourth network card 714 to eth0 and eth1, respectively, and then drive The third network card 712 registers, and the names registered to the two ports port1 and port2 of the third network card 712 are eth2 and eth3, respectively.
  • the port name of the first network card 701 of the first server 70 is different from the port name of the third network card 712 of the second server 71, but the application server can only access the first server 70 and the second server 71 according to the port name.
  • the device name determines the IO device to be used.
  • the application server actually needs to access the first server 70 through the port 1 of the first network card 701 of the first server 70, access the second through the port 1 of the third network card 712 of the second server 71.
  • the server 71 at this time, according to the naming of the IO device by the operating system, respectively, the port 1 of the first network card 701 of the first server 70 and the port 1 of the fourth network card 714 of the second server 71 respectively generate an error. If the same IO device has different device names in the data center bulk service deployment, it needs to perform special identification and confirmation processing on a server-by-server basis, which seriously affects the efficiency and even the goal of not achieving batch deployment.
  • you register the IO device register it according to the method in Figure 4.
  • Make servers that serve the same application server The IO device name is fixed and will not change due to the different drive order, which improves the configuration and registration efficiency of the server's IO device in the data center.
  • the IO device registration technology is described in detail when the computer device provided by the embodiment of the present invention is started.
  • the principle and implementation manner of the present invention are described in the following. The description of the above embodiment is only for helping.
  • the method of the present invention and its core idea are understood; at the same time, for those skilled in the art, according to the idea of the present invention, there are changes in the specific embodiments and application scopes. It should be understood that the invention is limited.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiments of the present invention relate to the technology of IO device registration when a computer device is started, and provided are a computer device and a registration method for an IO device of the computer device. The computer device comprises: a processor, an IO device, a memory and a BIOS memory, wherein the IO device, the memory and the BIOS memory are connected to the processor; the BIOS memory stores a system boot program and the name of the IO device; and the processor loads the name of the IO device to the memory in the process of executing the boot program, acquires the name of the IO device from the memory when driving the IO device, and registers the IO device according to the acquired name of the IO device. Thus, the name of each IO device can be fixed, so as to avoid the problem of the occurrence of an access error for an application server caused by a change in the IO device name or of low efficiency when servers are deployed in batches.

Description

计算机设备及计算机设备的IO设备注册方法IO device registration method for computer equipment and computer equipment 技术领域Technical field
本发明涉及计算机技术领域,特别涉及计算机设备启动时输入输出(Input/Output,IO)设备注册的技术。The present invention relates to the field of computer technology, and in particular, to a technology for registering an input/output (IO) device when a computer device is started.
背景技术Background technique
计算机设备如服务器的处理器一般通过总线接口,如快捷外围元件互连(Peripheral Component Interface Express,PCIE)接口与各IO设备连接,以实现处理器对IO设备的控制。但一般IO设备在连接至总线接口后,还需要通过驱动将IO设备的名称注册至系统,然后处理器才可以识别IO设备,并通过所注册的名称对IO设备进行控制。The processor of a computer device, such as a server, is generally connected to each IO device through a bus interface, such as a Peripheral Component Interface Express (PCIE) interface, to implement control of the IO device by the processor. However, after the IO device is connected to the bus interface, the name of the IO device needs to be registered to the system by the driver, and then the processor can recognize the IO device and control the IO device by the registered name.
具体的注册方法为:计算机设备上电后,基本输入输出系统(Basic Input Output System,BIOS)启动,引导操作系统,操作系统加载IO设备驱动,IO设备驱动将IO设备的通用名称“name%d”提交给操作系统,“name”是IO设备的类别,一般为IO设备所连接的总线接口的名称,“%d”表示需要操作系统分配的IO设备的编号,操作系统则根据侦测到同一类别IO设备的先后顺序为IO设备分配编号。The specific registration method is as follows: after the computer device is powered on, the Basic Input Output System (BIOS) is started, the operating system is booted, the operating system loads the IO device driver, and the IO device driver uses the common name of the IO device "name%d" "Submitted to the operating system, "name" is the category of the IO device, generally the name of the bus interface to which the IO device is connected, "%d" indicates the number of the IO device to be assigned by the operating system, and the operating system detects the same The order of the class IO devices is assigned a number for the IO device.
但是在一个包括多个同类型的总线接口的计算机设备中,由于连接至总线接口的IO设备会发生变化,比如接入新的IO设备,或者拔掉原来连接的设备,都可能使原来已经分配了名称的IO设备的名称发生变化,例如图1中的计算设备的处理器提供两个硬盘接口,即第一硬盘接口及第二硬盘接口,在计算机设备启动时,一般会按照连接IO设备的总线接口在总线中的位置顺序进行IO设备的注册,在此,第一硬盘接口在总线中的位置顺序前于第二硬盘接口。在一次使用时,若第二硬盘接口连接了第一硬盘,第一硬盘接口没有连接IO设备,则操作系统给第一硬盘分配的名称为disk1,但在使用的过程中,又在第一硬盘接口上连接了第二硬盘,则在系统下次启动时,由于第一硬盘接口在总线中的位置前于所述第二硬盘接口,则系统首先给第一硬盘接口所连接的第二硬盘分配名称disk1,给第二硬盘接口连接的第一硬盘 分配名称disk2,而第一硬盘之前所分配的名称为disk1。如此,则导致连接至同样的总线接口的IO设备的名称不是固定的,总是会发生变化,而在实际使用中,上层应用一般通过驱动注册的IO设备的名称访问IO设备,如果IO设备的名称不是固定的,而是变化的,则会发生应用访问错误,例如,本来上层应用是通过IO设备名称disk1访问第一硬盘,但在计算机接入新的IO设备后重启时,第一硬盘的名称变为了disk2,第二硬盘的名称变为了disk1,这样,上层应用通过IO设备名称disk1访问的是第二硬盘,而不是第一硬盘,如此则发生访问错误。However, in a computer device that includes multiple bus interfaces of the same type, since the IO device connected to the bus interface changes, such as accessing a new IO device, or unplugging the originally connected device, the original device may have been allocated. The name of the IO device changes. For example, the processor of the computing device in FIG. 1 provides two hard disk interfaces, that is, a first hard disk interface and a second hard disk interface. When the computer device is started, the IO device is generally connected. The position of the bus interface in the bus is sequentially registered with the IO device, where the position of the first hard disk interface in the bus is prior to the second hard disk interface. In one use, if the first hard disk is connected to the first hard disk and the first hard disk interface is not connected to the IO device, the operating system assigns the first hard disk the name disk1, but in the process of using the first hard disk. The second hard disk is connected to the interface, and the system first allocates the second hard disk connected to the first hard disk interface because the first hard disk interface is located in the bus before the second hard disk interface. Name disk1, the first hard disk connected to the second hard disk interface The name disk2 is assigned, and the name assigned to the first hard disk is disk1. In this way, the name of the IO device connected to the same bus interface is not fixed and will always change. In actual use, the upper layer application generally accesses the IO device by driving the name of the registered IO device, if the IO device The name is not fixed, but changes, application access errors will occur. For example, the upper-layer application accesses the first hard disk through the IO device name disk1, but the first hard disk is restarted after the computer accesses the new IO device. The name becomes disk2, and the name of the second hard disk becomes disk1. Thus, the upper layer application accesses the second hard disk through the IO device name disk1 instead of the first hard disk, and an access error occurs.
发明内容Summary of the invention
本发明实施例提供计算机设备启动时IO设备的注册技术,在对IO设备注册时,为每个IO设备注册固定的名称。Embodiments of the present invention provide a registration technology of an IO device when a computer device is started. When registering an IO device, a fixed name is registered for each IO device.
本发明实施例的第一方面提供一种计算机设备,所述计算机设备包括处理器、IO设备、内存、及BIOS存储器,所述IO设备、内存、及BIOS存储器与所述处理器连接,在所述BIOS存储器中存储了系统引导程序及所述IO设备的名称,在执行所述引导程序的过程中,所述处理器将所述IO设备的名称加载至所述内存,在驱动所述IO设备时,所述处理器从所述内存中获取所述IO设备的名称,并根据所获取的所述IO设备的名称对所述IO设备进行注册。这样,由于预先将IO设备的名称存储在BIOS存储器中,在注册时,直接使用预设存储的IO设备的名称对IO设备名称进行注册,这样就可以使IO设备的名称固定下来,而不会因为其他因素的影响而发生变化。A first aspect of the embodiments of the present invention provides a computer device, where the computer device includes a processor, an IO device, a memory, and a BIOS memory, where the IO device, the memory, and the BIOS memory are connected to the processor. Storing a system boot program and a name of the IO device in the BIOS memory, in the process of executing the boot program, the processor loads a name of the IO device into the memory, and drives the IO device The processor acquires a name of the IO device from the memory, and registers the IO device according to the acquired name of the IO device. In this way, since the name of the IO device is stored in the BIOS memory in advance, when registering, the IO device name is directly registered using the name of the preset stored IO device, so that the name of the IO device can be fixed without It changes due to the influence of other factors.
在所述第一方面的一个实施例中,所述处理器在执行所述系统引导程序过程中,根据用户的输入配置所述IO设备的名称,并将所述IO设备的名称存储在所述BIOS存储器中。这样,用户可以根据需要对IO设备的名称进行配置。In an embodiment of the first aspect, the processor configures a name of the IO device according to a user input during execution of the system booting procedure, and stores the name of the IO device in the BIOS memory. In this way, the user can configure the name of the IO device as needed.
在所述第一方面的另外一个实施例中,所述处理器在执行所述系统引导程序过程中,通过提供配置操作界面接收用户的输入。所提供的操作界面可以方便用户进行IO设备名称的配置。In still another embodiment of the first aspect, the processor receives a user input by providing a configuration operation interface during execution of the system boot process. The provided user interface allows the user to configure the IO device name.
在所述第一方面的另外一个是实例中,所述IO设备包括至少两个 设备端口,所述BIOS存储器中存储的所述IO设备的名称包括每个设备端口的端口名称,在处理器对IO设备注册时,为每个设备端口进行注册。这样,可以进一步为IO设备的每个端口注册固定的名称。In another example of the first aspect, the IO device includes at least two A device port, the name of the IO device stored in the BIOS memory includes a port name of each device port, and each device port is registered when the processor registers with the IO device. In this way, a fixed name can be further registered for each port of the IO device.
在所述第一方面的另外一个是实例中,所述IO设备的每个设备端口具有功能号,在配置所述IO设备的名称时,所述处理器根据所接收的用户的输入及所述每个设备端口的功能号确定每个设备端口的端口名称。In another example of the first aspect, each device port of the IO device has a function number, and when the name of the IO device is configured, the processor is based on the received user input and the The feature number of each device port determines the port name for each device port.
在所述第一方面的另外一个是实例中,所述端口名称包括IO设备类型和端口编号,所述用户的输入为所述IO设备类型及IO设备编号,所述端口编号由所述IO设备编号和所述设备端口的功能号确定,所述端口编号为在所述IO设备编号的基础上随着所述功能号的递增而递增。这样可以自动为每个IO设备的多个端口生成设备名称。In another example of the first aspect, the port name includes an IO device type and a port number, the input of the user is the IO device type and an IO device number, and the port number is used by the IO device The number and the function number of the device port are determined, and the port number is incremented as the function number is incremented on the basis of the IO device number. This automatically generates a device name for multiple ports of each IO device.
在所述第一方面的另外一个是实施例中,所述处理器将所述IO设备的名称以SMBIOS中的Type9格式加载至所述内存。这样,利用BIOS现有的SMBIOS中的Type9格式将IO设备名称加载至内存,简化操作。In another embodiment of the first aspect, the processor loads the name of the IO device into the memory in a Type 9 format in SMBIOS. In this way, the IO device name is loaded into the memory using the Type 9 format in the BIOS's existing SMBIOS, simplifying the operation.
本发明实施例的第二方面提供一种计算机设备的IO设备注册方法,所述计算机设备的BIOS存储器存储系统引导程序及IO设备名称,所述方法包括:A second aspect of the embodiments of the present invention provides an IO device registration method for a computer device, where the BIOS memory of the computer device stores a system boot program and an IO device name, and the method includes:
在执行所述引导程序的过程中将所述IO设备名称加载至所述计算机设备的内存;Loading the IO device name into a memory of the computer device during execution of the boot program;
在驱动所述计算机设备的IO设备时,从所述内存中获取所述IO设备名称,并根据所获取的所述IO设备名称对所述IO设备进行注册。When the IO device of the computer device is driven, the IO device name is obtained from the memory, and the IO device is registered according to the acquired IO device name.
这样,由于预先将IO设备的名称存储在BIOS存储器中,在注册时,直接使用预设存储的IO设备的名称对IO设备名称进行注册,这样就可以使IO设备的名称固定下来,而不会因为其他因素的影响而发生变化。In this way, since the name of the IO device is stored in the BIOS memory in advance, when registering, the IO device name is directly registered using the name of the preset stored IO device, so that the name of the IO device can be fixed without It changes due to the influence of other factors.
在本发明的第二方面的一个实施例中,所述方法还包括:在执行所述系统引导程序过程中,根据用户的输入配置所述IO设备的名称;将所述IO设备的名称存储在所述BIOS存储器中。这样,用户可以根 据需要对IO设备的名称进行配置。In an embodiment of the second aspect of the present invention, the method further includes: during the execution of the system booting procedure, configuring a name of the IO device according to a user input; storing the name of the IO device in In the BIOS memory. In this way, the user can root Configure the name of the IO device as needed.
在本发明的第二方面的另一个实施例中,所述处理器在执行所述系统引导程序过程中,通过提供配置操作界面接收用户的输入。所提供的操作界面可以方便用户进行IO设备名称的配置。In another embodiment of the second aspect of the present invention, the processor receives a user input by providing a configuration operation interface during execution of the system boot process. The provided user interface allows the user to configure the IO device name.
在本发明的第二方面的另一个实施例中,所述IO设备包括至少两个设备端口,所述BIOS存储器中存储的所述IO设备的名称包括每个设备端口的端口名称,在对IO设备注册时,为对所述IO设备的每个设备端口进行注册。这样,可以进一步为IO设备的每个端口注册固定的名称。In another embodiment of the second aspect of the present invention, the IO device includes at least two device ports, and the name of the IO device stored in the BIOS memory includes a port name of each device port, in the pair IO When the device registers, it registers each device port of the IO device. In this way, a fixed name can be further registered for each port of the IO device.
在本发明的第二方面的另一个实施例中,所述IO设备的每个设备端口具有功能号;在配置所述IO设备的名称时,为根据所接收的用户的输入及所述每个设备端口的功能号确定每个设备端口的端口名称。In another embodiment of the second aspect of the present invention, each device port of the IO device has a function number; when configuring the name of the IO device, according to the input of the received user and each of the The feature number of the device port determines the port name for each device port.
在本发明的第二方面的另一个实施例中,所述端口名称包括IO设备类型和端口编号,所述用户的输入为所述IO设备类型及IO设备编号,所述端口编号由所述IO设备编号和所述设备端口的功能号确定,所述端口编号为在所述IO设备编号的基础上随着所述功能号的递增而递增。这样可以自动为每个IO设备的多个端口生成设备名称。In another embodiment of the second aspect of the present invention, the port name includes an IO device type and a port number, and the input of the user is the IO device type and an IO device number, the port number being by the IO The device number and the function number of the device port are determined, and the port number is incremented as the function number is incremented on the basis of the IO device number. This automatically generates a device name for multiple ports of each IO device.
在本发明的第二方面的另一个实施例中,所述IO设备的名称以SMBIOS中的Type9格式加载至所述内存。这样,利用BIOS现有的SMBIOS中的Type9格式将IO设备名称加载至内存,简化操作。In another embodiment of the second aspect of the present invention, the name of the IO device is loaded into the memory in a Type 9 format in SMBIOS. In this way, the IO device name is loaded into the memory using the Type 9 format in the BIOS's existing SMBIOS, simplifying the operation.
本发明的实施例通过为每个IO设备注册固定的名称,在计算机设备具有多个同类型的IO设备时,IO设备的名称不会随着计算机每次启动时,IO设备的注册顺序的变化而变化,从而在计算机设备的多个同类型的IO设备接口所连接的IO设备发生变化,例如新插入,或者拔掉时,使应有的IO设备的名称不会发生变化,避免发生错误,另外在对计算机设备进行批量部署时,提高部署效率。Embodiments of the present invention register a fixed name for each IO device. When the computer device has multiple IO devices of the same type, the name of the IO device does not change with the registration order of the IO device each time the computer is started. The change, so that the IO device connected to multiple IO device interfaces of the same type of computer device changes, such as newly inserted, or unplugged, so that the name of the IO device should not change, to avoid errors. In addition, when the computer equipment is deployed in batches, the deployment efficiency is improved.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而 易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the descriptions of the prior art will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without any inventive labor.
图1为通过现有技术对计算机设备进行IO设备注册时所注册的IO设备名称会发生变化的示意图。FIG. 1 is a schematic diagram showing changes in the name of an IO device registered when an IO device is registered to a computer device by the prior art.
图2为本发明的实施例所应用的服务器的结构图。2 is a structural diagram of a server to which an embodiment of the present invention is applied.
图3为本发明实施例提供的计算机设备的IO设备的名称配置方法流程图。FIG. 3 is a flowchart of a method for configuring a name of an IO device of a computer device according to an embodiment of the present invention.
图4为本发明实施例提供的计算机设备的IO设备的名称注册方法流程图。FIG. 4 is a flowchart of a method for registering a name of an IO device of a computer device according to an embodiment of the present invention.
图5为发明实施例所应用的数据中心的架构图。FIG. 5 is a structural diagram of a data center to which an embodiment of the invention is applied.
图6为图5所示数据中心中为同一应用服务器提供服务的两台服务器的结构图。FIG. 6 is a structural diagram of two servers serving the same application server in the data center shown in FIG. 5.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
如图2所示,为计算机设备如服务器20的结构图,所述服务器20包括CPU201、内存203、BIOS存储器204、总线202及IO设备。所述内存203、BIOS存储器204、硬盘205、第一网卡206和第二网卡207通过总线202与CPU201通信。图2所示的硬盘205、第一网卡206、第二网卡207均为服务器20的IO设备。所述总线202可以包括外围部件互连(Peripheral Component Interconnect,PCI)接口、加速图像处理端口(Accelerate Graphical Port,AGP)接口或PCI-E接口。在本实施例的应用场景中,所述服务器20包括至少两个相同类型的IO设备,本实施例中,所述相同类型的IO设备为第一网卡206及第二网卡207,在其他 实施例中,也可以是其他相同类型的IO设备,如硬盘。所述第一网卡206及第二网卡207都包括两个端口Port 1及Port 2。As shown in FIG. 2, which is a structural diagram of a computer device such as the server 20, the server 20 includes a CPU 201, a memory 203, a BIOS memory 204, a bus 202, and an IO device. The memory 203, the BIOS memory 204, the hard disk 205, the first network card 206, and the second network card 207 communicate with the CPU 201 via the bus 202. The hard disk 205, the first network card 206, and the second network card 207 shown in FIG. 2 are all IO devices of the server 20. The bus 202 can include a Peripheral Component Interconnect (PCI) interface, an Accelerated Graphical Port (AGP) interface, or a PCI-E interface. In the application scenario of the embodiment, the server 20 includes at least two IO devices of the same type. In this embodiment, the IO devices of the same type are the first network card 206 and the second network card 207. In an embodiment, other IO devices of the same type, such as a hard disk, may also be used. The first network card 206 and the second network card 207 both include two ports Port 1 and Port 2.
所述BIOS存储器204中存储有系统引导程序(图未示),在所述服务器20上电后,所述CPU201从所述BIOS存储器204中获取所述系统引导程序,运行所述系统引导程序,将存储在所述硬盘205中的操作系统(图未示)引导至所述内存203中,然后执行所述操作系统,从所述硬盘205中调用各IO设备的驱动程序(图未示)对各IO设备进行注册。A BIOS boot program (not shown) is stored in the BIOS memory 204. After the server 20 is powered on, the CPU 201 acquires the system boot program from the BIOS memory 204, and runs the system boot program. An operating system (not shown) stored in the hard disk 205 is booted into the memory 203, and then the operating system is executed, and a driver (not shown) of each IO device is called from the hard disk 205. Each IO device is registered.
本实施例中,为了使相同类型的IO设备在服务器20每次启动时,都注册固定的名称,可在IO设备注册之前就为每个IO设备设置固定的名称,并将设置好的名称存储在BIOS存储器中。In this embodiment, in order to enable the same type of IO device to register a fixed name every time the server 20 starts up, a fixed name can be set for each IO device before the IO device is registered, and the set name is stored. In the BIOS memory.
本实施例中,服务器的生产商可在服务器出厂前对所述系统引导程序进行改写,使所述系统引导程序被CPU201运行时为用户提供设置IO设备名称的配置界面,具体设置方法如图3所述。In this embodiment, the manufacturer of the server may rewrite the system boot program before the server leaves the factory, so that the system boot program is provided with a configuration interface for setting the IO device name when the CPU 201 is running, and the specific setting method is shown in FIG. 3 . Said.
在服务器30上电启动后(步骤S301),CPU301运行系统引导程序(步骤S302),系统引导程序可以提供询问用户是否进行IO设备名称设置的界面,用户可根据需要在操作界面上选择进行IO设备名称的设置,则CPU301响应用户的操作,通过系统引导程序提供给用户一个IO设备配置界面(步骤S303),则用户即可通过该配置界面输入要设置的IO设备的名称,所输入的名称包括两部分,一部分为IO设备的类别,该类别一般为IO设备所连接的总线接口的名称,另外一个是该IO设备的编号,CPU301接收到用户的设置输入(步骤304)之后,则将所接收到的用户设置的IO设备的名称存储至所述BIOS存储器204中(步骤S305)。此处,在将用户设置的IO设备的名称存储至所述BIOS存储器204中时,为建立IO设备名称与连接IO设备的端口的映射关系。这样,可以使IO设备名称与连接IO设备的端口对应起来。在后续驱动IO设备时,由于IO设备的名称与连接IO设备的接口绑定,则IO设备的名称不会随着接口驱动顺序的变化而变化。After the server 30 is powered on (step S301), the CPU 301 runs a system boot program (step S302), and the system boot program can provide an interface for asking the user whether to perform IO device name setting, and the user can select the IO device on the operation interface as needed. In the setting of the name, the CPU 301 provides an IO device configuration interface to the user through the system boot program in response to the user's operation (step S303), and the user can input the name of the IO device to be set through the configuration interface, and the input name includes Two parts, one part is the category of the IO device, the category is generally the name of the bus interface to which the IO device is connected, and the other is the number of the IO device. After receiving the setting input of the user (step 304), the CPU 301 receives the received The name of the IO device set by the user is stored in the BIOS memory 204 (step S305). Here, when the name of the IO device set by the user is stored in the BIOS memory 204, a mapping relationship between the IO device name and the port connecting the IO device is established. In this way, the IO device name can be associated with the port to which the IO device is connected. When the IO device is subsequently driven, since the name of the IO device is bound to the interface of the connected IO device, the name of the IO device does not change as the interface driving order changes.
在一种实施例中,所述IO设备自身包括多个端口。如本实施例中的第一网卡206,包括两个端口port1及port2,port1及port2中的每一个 都具有一个功能号。本实施例中的第一网卡207,包括两个端口port1及port2,port1及port2中的每一个都具有一个功能号。CPU 201会根据接收到的用户输入的IO设备的类别、IO设备的编号、该用户输入的IO设备的每个端口的功能号,为port1及port2分别生成端口名称。所述端口名称包括IO设备类型和端口编号。所述端口编号由所述IO设备编号和所述设备端口的功能号确定,所述端口编号为在所述IO设备编号的基础上随着所述功能号的递增而递增。每个端口的功能号一般是固定的,而且一般都为数字,且按顺序排列,例如,第一网卡的两个端口的功能号分别为1和2(例如,port1的功能号为1,port 2的功能号为2),则在CPU301接收到用户输入的IO设备类别及IO设备编号后,则保持IO设备的类别不变,端口编号随着所述功能号递增而递增,例如,假设用户输入的所述第一网卡的IO设备类别为eth,IO设备编号为1,则CPU301为第一网卡的功能号为1的端口port1生成端口名称eth1,为第一网卡的功能号为2的端口port2生成端口名称eth2,假设用户输入的所述第二网卡的IO设备类别为eth,IO设备编号为3,则CPU301为第二网卡的功能号为1的端口port1生成端口名称eth3,为第二网卡的功能号为2的端口port2生成端口名称eth4。然后将生成的端口名称存储在所述BIOS存储器204中。上面只是举例说明在IO设备具有多个端口时,设置多个端口名称的方法,在其他实施例中,IO设备端口的功能号也可不是数字,且端口名称的生成也不一定是编号随着功能号的递增而递增,任何通过用户输入的编号及端口的编号生成IO设备的端口名称的方式都包括在本发明的保护范围之内。In one embodiment, the IO device itself includes a plurality of ports. The first network card 206 in this embodiment includes two ports port1 and port2, each of port1 and port2. Both have a feature number. The first network card 207 in this embodiment includes two ports port1 and port2, and each of port1 and port2 has a function number. The CPU 201 generates port names for port1 and port2 respectively according to the received category of the IO device input by the user, the number of the IO device, and the function number of each port of the IO device input by the user. The port name includes an IO device type and a port number. The port number is determined by the IO device number and a function number of the device port, and the port number is incremented as the function number increases on the basis of the IO device number. The function numbers of each port are generally fixed, and are generally numeric and arranged in order. For example, the function numbers of the two ports of the first NIC are 1 and 2 respectively (for example, the function number of port1 is 1, port) If the function number of 2 is 2), after the CPU 301 receives the IO device type and the IO device number input by the user, the type of the IO device remains unchanged, and the port number is incremented as the function number is incremented, for example, assuming the user The IO device type of the first NIC is eth, and the IO device number is 1, the CPU 301 generates the port name eth1 for the port port 1 of the first NIC with the function number 1, and is the port with the function number 2 of the first NIC. Port2 generates the port name eth2, and assumes that the IO device type of the second NIC input by the user is eth, and the IO device number is 3, the CPU 301 generates the port name eth3 for the port port 1 of the second NIC with the function number 1 being the second port. Port port 2 with the function number 2 of the NIC generates the port name eth4. The generated port name is then stored in the BIOS memory 204. The above is only an example of the method of setting multiple port names when the IO device has multiple ports. In other embodiments, the function number of the IO device port may not be a number, and the port name generation may not necessarily be a number. The function number is incremented and incremented, and any manner of generating the port name of the IO device by the number input by the user and the port number is included in the protection scope of the present invention.
通过上面的方式,即可为每个IO设备或者每个IO设备的端口设置固定的名称。In the above way, you can set a fixed name for the port of each IO device or each IO device.
在IO设备的设置名称设置好之后,即可利用存储在所述BIOS存储器204中的IO设备名称进行IO设备的注册,具体注册方法如图4所示。After the setting name of the IO device is set, the IO device name can be registered by using the IO device name stored in the BIOS memory 204. The specific registration method is as shown in FIG. 4.
在系统引导程序将操作系统加载至内存203后,CPU调用驱动程序驱动IO设备(步骤S401),将IO设备名称从BIOS存储器204中加载至内存203(步骤S402),在操作系统加载完成之后,CPU301即可运 行各个IO设备的驱动程序对各IO设备进行注册(步骤S403),在注册时,判断内存203中是否有所述IO设备的名称(步骤S404),如果有,则获取所述IO设备的名称进行注册,如果没有,则CPU301给IO设备分配设备名称,然后利用所分配的设备名称进行注册(步骤S405)。After the system boot program loads the operating system into the memory 203, the CPU calls the driver driver IO device (step S401), loads the IO device name from the BIOS memory 204 to the memory 203 (step S402), after the operating system is loaded, CPU301 can be shipped The driver of each IO device registers each IO device (step S403), and at the time of registration, determines whether there is a name of the IO device in the memory 203 (step S404), and if so, acquires the name of the IO device Registration is performed, and if not, the CPU 301 assigns the device name to the IO device, and then registers with the assigned device name (step S405).
在步骤S402中,在将IO设备名称从BIOS存储器204中加载至内存203时,加载的为IO设备名称与连接IO设备的端口的映射关系。在驱动程序对IO设备进行注册时,可根据连接IO设备的端口找到IO设备的名称。In step S402, when the IO device name is loaded from the BIOS memory 204 to the memory 203, the mapping relationship between the IO device name and the port connecting the IO device is loaded. When the driver registers an IO device, the name of the IO device can be found according to the port to which the IO device is connected.
上述方法中,如果IO设备包括多个端口,则CPU301为对IO设备的每个端口进行驱动,即从内存中获取的是IO设备的每个端口的端口名称,并利用所获取的端口名称对IO设备的每个端口进行注册。In the above method, if the IO device includes multiple ports, the CPU 301 drives each port of the IO device, that is, the port name of each port of the IO device is obtained from the memory, and the acquired port name pair is utilized. Each port of the IO device is registered.
通过上述的IO设备注册方法,在计算机设备包括多个同类型的IO设备时,每个IO设备在每次启动时都会注册同样的名称,从而使应用在使用相同的名称访问IO设备时,不会产生错误。According to the IO device registration method described above, when the computer device includes a plurality of IO devices of the same type, each IO device registers the same name each time it is started, so that the application does not access the IO device with the same name. Will produce an error.
另外,在本实施例中,在步骤S402中,所述CPU201通过SMBIOS(system management BIOS)中的Type 9将IO设备的设备名称加载至所述内存,SMBIOS(system management BIOS)是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范,其中Type 9用于管理主板的系统插槽信息,也即本实施例中的计算机设备的总线接口信息。In addition, in this embodiment, in step S402, the CPU 201 loads the device name of the IO device into the memory through Type 9 in the SMBIOS (system management BIOS), which is a motherboard or system manufacturing. The unified specification that is required to display the product management information in a standard format, wherein Type 9 is used to manage the system slot information of the motherboard, that is, the bus interface information of the computer device in this embodiment.
除了应用在上述实施例的单个服务器上,本发明所提供的计算机设备的IO设备注册方法还可应用于数据中心的多个服务器的IO设备的批量配置及注册。In addition to being applied to a single server of the above embodiment, the IO device registration method of the computer device provided by the present invention is also applicable to batch configuration and registration of IO devices of a plurality of servers of a data center.
如图6所示,为包括多个服务器的数据中心的架构示意图。As shown in FIG. 6, it is a schematic diagram of an architecture of a data center including multiple servers.
一个数据中心60包括多个服务器600,多个服务器600连接至交换机601,外部应用服务器602通过连接至交换机601,从数据中心60的服务器600中获取需要的数据。One data center 60 includes a plurality of servers 600, and a plurality of servers 600 are connected to the switch 601. The external application server 602 obtains the required data from the server 600 of the data center 60 by connecting to the switch 601.
有时候一个服务器600难于满足应用服务器602的数据需求,即需要多个服务器600为一个应用服务器602提供数据服务,而为同一应用服务器602提供服务的服务器600需要同样的配置。 Sometimes a server 600 is difficult to meet the data requirements of the application server 602, that is, multiple servers 600 are required to provide data services for one application server 602, while servers 600 that serve the same application server 602 require the same configuration.
如图7所示,第一服务器70和第二服务器71为同一应用服务器提供服务,所述第一服务器70的第一处理器701连接有第一网卡702和第二网卡703,所述第二服务器71的第二处理器711连接有第三网卡712和第四网卡714。第一服务器70的第一网卡701与第二服务器71的第三网卡712相同,第一服务器70的第二网卡702与第二服务器71的第四网卡714相同,上述网卡都具有两个端口port1及port2,所述应用服务器需要通过第一网卡701的port1与第三网卡712的port1为所述应用服务器提供服务。As shown in FIG. 7, the first server 70 and the second server 71 provide services for the same application server, and the first processor 701 of the first server 70 is connected to the first network card 702 and the second network card 703, the second The second processor 711 of the server 71 is connected to the third network card 712 and the fourth network card 714. The first network card 701 of the first server 70 is the same as the third network card 712 of the second server 71. The second network card 702 of the first server 70 is the same as the fourth network card 714 of the second server 71. The network cards all have two ports port1. And port2, the application server needs to provide services for the application server through port1 of the first network card 701 and port1 of the third network card 712.
然而,基于现有的IO设备名称注册方法,由于操作系统是根据同一类别IO设备的驱动的先后顺序为IO设备分配编号,在配置所述第一服务器70时,操作系统有可能先驱动第一网卡701进行注册,给第一网卡的两个端口port1及port2分配的名称分别为eth0和eth1,然后驱动第二网卡702进行注册,给第二网卡702的两个端口port1及port2分配的名称分别为eth2和eth3,而在配置第二服务器71时,操作系统有可能先驱动第四网卡714进行注册,给第四网卡714的两个端口port1及port分配的名称分别为eth0和eth1,然后驱动第三网卡712进行注册,给第三网卡712的两个端口port1及port2所注册的名称分别为eth2和eth3。这样就会使第一服务器70的第一网卡701的端口名称与第二服务器71的第三网卡712的端口名称不同,但是应用服务器在访问第一服务器70及第二服务器71时,只能根据设备名称确定所使用的IO设备,如果应用服务器实际上是需要通过第一服务器70的第一网卡701的port 1访问第一服务器70,通过第二服务器71的第三网卡712的port1访问第二服务器71,此时,却根据操作系统对IO设备的命名,分别使用的是第一服务器70的第一网卡701的port 1和第二服务器71的第四网卡714的port 1,即会产生错误,如果在数据中心批量业务部署中,同样的IO设备具有不同的设备名称,需要逐个服务器进行特殊识别和确认处理,严重影响效率甚至达不成批量部署的目标。However, based on the existing IO device name registration method, since the operating system assigns a number to the IO device according to the order of driving of the same type of IO device, when the first server 70 is configured, the operating system may first drive the first. The network card 701 registers, assigns the names of the two ports port1 and port2 of the first network card to eth0 and eth1, and then drives the second network card 702 to register, and assigns the names of the two ports port1 and port2 of the second network card 702 respectively. For eth2 and eth3, when the second server 71 is configured, the operating system may first drive the fourth network card 714 to register, and assign the names of the two ports port1 and port of the fourth network card 714 to eth0 and eth1, respectively, and then drive The third network card 712 registers, and the names registered to the two ports port1 and port2 of the third network card 712 are eth2 and eth3, respectively. In this way, the port name of the first network card 701 of the first server 70 is different from the port name of the third network card 712 of the second server 71, but the application server can only access the first server 70 and the second server 71 according to the port name. The device name determines the IO device to be used. If the application server actually needs to access the first server 70 through the port 1 of the first network card 701 of the first server 70, access the second through the port 1 of the third network card 712 of the second server 71. The server 71, at this time, according to the naming of the IO device by the operating system, respectively, the port 1 of the first network card 701 of the first server 70 and the port 1 of the fourth network card 714 of the second server 71 respectively generate an error. If the same IO device has different device names in the data center bulk service deployment, it needs to perform special identification and confirmation processing on a server-by-server basis, which seriously affects the efficiency and even the goal of not achieving batch deployment.
所以在这种场景下,也可以对每个服务器中同样类别的IO设备按照图3的方法配置固定的设备名称,并在驱动注册IO设备时,按照图4的方法进行注册,这样,就会使为同一应用服务器提供服务的服务器 的IO设备名称固定,不会因为驱动顺序的不同而发生变化,从而提升了数据中心中的服务器的IO设备的配置及注册效率。Therefore, in this scenario, you can also configure a fixed device name for the same type of IO device in each server according to the method in Figure 3. When you register the IO device, register it according to the method in Figure 4. Make servers that serve the same application server The IO device name is fixed and will not change due to the different drive order, which improves the configuration and registration efficiency of the server's IO device in the data center.
以上对本发明实施例所提供的计算机设备启动时,IO设备注册的技术进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The IO device registration technology is described in detail when the computer device provided by the embodiment of the present invention is started. The principle and implementation manner of the present invention are described in the following. The description of the above embodiment is only for helping. The method of the present invention and its core idea are understood; at the same time, for those skilled in the art, according to the idea of the present invention, there are changes in the specific embodiments and application scopes. It should be understood that the invention is limited.

Claims (10)

  1. 一种计算机设备,包括:处理器、输入输出IO设备、内存、BIOS存储器,所述IO设备、内存、基本输入输出系统BIOS存储器与所述处理器连接;其特征在于,A computer device comprising: a processor, an input/output IO device, a memory, a BIOS memory, wherein the IO device, a memory, a basic input/output system BIOS memory are connected to the processor;
    所述BIOS存储器用于存储系统引导程序及所述IO设备的名称;The BIOS memory is configured to store a system boot program and a name of the IO device;
    所述处理器用于在执行所述引导程序的过程中将所述IO设备的名称加载至所述内存,在驱动所述IO设备时,从所述内存中获取所述IO设备的名称,并根据所获取的所述IO设备的名称对所述IO设备进行注册。The processor is configured to load a name of the IO device into the memory during execution of the booting program, and when the IO device is driven, obtain a name of the IO device from the memory, and according to the The acquired name of the IO device registers the IO device.
  2. 如权利要求1所述的计算机设备,其特征在于,所述处理器还用于在执行所述系统引导程序过程中,根据用户的输入配置所述IO设备的名称,并将所述IO设备的名称存储在所述BIOS存储器中。The computer device according to claim 1, wherein the processor is further configured to: during the execution of the system booting procedure, configure a name of the IO device according to a user input, and configure the IO device The name is stored in the BIOS memory.
  3. 如权利要求2所述的计算机设备,其特征在于,所述处理器在执行所述系统引导程序过程中,通过提供配置操作界面接收用户的输入。The computer apparatus according to claim 2, wherein said processor receives a user input by providing a configuration operation interface during execution of said system boot program.
  4. 如权利要求1-3任意一项所述的计算机设备,其特征在于,所述IO设备包括至少两个设备端口,所述BIOS存储器中存储的所述IO设备的名称包括每个设备端口的端口名称,在处理器对IO设备注册时,为每个设备端口进行注册。The computer device according to any one of claims 1 to 3, wherein the IO device includes at least two device ports, and the name of the IO device stored in the BIOS memory includes a port of each device port. Name, which is registered for each device port when the processor registers with the IO device.
  5. 如权利要求4所述的计算机设备,其特征在于,所述IO设备的每个设备端口具有功能号;The computer device according to claim 4, wherein each device port of the IO device has a function number;
    在配置所述IO设备的名称时,所述处理器根据所接收的用户的输入及所述每个设备端口的功能号确定每个设备端口的端口名称。When configuring the name of the IO device, the processor determines a port name of each device port according to the received user input and the function number of each device port.
  6. 一种计算机设备的输入输出IO设备注册方法,所述计算机设备的基本输入输出系统BIOS存储器存储系统引导程序及IO设备名称,包括:An input/output IO device registration method for a computer device, the basic input/output system BIOS memory storage system boot program and the IO device name of the computer device, including:
    在执行所述引导程序的过程中将所述IO设备名称加载至所述计算机设备的内存;Loading the IO device name into a memory of the computer device during execution of the boot program;
    在驱动所述计算机设备的IO设备时,从所述内存中获取所述IO 设备名称,并根据所获取的所述IO设备名称对所述IO设备进行注册。Acquiring the IO from the memory when the IO device of the computer device is driven a device name, and registering the IO device according to the obtained IO device name.
  7. 如权利要求6所述的方法,其特征在于,所述方法还包括:The method of claim 6 wherein the method further comprises:
    在执行所述系统引导程序过程中,根据用户的输入配置所述IO设备的名称;During the execution of the system boot process, the name of the IO device is configured according to user input;
    将所述IO设备的名称存储在所述BIOS存储器中。The name of the IO device is stored in the BIOS memory.
  8. 如权利要求7所述的方法,其特征在于,在执行所述系统引导程序过程中,通过提供配置操作界面接收用户的输入。The method of claim 7 wherein the user input is received by providing a configuration operation interface during execution of the system boot process.
  9. 如权利要求6-7任意一项所述的方法,其特征在于,所述IO设备包括至少两个设备端口,所述BIOS存储器中存储的所述IO设备的名称包括每个设备端口的端口名称,在对IO设备注册时,为对所述IO设备的每个设备端口进行注册。The method according to any one of claims 6 to 7, wherein the IO device includes at least two device ports, and the name of the IO device stored in the BIOS memory includes a port name of each device port. When registering an IO device, register each device port of the IO device.
  10. 如权利要求9所述的方法,其特征在于,所述IO设备的每个设备端口具有功能号;The method of claim 9, wherein each device port of the IO device has a function number;
    在配置所述IO设备的名称时,为根据所接收的用户的输入及所述每个设备端口的功能号确定每个设备端口的端口名称。 When configuring the name of the IO device, the port name of each device port is determined according to the input of the received user and the function number of each device port.
PCT/CN2015/094497 2015-11-12 2015-11-12 Computer device and registration method for io device of the computer device WO2017079951A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580071742.6A CN107111644A (en) 2015-11-12 2015-11-12 The I/O device register method of computer equipment and computer equipment
PCT/CN2015/094497 WO2017079951A1 (en) 2015-11-12 2015-11-12 Computer device and registration method for io device of the computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/094497 WO2017079951A1 (en) 2015-11-12 2015-11-12 Computer device and registration method for io device of the computer device

Publications (1)

Publication Number Publication Date
WO2017079951A1 true WO2017079951A1 (en) 2017-05-18

Family

ID=58695884

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/094497 WO2017079951A1 (en) 2015-11-12 2015-11-12 Computer device and registration method for io device of the computer device

Country Status (2)

Country Link
CN (1) CN107111644A (en)
WO (1) WO2017079951A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111758078A (en) * 2018-01-30 2020-10-09 帕克-汉尼芬公司 Configuration method and device for I/O modules connected to a field bus controller

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101086708A (en) * 2006-06-07 2007-12-12 戴尔产品有限公司 System and method for uniquely identifying peripheral component devices
US20080184025A1 (en) * 2001-06-07 2008-07-31 Lenovo (Singapore) Pte. Ltd. Booting to a recovery/maintenance environment
CN102446107A (en) * 2010-10-12 2012-05-09 英业达股份有限公司 Startup method of computer system
CN102567239A (en) * 2010-12-29 2012-07-11 鸿富锦精密工业(深圳)有限公司 Computer device and multi-network-card recognizing method thereof
CN103186484A (en) * 2011-12-28 2013-07-03 鸿富锦精密工业(深圳)有限公司 Network card naming method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7213139B2 (en) * 2001-08-22 2007-05-01 Legend (Beijing) Limited System for gathering and storing internal and peripheral components configuration and initialization information for subsequent fast start-up during first execution of fast start-up

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080184025A1 (en) * 2001-06-07 2008-07-31 Lenovo (Singapore) Pte. Ltd. Booting to a recovery/maintenance environment
CN101086708A (en) * 2006-06-07 2007-12-12 戴尔产品有限公司 System and method for uniquely identifying peripheral component devices
CN102446107A (en) * 2010-10-12 2012-05-09 英业达股份有限公司 Startup method of computer system
CN102567239A (en) * 2010-12-29 2012-07-11 鸿富锦精密工业(深圳)有限公司 Computer device and multi-network-card recognizing method thereof
CN103186484A (en) * 2011-12-28 2013-07-03 鸿富锦精密工业(深圳)有限公司 Network card naming method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111758078A (en) * 2018-01-30 2020-10-09 帕克-汉尼芬公司 Configuration method and device for I/O modules connected to a field bus controller

Also Published As

Publication number Publication date
CN107111644A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
US8380971B2 (en) Information handling systems including network adapters and methods of booting the information handling systems using boot configuration information from remote sources
US10019253B2 (en) Systems and methods of updating hot-pluggable devices
US9442876B2 (en) System and method for providing network access for a processing node
CN101989212B (en) Method and device for providing virtual machine management program for starting blade server
WO2018076792A1 (en) Method and device for disk management in arm device and arm device
US9131031B2 (en) Virtual computer system, virtual computer management program, and MAC address management method
US10572434B2 (en) Intelligent certificate discovery in physical and virtualized networks
US9417886B2 (en) System and method for dynamically changing system behavior by modifying boot configuration data and registry entries
US10303487B2 (en) System and method for booting an information handling system
US10713061B2 (en) Boot disk detection and management in an information handling system manufacturing environment
EP1372069A2 (en) Method system and software for configuring a graphics processing communication mode
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
US11144326B2 (en) System and method of initiating multiple adaptors in parallel
US10616944B2 (en) Computer system and method thereof for sharing of wireless connection information between UEFI firmware and OS
US11075925B2 (en) System and method to enable component inventory and compliance in the platform
WO2017079951A1 (en) Computer device and registration method for io device of the computer device
US11409624B2 (en) Exposing an independent hardware management and monitoring (IHMM) device of a host system to guests thereon
CN115499413A (en) Method and system for batch configuration of fixed IP addresses of virtual machines based on KVM
US11586536B1 (en) Remote configuration of multi-mode DIMMs through a baseboard management controller
US11204704B1 (en) Updating multi-mode DIMM inventory data maintained by a baseboard management controller
TW201328246A (en) Method and system for managing cloud server system
US8645600B2 (en) Configuring expansion component interconnect (‘ECI’) physical functions on an ECI device in a computing system
CN112069113A (en) I2C equipment configuration method and system
CN115664953B (en) Resource allocation method and related device of external equipment
WO2024113884A1 (en) Resource allocation method and apparatus for peripheral, server, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15908081

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15908081

Country of ref document: EP

Kind code of ref document: A1