Method and apparatus for displaying boot mode of PCIE device, and device and medium
By querying and reading the function list bit values of PCIE devices during the BIOS initialization stage of the server, displaying the startup mode it supports, it solves the problem that operation and maintenance personnel have difficulty in selecting the appropriate startup mode, and achieves a safe and stable startup of PCIE devices.
Patent Information
- Application Number
- PCT/CN2024/122602
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-29
- Filing Date
- 2024-09-30
- Publication Date
- 2025-06-05
AI Technical Summary
In the server, multiple PCIE devices may support different startup modes, but the existing technology fails to effectively display these startup modes, making it difficult for operation and maintenance personnel to choose the appropriate startup mode, which may lead to problems such as PCIE devices not being recognized, disc drop, card drop, system loss, etc.
By querying the root bridge device during the BIOS initialization device phase, determining the PCIE device under each root bridge device, and reading the first preset bit of the function list and the second preset bit of the PCIE function bit in the configuration space of the PCIE device, based on these bit values, the startup mode supported by the PCIE device is displayed under the BIOS device options.
The startup mode supported by PCIE devices is realized under the BIOS device option, allowing operation and maintenance personnel to easily select the appropriate startup mode, avoiding device problems caused by choosing an inappropriate startup mode.
Smart Images

Figure CN2024122602_05062025_PF_FP_ABST
Abstract
Description
Method, device, equipment and medium for displaying PCIE device startup mode
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on November 29, 2023, with application number 202311608727.3, and application name “Method, device, equipment and medium for displaying PCIE device startup mode”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of server technology, and in particular to a method, apparatus, device, and medium for displaying a PCIE device startup mode. Background Art
[0004] With the rapid development of server technology, the usability, performance, and functionality of servers are constantly improving. In particular, efficient usability enables server operations and maintenance personnel to easily manage and work efficiently.
[0005] However, in some application scenarios, servers are connected to multiple high-speed peripheral component interconnect express (PCIE) devices, and these devices may support different boot modes. Selecting an inappropriate boot mode can lead to issues such as PCIE device misrecognition, disk or card loss, and system loss.
[0006] However, since the boot modes supported by the currently installed PCIE devices are not displayed in the device list of the Basic Input Output System (BIOS) device options and the Baseboard Management Controller (BMC) network interface, server operation and maintenance personnel can only confirm the boot modes supported by the PCIE devices one by one by looking up the user manuals and device instruction manuals of each PCIE device, which brings great trouble to server operation and maintenance personnel.
[0007] Summary of the Invention
[0008] In a first aspect, the present application provides a method for displaying a PCIE device boot mode, which is applied to a BIOS integrated circuit. The method includes:
[0009] During the BIOS initialization phase after the server is powered on, query the root bridge device.
[0010] Determine the PCIE devices under each root bridge device based on the root bridge device;
[0011] For each PCIE device, in response to determining that the PCIE device is in place, reading a first preset bit of a function list and a second preset bit of a PCIE function bit in a configuration space of the PCIE device; and
[0012] Based on the first preset position of the function list and the second preset position of the PCIE function bit, the boot modes supported by the PCIE device are displayed under the BIOS device option.
[0013] In some embodiments, based on the first preset bit of the function list and the second preset bit of the PCIE function bit, the boot modes supported by the PCIE device are displayed under the BIOS device options, including:
[0014] Generate a file in a preset format based on the device information of the PCIE device; the device information includes preset global variables;
[0015] Under the BIOS device option, create a topology of PCIE devices based on the device information of PCIE devices in a pre-formatted file;
[0016] Create BIOS options for the boot modes supported by each PCIE device under the topology of the PCIE device;
[0017] Determining the boot mode supported by the PCIE device based on the value of a preset global variable under the BIOS option of the boot mode supported by the device of each PCIE device; and
[0018] Under the BIOS option of the boot mode supported by each PCIE device, the boot modes supported by the PCIE device are displayed.
[0019] In some embodiments, the device information includes preset global variables, and before the step of generating a file in a preset format based on the device information of the PCIE device, the following steps are further included:
[0020] Performing an AND operation on the first preset bit of the function list and the second preset bit of the PCIE function bit to obtain an AND operation result; and
[0021] Assign the result of the AND operation to the preset global variable.
[0022] In some embodiments, determining the boot mode supported by the PCIE device based on the value of a preset global variable under a BIOS option of the boot mode supported by each PCIE device includes:
[0023] In response to determining that a value of a preset global variable under a BIOS option of a boot mode supported by the PCIE device is 1, determining that the boot modes supported by the PCIE device are UEFI mode and Legacy mode; or
[0024] In response to determining that the value of a preset global variable under a BIOS option of a boot mode supported by the PCIE device is 0, it is determined that the boot mode supported by the PCIE device is the Legacy mode.
[0025] In some embodiments, based on the first preset bit of the function list and the second preset bit of the PCIE function bit, displaying the boot modes supported by the PCIE device under the BIOS device options further includes:
[0026] In response to determining to adjust the startup mode of the PCIE device to the target startup mode, verifying whether the target startup mode is consistent with a startup mode supported by the PCIE device; and
[0027] In response to determining that the target startup mode is consistent with the startup mode supported by the PCIE device, the target startup mode is stored in a dynamic area of the non-volatile random access memory, so that the PCIE device uses the target startup mode for startup the next time it is started.
[0028] In some embodiments, after the step of verifying whether the target boot mode is consistent with the boot mode supported by the PCIE device, the method further includes:
[0029] In response to determining that the target startup mode is inconsistent with the startup mode supported by the PCIE device, determining the PCIE device as the target PCIE device; and
[0030] A prompt message is displayed in a pop-up window indicating that the target PCIE device does not support the target boot mode.
[0031] In some embodiments, reading a first preset bit of a function list and a second preset bit of a PCIE function bit in a configuration space of a PCIE device includes:
[0032] The first preset bit of the function list and the second preset bit of the PCIE function bit are read through the function list pointer of the PCIE device.
[0033] In some embodiments, the method further comprises:
[0034] Obtain downstream port information through PCIE protocol;
[0035] Generate a slot information linked list of PCIE devices based on the information of the downstream port; and
[0036] Based on the slot information linked list of the PCIE device and the startup mode supported by the PCIE device, a target data structure table is generated, so that the user can export the target data structure table and view the startup mode supported by the PCIE device based on the target data structure table.
[0037] In some embodiments, the method further comprises:
[0038] The file in the preset format is sent to the BMC integrated circuit through the Redfish out-of-band interface, so that the BMC integrated circuit displays the boot mode supported by the PCIE device under the device list of the BMC network interface based on the file in the preset format.
[0039] In some embodiments, the first preset bit is the fourth bit, and the second preset bit is the seventh bit.
[0040] In some embodiments, the value of the first preset bit of the function list is used to indicate whether the device supports the Unified Extensible Firmware Interface UEFI mode, and the value of the second preset bit of the PCIE function bit is used to indicate whether the device supports the UEFI mode.
[0041] In some embodiments, the step of determining a PCIE device under the root bridge device includes:
[0042] Store the root bridge device in the linked list; and
[0043] Traverse the root bridge devices in the linked list to find the PCIE devices under the root bridge device.
[0044] In a second aspect, the present application further provides a method for displaying a PCIE device startup mode, which is applied to a BMC integrated circuit. The method includes:
[0045] Receiving a file in a preset format sent by a BIOS integrated circuit; the file in the preset format is generated based on device information of a PCIE device, the device information of the PCIE device includes a preset global variable, the preset global variable stores an AND operation result of a first preset bit of a function list in a configuration space of the PCIE device and a second preset bit of a PCIE function bit; and
[0046] The boot modes supported by PCIE devices are displayed in the device list on the BMC web interface based on a file in a preset format.
[0047] In some embodiments, the boot modes supported by the PCIE device are displayed under the device list of the BMC network interface based on a file in a preset format, including:
[0048] Parse the file in the preset format to obtain the device information of the PCIE device;
[0049] For each PCIE device, extract the AND operation result in the preset global variable from the device information of the PCIE device;
[0050] Determine the boot mode supported by the PCIE device based on the AND operation result; and
[0051] The boot modes supported by the PCIE device are displayed under the device list on the BMC network interface.
[0052] In a third aspect, the present application further provides a device for displaying a PCIE device startup mode, comprising:
[0053] The query module is used to query the root bridge device during the BIOS initialization phase after the server is powered on.
[0054] A determination module is used to determine the PCIE device under the root bridge device based on each root bridge device;
[0055] a reading module configured to read, for each PCIE device, a first preset bit of a function list and a second preset bit of a PCIE function bit in a configuration space of the PCIE device in response to determining that the PCIE device is in place; and
[0056] The first display module is used to display the startup modes supported by the PCIE device under the BIOS device option based on the first preset position of the function list and the second preset position of the PCIE function bit.
[0057] In some embodiments, the first preset bit is the fourth bit, and the second preset bit is the seventh bit.
[0058] In some embodiments, the value of the first preset bit of the function list is used to indicate whether the device supports the Unified Extensible Firmware Interface UEFI mode, and the value of the second preset bit of the PCIE function bit is used to indicate whether the device supports the UEFI mode.
[0059] In a fourth aspect, the present application further provides a device for displaying a PCIE device startup mode, comprising:
[0060] a receiving module, configured to receive a file in a preset format sent by the BIOS integrated circuit; the file in the preset format is generated based on device information of the PCIE device, the device information of the PCIE device including a preset global variable, the preset global variable storing an AND operation result of a first preset bit of a function list in a configuration space of the PCIE device and a second preset bit of a PCIE function bit; and
[0061] The second display module is used to display the startup modes supported by the PCIE device under the device list of the BMC network interface based on a file in a preset format.
[0062] In a fifth aspect, the present application further provides a BIOS integrated circuit, comprising:
[0063] one or more processors; and
[0064] A memory associated with one or more processors, the memory being used to store computer-readable instructions, which, when read and executed by one or more processors, implement the steps of the method for displaying the PCIE device startup mode as described in any one of the first aspects above.
[0065] In a sixth aspect, the present application further provides a BMC integrated circuit, comprising:
[0066] one or more processors; and
[0067] A memory associated with one or more processors, the memory being used to store computer-readable instructions, which, when read and executed by one or more processors, implement the steps of the method for displaying the PCIE device startup mode as described in any one of the second aspects above.
[0068] In the seventh aspect, the present application also provides a computer program product, including a computer program / computer-readable instructions, which, when executed by a processor, implements the steps of the method for displaying the PCIE device startup mode as described in any one of the first or second aspects above.
[0069] In an eighth aspect, the present application also provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by one or more processors, the steps of the method for displaying the PCIE device startup mode as described in any one of the first or second aspects above are implemented.
[0070] The present application provides a method, apparatus, device and medium for displaying the startup mode of a PCIE device. First, the BIOS integrated circuit queries the root bridge device during the BIOS initialization device phase after the server is powered on; then, based on each root bridge device, the PCIE device under the root bridge device is determined, and the PCIE device can be found; then, for each PCIE device, in response to determining that the PCIE device is in place, the first preset bit of the function list and the second preset bit of the PCIE function bit in the configuration space of the PCIE device are read; finally, the first preset bit of the function list indicates whether the device supports UEFI mode, and the second preset bit of the PCIE function bit indicates whether the device supports UEFI mode. Based on the first preset bit of the function list and the second preset bit of the PCIE function bit, the startup mode supported by the PCIE device can be determined, and the startup mode supported by the PCIE device can be displayed under the BIOS device options. The startup mode supported by the currently in-place PCIE device can be displayed under the BIOS device options. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0072] FIG1 is a flow chart of a method for displaying a PCIE device startup mode according to an embodiment of the present application;
[0073] FIG2 is a second flow chart of a method for displaying a PCIE device startup mode according to an embodiment of the present application;
[0074] FIG3 is a schematic diagram of a structure of a device for displaying a PCIE device startup mode according to an embodiment of the present application;
[0075] FIG4 is a second structural diagram of a device for displaying a PCIE device startup mode according to an embodiment of the present application;
[0076] FIG5 is a schematic diagram of the structure of a BIOS integrated circuit provided in an embodiment of the present application;
[0077] FIG6 is a schematic structural diagram of a BMC integrated circuit provided in an embodiment of the present application;
[0078] FIG7 is a schematic diagram of the structure of a non-transitory computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0080] The terms "first," "second," and the like in the specification of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. Furthermore, the term "and / or" in this specification indicates at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0081] The following describes in detail the method for displaying the PCIE device startup mode provided in the embodiment of the present application through embodiments and application scenarios in combination with the accompanying drawings.
[0082] Please refer to Figure 1, which is a flow chart of a method for displaying a PCIE device boot mode according to an embodiment of the present application. The method is applied to a BIOS integrated circuit. As shown in Figure 1, the method may include the following steps:
[0083] Step 101: During the BIOS initialization phase after the server is powered on, all root bridge devices are queried.
[0084] Step 102: Determine the PCIE device under each root bridge device based on the root bridge device.
[0085] Step 103: For each PCIE device, in response to determining that the PCIE device is in place, read a first preset bit of a function list and a second preset bit of a PCIE function bit in a configuration space of the PCIE device;
[0086] Step 104 : Based on the first preset position of the function list and the second preset position of the PCIE function bit, the boot modes supported by the PCIE device are displayed under the BIOS device options.
[0087] In step 101 and step 102, the root bridge device is an interface between the CPU and the PCIE topology. The PCIE devices in the PCIE topology can be found through the root bridge device.
[0088] During the BIOS device initialization phase after the server is powered on, all root bridge devices are queried, and the queried root bridge devices are stored in a linked list. The root bridge devices in the linked list are traversed to find the PCIE devices under each root bridge device.
[0089] In step 103, all the PCIE devices in place are traversed and the configuration space of the PCI device is accessed through EFI_PCI_IO_PROTOCOL. The configuration space of the PCI device includes a capability list and PCIE capability bits.
[0090] In some embodiments, the first preset bit of the function list and the second preset bit of the PCIE function bit are read through the function list (CapailityPtr) pointer of the PCIE device. The value of the first preset bit of the function list indicates whether the device supports the Unified Extensible Firmware Interface (UEFI) mode. For example, if the value of the first preset bit is 1, it means that the device supports UEFI mode, which means that the device supports UEFI mode and Legacy mode. If the value of this bit is not 1, it means that the device only supports Legacy mode. The second preset bit of the PCIE function bit indicates whether the device supports UEFI mode. For example, if the second preset bit is 1, it means that the device supports UEFI mode, which means that the device supports UEFI mode and Legacy mode. If the value of this bit is not 1, it means that the device only supports Legacy mode.
[0091] Therefore, in step 104, the boot mode supported by the PCIE device can be determined based on the first preset bit of the function list and the second preset bit of the PCIE function bit, and then the boot mode supported by the PCIE device is displayed under the BIOS device option.
[0092] In some embodiments, the first preset bit is the fourth bit, and the second preset bit is the seventh bit. The fourth bit of the function list indicates whether the device supports the Unified Extensible Firmware Interface (UEFI) mode. If the bit is 1, it indicates that the device supports UEFI mode, which means that the device supports UEFI mode and Legacy mode. Otherwise, it only supports Legacy mode. The seventh bit of the PCIE function bit indicates whether the device supports UEFI mode. If the bit is 1, it indicates that the device supports UEFI mode, which means that the device supports UEFI mode and Legacy mode. Otherwise, it only supports Legacy mode.
[0093] The embodiment of the present application provides a method for displaying PCIE device boot modes. First, the BIOS integrated circuit queries all root bridge devices during the BIOS initialization device phase after the server is powered on. Then, based on each root bridge device, the PCIE devices under the root bridge device are determined, and all PCIE devices can be found. Then, for each PCIE device, in response to determining that the PCIE device is in place, the first preset bit of the function list and the second preset bit of the PCIE function bit in the configuration space of the PCIE device are read. Finally, the first preset bit of the function list indicates whether the device supports UEFI mode, and the second preset bit of the PCIE function bit indicates whether the device supports UEFI mode. Based on the first preset bit of the function list and the second preset bit of the PCIE function bit, the boot mode supported by the PCIE device can be determined, and the boot mode supported by the PCIE device can be displayed under the BIOS device options. The boot modes supported by the currently installed PCIE device can be displayed under the BIOS device options, so that server operation and maintenance personnel can simply, quickly and intuitively determine the boot modes supported by the currently installed PCIE device, thereby deciding the most appropriate boot mode and avoiding problems such as PCIE device unrecognition, disk drop, card drop, and system loss caused by selecting an inappropriate boot mode.
[0094] In an exemplary embodiment, step 104 may include the following sub-steps:
[0095] Step 1041: Perform an AND operation on the first preset bit of the function list and the second preset bit of the PCIE function bit to obtain an AND operation result.
[0096] Exemplarily, the first preset bit of the function list is set to 1, and the second preset bit of the PCIE function bit is also set to 1, then 1&1=1, that is, the result of the AND operation is 1.
[0097] The first preset bit of the function list is set to 0, and the second preset bit of the PCIE function bit is also set to 0, so 0&0=0, that is, the result of the AND operation is 0.
[0098] Step 1042: Assign the result of the AND operation to a preset global variable.
[0099] For example, the preset global variable may be DeviceSupportBootModeValue. The global variable DeviceSupportBootModeValue is declared, and the result of the AND operation is assigned to the global variable DeviceSupportBootModeValue.
[0100] Step 1043: Generate a file in a preset format based on the device information of each PCIE device; the device information includes preset global variables.
[0101] For example, the file in the preset format may be a cJSON file, and the device information of each PCIE device including the global variable DeviceSupportBootModeValue is created into a cJSON file. cJSON is a JavaScript Object Notation (JSON) library based on C language.
[0102] Step 1044: Under the BIOS device option, create a topology structure of each PCIE device based on the device information of each PCIE device in a file in a preset format.
[0103] Exemplarily, in response to determining that the BIOS is booted to the BIOS device option, a topology structure of each PCIE device is automatically created according to the device information of each PCIE device in the cJSON file.
[0104] Step 1045: Create a BIOS option for the boot mode supported by each PCIE device under the topology structure of each PCIE device.
[0105] Exemplarily, a BIOS option for the boot mode supported by the device is automatically created under each PCIE device.
[0106] Step 1046: Determine the boot mode supported by the PCIE device based on the value of the preset global variable under the BIOS option of the boot mode supported by each PCIE device.
[0107] In some embodiments, in response to determining that the value of a preset global variable under the BIOS option for the boot mode supported by the PCIE device is 1, it is determined that the boot modes supported by the PCIE device are UEFI mode and Legacy mode; in response to determining that the value of a preset global variable under the BIOS option for the boot mode supported by the PCIE device is 0, it is determined that the boot mode supported by the PCIE device is Legacy mode.
[0108] For example, if the global variable DeviceSupportBootModeValue under the BIOS option of the device-supported boot mode of the PCIE device is 1, it indicates the device is in UEFI mode, which means that the boot modes supported by the PCIE device are UEFI mode and Legacy mode. If the global variable DeviceSupportBootModeValue under the BIOS option of the device-supported boot mode of the PCIE device is 0, it indicates that the device does not support UEFI mode, which means that the boot mode supported by the PCIE device is Legacy mode.
[0109] Step 1047: Under the BIOS option of the boot mode supported by each PCIE device, the boot mode supported by the PCIE device is displayed.
[0110] Exemplarily, in response to determining that the boot modes supported by the PCIE device are UEFI mode and Legacy mode, under the BIOS option of the boot modes supported by the PCIE device, the boot modes supported by the PCIE device are displayed as UEFI mode and Legacy mode. If the boot mode supported by the PCIE device is Legacy mode, then under the BIOS option of the boot modes supported by the PCIE device, the boot mode supported by the PCIE device is displayed as Legacy mode.
[0111] In this embodiment, first, the result of the AND operation of the first preset bit of the function list and the second preset bit of the PCIE function bit is assigned to a preset global variable; then, a file in a preset format is generated based on the device information of each PCIE device including the preset global variable; then, under the BIOS device option, based on the device information of each PCIE device in the preset format file, a topology structure of each PCIE device is created; under the topology structure of each PCIE device, a BIOS option of the boot mode supported by the device of each PCIE device is created; finally, based on the value of the preset global variable under the BIOS option of the boot mode supported by the device of each PCIE device, the boot mode supported by the PCIE device is determined, thereby realizing that under the BIOS option of the boot mode supported by the device of each PCIE device, the boot mode supported by the PCIE device is displayed.
[0112] In an example embodiment, the method further includes: in response to determining that the startup mode of the PCIE device is adjusted to the target startup mode, checking whether the target startup mode is consistent with the startup mode supported by the PCIE device; in response to determining that the target startup mode is consistent with the startup mode supported by the PCIE device, storing the target startup mode in a dynamic area of a non-volatile random access memory, so that the PCIE device uses the target startup mode to start up the next time it starts up.
[0113] Exemplarily, in response to determining that the boot mode of the PCIE device is adjusted to UEFI mode, a check is performed to determine whether the UEFI mode is consistent with the boot modes supported by the PCIE device. Assuming that the PCIE device supports both UEFI and Legacy modes, the adjusted boot mode of the PCIE device is consistent with the boot modes supported by the PCIE device, and the UEFI mode is stored in a dynamic area of the non-volatile random access memory. The PCIE device boots in UEFI mode the next time it boots.
[0114] In this embodiment, in response to determining that the adjusted startup mode of the PCIE device is consistent with the startup mode supported by the PCIE device, the PCIE device is started using the adjusted startup mode of the PCIE device the next time it is started, thereby avoiding problems such as PCIE device failure to recognize, disk drop, card drop, system loss, etc. caused by the inappropriate adjusted startup mode.
[0115] In an example embodiment, the method further includes: in response to determining that the target startup mode is inconsistent with the startup mode supported by the PCIE device, determining that the PCIE device is the target PCIE device; and displaying a prompt message in a pop-up window that the target PCIE device does not support the target startup mode.
[0116] Exemplarily, in response to determining that the boot mode of the PCIE device is adjusted to UEFI mode, a check is performed to determine whether the UEFI mode is consistent with the boot mode supported by the PCIE device. Assuming that the boot mode supported by the PCIE device is Legacy mode, if the boot mode after the PCIE device is adjusted is inconsistent with the boot mode supported by the PCIE device, the PCIE device is determined to be the target PCIE device, and a prompt message indicating that the target PCIE device does not support UEFI mode is displayed in a pop-up window.
[0117] In this embodiment, in response to determining that the adjusted startup mode of the PCIE device is inconsistent with the startup mode supported by the PCIE device, the server operation and maintenance personnel are promptly notified that the system does not support the adjusted startup mode of the PCIE device.
[0118] In an example embodiment, the method further includes: obtaining information of all downstream ports through the PCIE protocol; generating a slot information linked list of each PCIE device based on the information of all downstream ports; generating a target data structure table based on the slot information linked list of each PCIE device and the startup mode supported by each PCIE device, so that a user can export the target data structure table, and view the startup mode supported by each PCIE device based on the target data structure table.
[0119] In some embodiments, the target data structure table may be an SMBIOS (System Management BIOS) Type 9 data structure table. SMBIOS is a unified specification that motherboard or system manufacturers must follow to display product management information in a standard format. Type refers to the type.
[0120] The system obtains information about all downstream ports through the PCIE protocol. Based on this information, it generates a linked list of slot information for each PCIE device. The SMBIOS Type 9 data structure table is expanded to include additional boot modes supported by each PCIE device. Server operators can export the SMBIOS Type 9 data structure table to view the supported boot modes for each PCIE device.
[0121] In this embodiment, the target data structure table can be expanded to add additional startup modes supported by each PCIE device, so that server operation and maintenance personnel can export the target data structure table and view the startup modes supported by each PCIE device. Therefore, the startup modes supported by each PCIE device can be viewed in-band.
[0122] In an exemplary embodiment, the method further includes: sending a file in a preset format to the BMC integrated circuit through the Redfish out-of-band interface, so that the BMC integrated circuit displays the boot modes supported by each PCIE device under the device list of the BMC network interface based on the file in the preset format.
[0123] In some embodiments, a Redfish out-of-band interface is reserved, and the cJSON file is sent to the BMC integrated circuit through the Redfish out-of-band interface. The BMC integrated circuit queries the corresponding fields in the cJSON file to determine the boot mode supported by each PCIE device, and then displays the boot mode supported by each PCIE device in the device list on the BMC network interface.
[0124] Please refer to Figure 2, which is a second flow chart of a method for displaying a PCIE device startup mode provided by an embodiment of the present application. The method is applied to a BMC integrated circuit, as shown in Figure 2, and the method may include the following steps:
[0125] Step 201: Receive a file in a preset format sent by a BIOS integrated circuit; the file in the preset format is generated based on device information of each PCIE device, where the device information of the PCIE device includes a preset global variable, and the preset global variable stores an AND operation result of a first preset bit of a function list in a configuration space of the PCIE device and a second preset bit of a PCIE function bit;
[0126] Step 202: Display the boot modes supported by each PCIE device under the device list of the BMC network interface based on the file in the preset format.
[0127] In step 201, the preset global variable may be, for example, DeviceSupportBootModeValue. The global variable DeviceSupportBootModeValue is declared, and the BIOS integrated circuit assigns the result of an AND operation between the first preset bit of the function list in the configuration space of the PCIE device and the second preset bit of the PCIE function bit to the global variable DeviceSupportBootModeValue. The preset format file may be a cJSON file, and the device information of each PCIE device, including the global variable DeviceSupportBootModeValue, is created as a cJSON file. The BIOS integrated circuit sends the cJSON file to the BMC integrated circuit, which receives the cJSON file sent by the BIOS integrated circuit.
[0128] In step 202 , the BMC integrated circuit displays the boot modes supported by each PCIE device under the device list of the BMC network interface based on the cJSON file.
[0129] In some embodiments, step 202 may include: parsing a file in a preset format to obtain device information of each PCIE device; for each PCIE device, extracting an AND operation result in a preset global variable from the device information of the PCIE device; determining the startup mode supported by the PCIE device based on the AND operation result; and displaying the startup mode supported by each PCIE device under the device list of the BMC network interface.
[0130] In some embodiments, the BMC integrated circuit parses the cJSON file to obtain device information for each PCIE device, and extracts the result of an AND operation in the global variable DeviceSupportBootModeValue from the device information of the PCIE device. In response to determining that the result of the AND operation is 1, it is determined that the boot modes supported by the PCIE device are UEFI mode and Legacy mode. In response to determining that the result of the AND operation is 0, it is determined that the boot mode supported by the PCIE device is Legacy mode. The boot modes supported by each PCIE device are displayed under the device list on the BMC network interface.
[0131] In this embodiment, the BMC integrated circuit receives a file in a preset format sent by the BIOS integrated circuit. Based on the cJSON file, the boot mode supported by each PCIE device can be displayed under the device list of the BMC network interface, so that server operation and maintenance personnel can simply, quickly and intuitively determine the boot mode supported by the currently installed PCIE device, thereby deciding the most appropriate boot mode and avoiding problems such as PCIE device non-recognition, disk drop, card drop, system loss, etc. caused by selecting an inappropriate boot mode.
[0132] It should be noted that the method for displaying the PCIE device startup mode provided in the embodiments of the present application can be executed by a device for displaying the PCIE device startup mode, or a control module in the device for displaying the PCIE device startup mode for executing the method for displaying the PCIE device startup mode. In the embodiments of the present application, the method for displaying the PCIE device startup mode performed by the device for displaying the PCIE device startup mode is used as an example to illustrate the device for displaying the PCIE device startup mode provided in the embodiments of the present application.
[0133] It should be noted that, in the embodiments of the present application, the methods for displaying the PCIE device startup mode shown in the above-mentioned method figures are all illustrative in combination with one of the figures in the embodiments of the present application. During implementation, the methods for displaying the PCIE device startup mode shown in the above-mentioned method figures can also be implemented in combination with any other combinable figures shown in the above-mentioned embodiments, and will not be repeated here.
[0134] The following describes the display device for the PCIE device startup mode provided in the present application. The display method for the PCIE device startup mode described below and described above can refer to each other.
[0135] Please refer to Figure 3, which is a schematic diagram of a structure of a device for displaying the PCIE device startup mode provided in an embodiment of the present application. As shown in Figure 3, the device may include:
[0136] The query module 301 is used to query all root bridge devices during the BIOS initialization phase after the server is powered on;
[0137] A determination module 302 is configured to determine a PCIE device under each root bridge device based on each root bridge device;
[0138] A reading module 303 is configured to read, for each PCIE device, a first preset bit of a function list and a second preset bit of a PCIE function bit in a configuration space of the PCIE device in response to determining that the PCIE device is in place;
[0139] The first display module 304 is configured to display the boot modes supported by the PCIE device under the BIOS device options based on the first preset position of the function list and the second preset position of the PCIE function bit.
[0140] In some embodiments, the first display module 304 includes:
[0141] An AND operation unit, configured to perform an AND operation on the first preset bit of the function list and the second preset bit of the PCIE function bit to obtain an AND operation result;
[0142] The assignment unit is used to assign the result of the AND operation to the preset global variable;
[0143] A generating unit, configured to generate a file in a preset format based on device information of each PCIE device; the device information includes preset global variables;
[0144] The first creating unit is configured to create a topology structure of each PCIE device based on device information of each PCIE device in a file of a preset format under a BIOS device option;
[0145] The second creating unit is configured to create a BIOS option of a boot mode supported by each PCIE device under the topology structure of each PCIE device;
[0146] a mode determining unit, configured to determine a boot mode supported by the PCIE device based on a value of a preset global variable under a BIOS option of a boot mode supported by each PCIE device;
[0147] The display unit is used to display the boot modes supported by the PCIE device under the BIOS option of the boot modes supported by each PCIE device.
[0148] In some embodiments, the mode determination unit is configured to:
[0149] In response to determining that a value of a preset global variable under a BIOS option of a boot mode supported by the PCIE device is 1, determining that the boot modes supported by the PCIE device are UEFI mode and Legacy mode;
[0150] In response to determining that the value of a preset global variable under a BIOS option of a boot mode supported by the PCIE device is 0, it is determined that the boot mode supported by the PCIE device is the Legacy mode.
[0151] In some embodiments, the apparatus further comprises:
[0152] a verification module, configured to, in response to determining that the startup mode of the PCIE device is adjusted to a target startup mode, verify whether the target startup mode is consistent with a startup mode supported by the PCIE device;
[0153] The storage module is used to store the target startup mode in the dynamic area of the non-volatile random access memory in response to determining that the target startup mode is consistent with the startup mode supported by the PCIE device, so that the PCIE device uses the target startup mode to start up the next time it starts up.
[0154] In some embodiments, the apparatus further comprises:
[0155] a device determining module, configured to, in response to determining that the target startup mode is inconsistent with the startup mode supported by the PCIE device, determine that the PCIE device is a target PCIE device;
[0156] The pop-up prompt module is used to display a prompt message through a pop-up window that the target PCIE device does not support the target boot mode.
[0157] In some embodiments, the reading module 303 is configured to read the first preset bit of the function list and the second preset bit of the PCIE function bit through the function list pointer of the PCIE device.
[0158] In some embodiments, the apparatus further comprises:
[0159] An information acquisition module is used to obtain information of all downstream ports through the PCIE protocol;
[0160] A linked list generation module is used to generate a slot information linked list of each PCIE device based on the information of all downstream ports;
[0161] The structure table generation module is used to generate a target data structure table based on the slot information link table of each PCIE device and the startup mode supported by each PCIE device, so that the user can export the target data structure table and view the startup mode supported by each PCIE device based on the target data structure table.
[0162] In some embodiments, the apparatus further comprises:
[0163] The sending module is used to send a file in a preset format to the baseboard management controller BMC integrated circuit through the Redfish out-of-band interface, so that the BMC integrated circuit displays the startup mode supported by each PCIE device under the device list of the BMC network interface based on the file in the preset format.
[0164] Please refer to Figure 4, which is a second structural diagram of a device for displaying the PCIE device startup mode provided in an embodiment of the present application. As shown in Figure 4, the device may include:
[0165] A receiving module 401 is configured to receive a file in a preset format sent by a BIOS integrated circuit; the file in the preset format is generated based on device information of each PCIE device, the device information of the PCIE device including a preset global variable, the preset global variable storing an AND operation result of a first preset bit of a function list in a configuration space of the PCIE device and a second preset bit of a PCIE function bit;
[0166] The second display module 402 is configured to display the startup modes supported by each PCIE device under the device list on the BMC network interface based on a file in a preset format.
[0167] In some embodiments, the second display module 402 is used to:
[0168] Parse the file in the preset format to obtain the device information of each PCIE device;
[0169] For each PCIE device, extract the AND operation result in the preset global variable from the device information of the PCIE device;
[0170] Determine the boot mode supported by the PCIE device based on the AND operation result;
[0171] The boot modes supported by each PCIE device are displayed under the device list on the BMC network interface.
[0172] FIG5 illustrates a schematic diagram of the physical structure of a BIOS integrated circuit. As shown in FIG5 , the BIOS integrated circuit may include: one or more processors 510, a communication interface 520, a memory 530 associated with the one or more processors 510, and a communication bus 540. The processors 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 may invoke computer-readable instructions in the memory 530 to execute a method for displaying PCIE device boot modes. The method includes: querying all root bridge devices during the BIOS device initialization phase after the server is powered on; determining the PCIE devices under the root bridge device based on each root bridge device; for each PCIE device, in response to determining that the PCIE device is in place, reading a first preset bit of a function list and a second preset bit of a PCIE function bit in the configuration space of the PCIE device; and displaying the boot modes supported by the PCIE device under the BIOS device options based on the first preset bit of the function list and the second preset bit of the PCIE function bit.
[0173] FIG6 illustrates a schematic diagram of the physical structure of a BMC integrated circuit. As shown in FIG6 , the BMC integrated circuit may include: one or more processors 610, a communication interface 620, a memory 630 associated with the one or more processors 610, and a communication bus 640. The processors 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke computer-readable instructions in the memory 630 to execute a method for displaying PCIE device boot modes. The method includes: receiving a file in a preset format sent by a BIOS integrated circuit; the file in the preset format is generated based on device information of each PCIE device, the device information of the PCIE device including a preset global variable, the preset global variable storing the result of an AND operation between a first preset bit of a function list in the configuration space of the PCIE device and a second preset bit of a PCIE function bit; and displaying the boot modes supported by each PCIE device under the device list on the BMC network interface based on the file in the preset format.
[0174] In addition, the computer-readable instructions in any of the above-mentioned memories can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0175] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes computer-readable instructions. When the computer-readable instructions are executed by the computer, the computer can execute the PCIE device startup mode display method provided by the above methods, which will not be repeated here.
[0176] On the other hand, as shown in Figure 7, the present application also provides a non-transitory computer-readable storage medium on which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the display method of the PCIE device startup mode provided above is implemented, which will not be repeated here.
[0177] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0178] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the relevant technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for displaying a startup mode of a high-speed serial computer expansion bus PCIE device, characterized in that: Applied to a basic input and output system BIOS integrated circuit, the method comprises: During the BIOS initialization phase after the server is powered on, query the root bridge device. Determine the PCIE device under the root bridge device; For the PCIE device, in response to determining that the PCIE device is in place, reading a first preset bit of a function list and a second preset bit of a PCIE function bit in a configuration space of the PCIE device; and Based on the first preset bit of the function list and the second preset bit of the PCIE function bit, the boot modes supported by the PCIE device are displayed under the BIOS device option.
2. The method for displaying the PCIE device startup mode according to claim 1, characterized in that: The displaying of the boot mode supported by the PCIE device under the BIOS device option based on the first preset bit of the function list and the second preset bit of the PCIE function bit includes: Perform an AND operation on the fourth bit of the function list and the seventh bit of the PCIE function bit to obtain an AND operation result; Assign the AND operation result to a preset global variable; Generate a file in a preset format based on the device information of each of the PCIE devices; the device information includes the preset global variable; Under the BIOS device option, based on the device information of the PCIE device in the file in the preset format, create a topology structure of the PCIE device; Creating a BIOS option of a boot mode supported by the device of the PCIE device under the topology structure of the PCIE device; Determining a boot mode supported by the PCIE device based on a value of the preset global variable under a BIOS option of the boot mode supported by the device of the PCIE device; and Under the BIOS option of the boot mode supported by the device of the PCIE device, the boot mode supported by the PCIE device is displayed.
3. The method for displaying the PCIE device startup mode according to claim 2, characterized in that: The determining the boot mode supported by the PCIE device based on the value of the preset global variable under the BIOS option of the boot mode supported by the device of the PCIE device comprises: In response to determining that the value of the preset global variable under the BIOS option of the boot mode supported by the device of the PCIE device is 1, determining that the boot mode supported by the PCIE device is a unified extensible firmware interface UEFI mode and Legacy mode; or In response to determining that the value of the preset global variable under the BIOS option of the boot mode supported by the device of the PCIE device is 0, it is determined that the boot mode supported by the PCIE device is the Legacy mode.
4. The method for displaying the PCIE device startup mode according to claim 1 or 2, characterized in that: After the step of displaying the boot mode supported by the PCIE device under the BIOS device option based on the first preset bit of the function list and the second preset bit of the PCIE function bit, the method further includes: In response to determining to adjust the startup mode of the PCIE device to a target startup mode, verifying whether the target startup mode is consistent with a startup mode supported by the PCIE device; and In response to determining that the target startup mode is consistent with the startup mode supported by the PCIE device, the target startup mode is stored in a dynamic area of a non-volatile random access memory, so that the PCIE device is started using the target startup mode when it is started next time.
5. The method for displaying the PCIE device startup mode according to claim 4, characterized in that: After the step of verifying whether the target startup mode is consistent with the startup mode supported by the PCIE device, the method further includes: In response to determining that the target startup mode is inconsistent with the startup mode supported by the PCIE device, determining that the PCIE device is a target PCIE device; and A prompt message that the target PCIE device does not support the target startup mode is displayed through a pop-up window.
6. The method for displaying the PCIE device startup mode according to claim 1 or 2, characterized in that: The step of reading a first preset position of a function list and a second preset position of a PCIE function position in a configuration space of the PCIE device comprises: The first preset bit of the function list and the second preset bit of the PCIE function bit are read through the function list pointer of the PCIE device.
7. The method for displaying the PCIE device startup mode according to claim 1 or 2, characterized in that: Also includes: Get the downstream port information through PCIE protocol; Generate a slot information linked list of the PCIE device based on the information of the downstream port; as well as Based on the slot information linked list of the PCIE device and the startup mode supported by the PCIE device, a target data structure table is generated to enable a user to export the target data structure table and view the startup mode supported by the PCIE device based on the target data structure table.
8. The method for displaying the PCIE device startup mode according to claim 2, characterized in that: Also includes: The file in the preset format is sent to the baseboard management controller BMC integrated circuit through the Redfish out-of-band interface, so that the BMC integrated circuit displays the file in the preset format under the device list of the BMC network interface based on the file in the preset format. Boot modes supported by PCIE devices.
9. The method for displaying the PCIE device startup mode according to claim 1 or 2, characterized in that: The first preset bit is the fourth bit, and the second preset bit is the seventh bit.
10. The method for displaying the PCIE device startup mode according to claim 1 or 2, characterized in that: The value of the first preset bit of the function list is used to indicate whether the device supports the Unified Extensible Firmware Interface UEFI mode, and the value of the second preset bit of the PCIE function bit is used to indicate whether the device supports the UEFI mode.
11. The method for displaying the PCIE device startup mode according to claim 1, characterized in that: The step of determining the PCIE device under the root bridge device includes: Storing the root bridge device in a linked list; and The root bridge devices in the linked list are traversed to find the PCIE devices under the root bridge device.
12. A method for displaying a PCIE device startup mode, characterized in that: Applied to a BMC integrated circuit, the method comprises: receiving a file in a preset format sent by a BIOS integrated circuit; the file in the preset format is generated based on device information of a PCIE device, the device information of the PCIE device includes a preset global variable, and the preset global variable stores an AND operation result of a first preset bit of a function list in a configuration space of the PCIE device and a second preset bit of a PCIE function bit; and The boot modes supported by the PCIE device are displayed under the device list of the BMC network interface based on the file in the preset format.
13. The method for displaying the PCIE device startup mode according to claim 12, characterized in that: The file based on the preset format displays the startup modes supported by the PCIE device under the device list of the BMC network interface, including: Parsing the file in the preset format to obtain device information of the PCIE device; For each of the PCIE devices, extracting the AND operation result in the preset global variable from the device information of the PCIE device; Determine a startup mode supported by the PCIE device based on the AND operation result; and The boot modes supported by the PCIE device are displayed under the device list of the BMC network interface.
14. The method for displaying the PCIE device startup mode according to claim 12, characterized in that: The first preset bit is the fourth bit, and the second preset bit is the seventh bit.
15. The method for displaying the PCIE device startup mode according to claim 12, characterized in that: The value of the first preset bit of the function list is used to indicate whether the device supports the Unified Extensible Firmware Interface UEFI mode, and the value of the second preset bit of the PCIE function bit is used to indicate whether the device supports the UEFI mode.
16. A display device for a PCIE device startup mode, characterized in that: include: A query module is used to query the root bridge device during the BIOS initialization phase after the server is powered on; A determination module, configured to determine a PCIE device under the root bridge device based on each of the root bridge devices; A reading module, configured to read, for each of the PCIE devices, a first preset bit of a function list and a second preset bit of a PCIE function bit in a configuration space of the PCIE device in response to determining that the PCIE device is in place; as well as The first display module is used to display the startup mode supported by the PCIE device under the BIOS device option based on the first preset position of the function list and the second preset position of the PCIE function bit.
17. A display device for a PCIE device startup mode, characterized in that: include: A receiving module, used for receiving a file in a preset format sent by the BIOS integrated circuit; The file in the preset format is generated based on the device information of the PCIE device, the device information of the PCIE device includes a preset global variable, and the preset global variable stores an AND operation result of a first preset bit of a function list in a configuration space of the PCIE device and a second preset bit of a PCIE function bit; as well as The second display module is used to display the startup mode supported by the PCIE device under the device list of the BMC network interface based on the file in the preset format.
18. A BIOS integrated circuit, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store computer-readable instructions, wherein the computer-readable instructions, when read and executed by the one or more processors, implement the steps of the method for displaying the PCIE device startup mode as described in any one of claims 1 to 11.
19. A BMC integrated circuit, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store computer-readable instructions, wherein the computer-readable instructions, when read and executed by the one or more processors, implement the steps of the method for displaying the PCIE device startup mode as described in any one of claims 12-15.
20. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the steps of the method for displaying the PCIE device startup mode as described in any one of claims 1 to 11 are implemented, or the steps of the method for displaying the PCIE device startup mode as described in any one of claims 12-15 are implemented.
Citation Information
Patent Citations
Method and system for checking configuration of BMC display chip, storage medium and equipment
CN115470062A
PCIE (Peripheral Component Interface Express) equipment management method and device, equipment and readable storage medium
CN115658158A
PCIE (Peripheral Component Interface Express) equipment scanning method and server
CN115658582A
PCIE equipment information acquisition method and device, equipment and storage medium
CN116775540A
Display method and device of PCIE equipment starting mode, equipment and medium
CN117311832A
Cited By
Equipment information acquisition method and electronic equipment
CN121037232A