Parameter setting method and device, host device, storage medium and program product

CN123011790APending Publication Date: 2026-10-30INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611508216.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

当外设设备更换插槽、总线拓扑或控制器通道拆分方式发生变化时,原有参数配置可能与当前设备不匹配,需要重新人工调整,配置效率和适配性较低

Benefits of technology

[0020]本发明的有益效果在于:本发明可由基本输入输出系统识别主机设备的物理总线拓扑,确定外设设备当前连接的控制器及桥通道,并根据外设设备的设备识别信息确定对应的目标信号均衡参数;随后,根据所述控制器及桥通道在闪存配置数据中确定参数存储位置,并在当前信号均衡参数与目标信号均衡参数不同时进行更新。这样,目标信号均衡参数可随外设设备确定,参数存储位置可随外设设备当前所处的物理总线位置确定,因此,在外设设备更换插槽或控制器通道拆分方式变化后,仍可根据变化后的物理总线拓扑重新确定参数存储位置并写入对应参数,减少针对不同硬件拓扑重新选择通道、制作配置文件以及重新编译和写入固件的操作,同时减少人工配置控制器、桥通道及参数所产生的错误。进一步地,由于信号均衡参数按照控制器及桥通道分别配置,还可对同一控制器下不同桥通道所连接的外设设备分别设置相应的信号均衡参数。这样,可将目标信号均衡参数与外设设备对应,并根据外设设备所在的实际物理总线位置进行自动参数设置,无需人工配置,可确保信号均衡参数得到可靠设置并与外设设备匹配。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011790A_ABST
    Figure CN123011790A_ABST
Patent Text Reader

Abstract

The application provides a parameter setting method and device, a host device, a storage medium and a program product, and relates to the technical field of computers.In the method, the basic input / output system of the host device can identify the physical bus topology of the host device, determine the controller information and bridge channel information corresponding to the physical bus position where the peripheral device is currently located, then determine the target signal equalization parameter dedicated to the peripheral device according to the device identification information of the peripheral device, and determine the parameter storage position in the flash configuration data according to the controller information and the bridge channel information, and then the current signal equalization parameter in the parameter storage position can be compared with the target signal equalization parameter, and the two parameters are updated when they are different.The method can correspond the target signal equalization parameter to the peripheral device, and automatically set the parameter according to the actual physical bus position where the peripheral device is located, without manual configuration, so that the signal equalization parameter can be reliably set and matched with the peripheral device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a parameter setting method, apparatus, host device, storage medium, and program product. Background Technology

[0002] In related technologies, signal equalization parameters for peripheral devices are typically configured manually based on device type, slot location, and bus connection relationships, and the corresponding parameters are written into the basic input / output system or flash memory configuration data. When peripheral devices change slots, bus topology, or controller channel splitting methods, the original parameter configuration may not match the current device, requiring manual readjustment, resulting in low configuration efficiency and adaptability. Summary of the Invention

[0003] The purpose of this invention is to provide a parameter setting method, device, host device, storage medium, and program product that can correspond target signal equalization parameters to peripheral devices and automatically set parameters according to the actual physical bus location of the peripheral devices, without manual configuration, and can ensure that the signal equalization parameters are reliably set and matched with the peripheral devices.

[0004] To solve the above-mentioned technical problems, the present invention provides a parameter setting method, applied to the basic input / output system of a host device, comprising: Identify the physical bus topology of the host device, and determine the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device based on the physical bus topology; Obtain the device identification information of the peripheral device, and determine the target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information; Obtain configuration data from flash memory, and determine the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information; Determine whether the current signal equalization parameter in the parameter storage location is the same as the target signal equalization parameter. If they are different, update the current signal equalization parameter to the target signal equalization parameter.

[0005] Optionally, identifying the physical bus topology of the host device and determining the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device based on the physical bus topology includes: During the startup initialization process of the host device, the channel splitting method of the controller is determined according to the expansion card and supporting circuit, the controller is configured according to the channel splitting method, and root port identification information is assigned to the root port of the corresponding controller. Traverse the physical bus of the host device and the peripheral devices connected to the physical bus to establish the physical bus topology; The root port to which the peripheral device is connected is determined based on the physical bus topology, and the root port identification information of the root port is obtained. The bridge channel information is determined based on the root port identification information, and the controller information is determined based on the correspondence between the bridge channel and the controller.

[0006] Optionally, the device identification information includes a device manufacturer identifier and a device model identifier, and the preset corresponding information includes a preset whitelist, which stores the correspondence between the device manufacturer identifier, the device model identifier and the signal equalization parameters; The step of acquiring the device identification information of the peripheral device and determining the target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information includes: The device manufacturer identifier and the device model identifier are obtained from the configuration space of the peripheral device. The device manufacturer identifier and the device model identifier are matched with the preset whitelist. When the match is successful, the target signal equalization parameters are determined according to the preset whitelist.

[0007] Optionally, the method further includes: If the device manufacturer identifier and the device model identifier do not match the preset whitelist, the signal equalization parameters will not be updated for the corresponding peripheral device.

[0008] Optionally, when multiple peripheral devices match the preset whitelist, the method further includes: For each of the peripheral devices, the corresponding target signal equalization parameters are determined according to their device identification information, the controller information and bridge channel information corresponding to their current physical bus position are determined according to the physical bus topology, and the corresponding parameter storage location is determined in the configuration data according to the controller information and bridge channel information. Determine whether the current signal equalization parameter in each of the parameter storage locations is the same as the corresponding target signal equalization parameter. If they are different, update the corresponding current signal equalization parameter to the target signal equalization parameter.

[0009] Optionally, the preset whitelist is pre-set in the code of the basic input / output system, and the signal equalization parameters in the preset whitelist are parameters pre-determined based on the signal test results of the corresponding peripheral devices.

[0010] Optionally, the method further includes: If the current signal equalization parameters are different from the target signal equalization parameters, then set the restart flag; If the current signal equalization parameter is the same as the target signal equalization parameter, then the current signal equalization parameter remains unchanged.

[0011] Optionally, the method further includes: The host device is restarted according to the restart flag; After the host device restarts, it reads the updated configuration data from the flash memory and loads the target signal equalization parameters from the updated configuration data into the corresponding controller.

[0012] Optionally, updating the current signal equalization parameters to the target signal equalization parameters includes: The acquired configuration data is stored in memory, and the current signal equalization parameter in the parameter storage location in the configuration data in memory is modified to the target signal equalization parameter. Erase the storage area in the flash memory that stores the configuration data, and write the modified complete configuration data into the flash memory.

[0013] Optionally, the method further includes: After writing the modified complete configuration data into the flash memory, the configuration data in the flash memory is read again, and the read configuration data is verified with the modified configuration data in the memory. If the verification passes, set the configuration to take effect flag.

[0014] Optionally, before determining the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information, the method further includes: The configuration data obtained from the flash memory is subjected to integrity and validity checks to determine whether the configuration data meets the normal read and write requirements. If the verification passes, proceed to the step of determining the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information.

[0015] The present invention also provides a parameter setting device, applied to the basic input / output system of a host device, comprising: The identification module is used to identify the physical bus topology of the host device and determine the controller information and bridge channel information corresponding to the physical bus position of the peripheral device based on the physical bus topology. The target parameter acquisition module is used to acquire the device identification information of the peripheral device, and determine the target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information. A storage location determination module is used to obtain configuration data in flash memory and determine the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information. The parameter update module is used to determine whether the current signal equalization parameter in the parameter storage location is the same as the target signal equalization parameter. If they are different, the current signal equalization parameter is updated to the target signal equalization parameter.

[0016] The present invention also provides a host device, comprising: Memory, used to store computer programs; A processor is used to implement the above-described parameter setting method when executing the computer program.

[0017] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the parameter setting method described above.

[0018] The present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the parameter setting method described above.

[0019] This invention provides a parameter setting method applied to the basic input / output system of a host device, comprising: identifying the physical bus topology of the host device; determining controller information and bridge channel information corresponding to the current physical bus position of a peripheral device based on the physical bus topology; acquiring device identification information of the peripheral device; determining target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information; acquiring configuration data in flash memory; determining the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information; determining whether the current signal equalization parameter in the parameter storage location is the same as the target signal equalization parameter; if they are different, updating the current signal equalization parameter to the target signal equalization parameter.

[0020] The beneficial effects of this invention are as follows: This invention can identify the physical bus topology of the host device using a basic input / output system, determine the controller and bridge channel currently connected to the peripheral device, and determine the corresponding target signal equalization parameters based on the peripheral device's device identification information. Subsequently, the parameter storage location is determined in the flash memory configuration data based on the controller and bridge channel, and updated when the current signal equalization parameters differ from the target signal equalization parameters. In this way, the target signal equalization parameters can be determined according to the peripheral device, and the parameter storage location can be determined according to the physical bus position of the peripheral device. Therefore, even after the peripheral device changes slots or the controller channel splitting method changes, the parameter storage location can still be re-determined and the corresponding parameters written according to the changed physical bus topology. This reduces the need for re-selecting channels, creating configuration files, and recompiling and writing firmware for different hardware topologies, while also reducing errors caused by manually configuring controllers, bridge channels, and parameters. Furthermore, since the signal equalization parameters are configured separately for the controller and bridge channel, corresponding signal equalization parameters can be set separately for peripheral devices connected to different bridge channels under the same controller. In this way, the target signal equalization parameters can be mapped to the peripheral devices, and the parameters can be automatically set according to the actual physical bus location of the peripheral devices. No manual configuration is required, which can ensure that the signal equalization parameters are reliably set and matched with the peripheral devices.

[0021] The present invention also provides a parameter setting device, a host device, a computer-readable storage medium, and a computer program product, which have the above-mentioned beneficial effects. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0023] Figure 1 A flowchart illustrating a parameter setting method provided in an embodiment of the present invention; Figure 2 This is a flowchart of an automatic PCIe device Preset curing method provided in an embodiment of the present invention; Figure 3 This is a flowchart illustrating the process of identifying and matching PCIe devices for which a preset needs to be fixed, as provided in an embodiment of the present invention. Figure 4 This is a flowchart illustrating the parsing of the controller and bridge channel information of the target device provided in an embodiment of the present invention; Figure 5This is a flowchart illustrating the location of corresponding PCIe configuration parameters in the BIOS Flash, provided in an embodiment of the present invention. Figure 6 This is a flowchart illustrating the modification and embedding of Preset parameters into Flash, as provided in an embodiment of the present invention. Figure 7 This is a structural block diagram of a parameter setting device provided in an embodiment of the present invention; Figure 8 This is a structural block diagram of a host device provided in an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] Buses can be used to connect processors, root ports, bridges, and peripheral devices in host devices. Peripheral devices include network interface cards (NICs), graphics processors (GPUs), accelerator cards, and storage controllers. Buses such as the Peripheral Component Interconnect Express (PCIe) standard are examples of high-speed serial computer expansion buses. As bus transmission rates increase, signal loss in the link has a more significant impact on link training and data transmission. To compensate for the loss of high-speed signals during transmission, link signals can be adjusted by configuring signal equalization parameters. For example, for the PCIe bus, the PCIe signal equalization preset parameter can be adjusted to adjust the link signal and improve link signal quality.

[0026] During startup, the Basic Input Output System (BIOS) performs bus enumeration and peripheral device initialization. The Processor Base Firmware (PBF) then reads the corresponding configuration and loads the signal equalization parameters into the controller. Flash memory is used to save configuration data after power failure. This configuration data includes the signal equalization parameters for each controller and its bridge channels.

[0027] In related technologies, configuration personnel manually fill in the preset for the bus controller using the Processor Base Firmware (PBF) configuration tool; after configuration, a configuration file is generated, which is then used to generate the PBF firmware, and then packaged with the Unified Extensible Firmware Interface (UEFI) firmware to form a complete BIOS firmware. After the host device writes the BIOS firmware and powers on, the PBF loads the preset into the controller register.

[0028] However, in the above method, the configuration personnel need to manually fill in the preset, and after completion, the preset is fixed with the current physical bus topology of the host device and the current installation location of the peripheral device. When the peripheral device changes slots or the controller channel splitting method changes, the controller and bridge channel corresponding to the peripheral device may change with the physical bus topology, and the original preset configuration location may also become invalid. In this case, it is usually necessary to reselect the channel, generate the configuration file, and recompile and write the BIOS firmware. More importantly, the above method will cause the same bridge channel of the bus controller to use a uniform preset, making it difficult to set the corresponding parameters according to the peripheral devices actually connected to that bridge channel.

[0029] In view of this, regarding the problem of how to automatically set signal equalization parameters for peripheral devices to ensure accurate configuration of signal equalization parameters when the connection position or channel of the peripheral device changes, the present invention provides a parameter setting method. This method determines the target signal equalization parameters corresponding to the peripheral device based on its device identification information, and determines the actual controller and bridge channel connected to the peripheral device in conjunction with the current physical bus topology. This locates the corresponding parameter storage location and updates the signal equalization parameters so that they match the actual connection relationship of the peripheral device.

[0030] It should be noted that the execution entity in this embodiment is the basic input / output system of the host device. This embodiment does not limit the specific form of the host device; for example, it can be a personal computer, a server, or other types of devices.

[0031] Please refer to Figure 1 , Figure 1 A flowchart of a parameter setting method provided in an embodiment of the present invention, the method may include: S11. Identify the physical bus topology of the host device, and determine the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device based on the physical bus topology.

[0032] In this embodiment, the physical bus topology represents the connection relationships between the controller, root port, bridge, physical bus, and peripheral devices in the host device. The controller manages the corresponding bus interfaces and channels; one controller can correspond to multiple connection channels. The root port connects the controller to the downstream physical bus. The bridge connects physical buses at different levels to extend the upstream physical bus to the downstream physical bus. Peripheral devices are connected to their respective downstream physical buses. Considering that the physical bus topology of the host device may change—for example, the bridge channel splitting method of the controller may change—and the installation location of the peripheral devices may also change, in this embodiment, the basic input / output system can redetermine the controller channel splitting method and complete bus enumeration during the host device's startup initialization phase. This ensures that the currently identified physical bus topology reflects the actual connection location of the peripheral device during startup, thereby correctly determining the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device. Therefore, even if the peripheral device changes slots or the controller adopts a different channel splitting method, the controller information and bridge channel information corresponding to the device can be redetermined based on the current physical bus topology, providing a basis for subsequent parameter storage location determination.

[0033] The following describes the process of identifying the physical bus topology and obtaining the controller information and bridge channel information of peripheral devices. In one possible scenario, identifying the physical bus topology of the host device and determining the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device based on the physical bus topology may include: S111. During the initialization process of the host device, the channel splitting method of the controller is determined according to the expansion card and supporting circuit, the controller is configured according to the channel splitting method, and root port identification information is assigned to the root port of the corresponding controller.

[0034] Different expansion cards and associated circuits can enable the controller to form channels of varying numbers and widths. Different channel splitting methods may result in different correspondences between root ports and root port identifiers. Therefore, in this step, the basic input / output system first determines the channel splitting method based on the current expansion card and associated circuits, then configures the controller according to this method, and assigns root port identifiers to the root ports of the corresponding controllers. This determines the correspondence between the channel splitting method used in this startup and each root port.

[0035] For example, the controller can use X16, 2×X8 or 4×X4 channel splitting methods, or other methods can be used for splitting.

[0036] S112. Traverse the physical bus of the host device and the peripheral devices connected to the physical bus to establish the physical bus topology.

[0037] The basic input / output system can start from the root port, traverse the downstream physical bus, bridge and peripheral devices in sequence, and record the device path of each peripheral device and the root port pointed to by the device path, thereby establishing the physical bus topology.

[0038] S113. Determine the root port for peripheral device connection based on the physical bus topology, and obtain the root port identification information of the root port.

[0039] The root port identification information (RootBDF) may include the Bus-Device-Function (BDF) identifier of the root port. The basic input / output system can obtain the device path of the peripheral device through the device scanning interface, convert the device path into a device path data structure used by the platform, and read the device number and other fields of the corresponding root port to obtain the root port identification information.

[0040] For example, the device path can be represented as PciRoot(0x0) / Pci(0x4,0x0) / Pci(0x0,0x0). Based on the result of the Basic Input / Output System (BIOS) allocating root port identifier information according to the channel splitting method in the early stage, 0x4 in Pci(0x4,0x0) represents the bridge channel number in the UEFI interface (Unified Extensible Firmware Interface). The BIOS can first obtain the device path, convert the device path into a PCI device path data structure used by the platform, and then read the device number field to obtain the bridge channel number.

[0041] S114. Determine the bridge channel information based on the root port identification information, and determine the controller information based on the correspondence between the bridge channel and the controller.

[0042] For example, the Basic Input / Output System (BIOS) obtains the bridge channel number currently connected to the peripheral device based on the root port identifier information, and then converts the bridge channel number to the PCIe controller number according to the correspondence between UEFI bridge channel numbers and PCIe controller numbers in the platform. In the BIOS code, this conversion can be accomplished using a switch function, with the bridge channel number as the input variable and the PCIe controller number as the output variable.

[0043] S12. Obtain the device identification information of the peripheral device, and determine the target signal equalization parameters corresponding to the peripheral device based on the device identification information and the preset corresponding information.

[0044] In this embodiment, preset correspondence information is used to store the correspondence between peripheral devices and their target signal equalization parameters. The target signal equalization parameters are the exclusive signal equalization parameters for that peripheral device. This correspondence can be set for a specific peripheral device or for the device type. For a specific peripheral device, the device's unique identifier (e.g., a combination of the device manufacturer's identifier and the device model identifier) ​​can be used as the device identification information to determine the target signal equalization parameters corresponding to that peripheral device. For a device type, information that characterizes the device type can be used as the device identification information to determine the target signal equalization parameters corresponding to that type of peripheral device.

[0045] Furthermore, this embodiment can either pre-set corresponding target signal equalization parameters for all peripheral devices connected to the host device, or set corresponding target signal equalization parameters only for some peripheral devices. For the case of setting corresponding target signal equalization parameters for some peripheral devices, these peripheral devices can be added to a preset whitelist, and the target signal equalization parameters can be set for peripheral devices in the preset whitelist, while other peripheral devices continue to use their original parameters. After obtaining device identification information, the basic input / output system can search for the corresponding signal equalization parameter from the preset corresponding information and determine the found signal equalization parameter as the target signal equalization parameter. Thus, the target signal equalization parameter is determined by the identity or device type of the peripheral device.

[0046] Furthermore, the aforementioned preset mapping relationship can be pre-set in the firmware code of the Basic Input / Output System (BIOS). The signal equalization parameters in the whitelist are parameters pre-determined based on the signal test results of the corresponding peripheral devices. Specifically, before firmware formation, signal tests can be performed on the peripheral devices that need to be adapted, determining the signal equalization parameters that meet the link signal requirements of the device. The device manufacturer identifier, device model identifier, and the signal equalization parameters determined in the tests are then linked and written into the BIOS code. After the host device starts up, the BIOS can directly use the preset mapping relationship saved with the code to determine the target signal equalization parameters without re-performing signal tests during the startup process. For peripheral devices already included in the preset mapping relationship, even if their connection location or channel configuration changes, the parameter storage location can be re-determined and the corresponding parameters updated based on the current physical bus topology, without needing to recreate the configuration file, compile, and write it into the complete firmware.

[0047] The following describes the specific process for determining the target signal equalization parameters of peripheral devices. In one possible scenario, the device identification information of the peripheral device is obtained, and the target signal equalization parameters corresponding to the peripheral device are determined based on the device identification information and preset corresponding information. This may include: S1211. Obtain the device manufacturer identifier and device model identifier from the configuration space of the peripheral device.

[0048] The Vendor ID (VID) identifies the device manufacturer, and the Device ID (DID) identifies the device model as defined by the corresponding manufacturer. These two identifiers can be stored in the peripheral device's configuration space. The Basic Input / Output System (PIS) can read this configuration space when enumerating devices and use the combination of these two identifiers as the device identification information.

[0049] S1212. Match the equipment manufacturer identifier and equipment model identifier with the preset whitelist.

[0050] The preset matching information may include a preset whitelist, which stores the correspondence between device manufacturer identifiers, device model identifiers, and signal equalization parameters. The basic input / output system compares the device manufacturer identifier and device model identifier of the current device with the corresponding identifiers in the preset whitelist item by item to determine whether there is a whitelist record that matches the current device.

[0051] S1213. When a match is successful, determine the target signal equalization parameters according to the preset whitelist.

[0052] A successful match indicates that the current peripheral device requires specific signal equalization parameters to be set. The basic input / output system reads the signal equalization parameters corresponding to the device manufacturer's identifier and device model identifier from the preset whitelist and identifies them as the target signal equalization parameters for subsequent parameter comparison and updates.

[0053] S1214. If the device manufacturer identifier and device model identifier do not match the preset whitelist, the signal equalization parameters will not be updated for the corresponding peripheral device.

[0054] If the device manufacturer's identifier and device model identifier do not match the preset whitelist, it indicates that the peripheral device is a general-purpose device or a peripheral device that does not require parameter adjustment. Therefore, subsequent parameter updates will not be performed on it to ensure that only target peripheral devices that require dedicated signal equalization parameters are processed.

[0055] Furthermore, when multiple peripheral devices match the preset whitelist, the basic input / output system determines the target signal equalization parameters, the corresponding controller information and bridge channel information, and the parameter storage location for each peripheral device, and compares and updates the corresponding parameters accordingly. In this way, the target signal equalization parameters required by each peripheral device can be written to the parameter storage location corresponding to its current topology, allowing multiple peripheral devices to use the signal equalization parameters corresponding to themselves.

[0056] In another possible scenario, the device identification information may also include device type information, and the preset corresponding information may include a preset whitelist, which stores the correspondence between device types and signal equalization parameters. Based on this, determining the target signal equalization parameters may include: S1221. Obtain device type information of peripheral devices.

[0057] The basic input / output system can identify the device type of a peripheral device when enumerating peripheral devices, and use the identified device type as device identification information.

[0058] S1222. Match the device type information with the device types in the preset whitelist.

[0059] The basic input / output system matches the device type of the current peripheral device with the device types recorded in the preset whitelist to determine whether there is a record in the preset whitelist that corresponds to the device type of the current peripheral device.

[0060] S1223. When a match is successful, determine the target signal equalization parameters according to the preset whitelist.

[0061] A successful match indicates that the current peripheral device's device type requires the setting of corresponding signal equalization parameters. The Basic Input / Output System (BIOS) reads the signal equalization parameters corresponding to this device type from a preset whitelist and identifies them as the target signal equalization parameters. This allows for the pre-setting of corresponding signal equalization parameters for specific types of peripheral devices, ensuring that peripheral devices of that type use parameters appropriate to their type.

[0062] S13. Obtain the configuration data in the flash memory, and determine the corresponding parameter storage location in the configuration data based on the controller information and bridge channel information.

[0063] In this embodiment, the configuration data is configured with parameter items for storing signal equalization parameters according to different controllers and bridge channels. Controller information is used to determine the corresponding controller configuration area, and bridge channel information is used to determine the parameter items of the corresponding bridge channel within that controller configuration area, enabling different bridge channels under the same controller to correspond to their respective parameter storage locations. To update the signal equalization parameters corresponding to the target peripheral device, the basic input / output system reads the configuration data from flash memory and locates the current parameter storage location corresponding to the target peripheral device based on the controller information and bridge channel information determined in step S11. Specifically, the complete configuration data can be read into memory according to a preset offset position and data length in flash memory, so that the signal equalization parameters in the corresponding parameter storage location can be compared and updated subsequently.

[0064] As can be seen, the basic input / output system first determines the configuration area of ​​the corresponding controller based on the controller information, then determines the parameter items of the corresponding bridge channel within the controller's configuration area based on the bridge channel information, and determines the location of these parameter items in the configuration data as the parameter storage location of the current peripheral device. Since the signal equalization parameters in the configuration data are stored separately for the bus controller and bridge channel, by combining the controller information and bridge channel information for location, different bridge channels under the same bus controller can be distinguished, and corresponding signal equalization parameters can be set for the peripheral devices actually connected to each bridge channel.

[0065] Furthermore, to ensure accurate determination of parameter storage locations based on configuration data, the acquired configuration data can be verified before parameter location to ensure normal read and write capabilities of the flash memory. In one possible scenario, before determining the corresponding parameter storage location in the configuration data based on controller information and bridge channel information, the method further includes: S131. Perform integrity and validity checks on the configuration data obtained from the flash memory to determine if the configuration data meets the normal read and write requirements.

[0066] Integrity checks confirm the completeness of the read configuration data, while validity checks confirm that the fields to be accessed in the configuration data conform to the corresponding data structure requirements. These checks identify abnormal configuration data before parameter location and flash memory erasure, preventing further modification of configuration data that cannot be parsed or written back correctly.

[0067] Integrity verification can be performed according to the integrity fields or verification information used in the configuration data; validity verification can be performed according to the data structure requirements of the configuration data to determine whether each field to be accessed can be parsed normally. The specific verification method can adopt the verification method pre-set by the host device for the configuration data.

[0068] S132. If the verification fails, the parameter setting process for the current peripheral device ends; if the verification passes, proceed to step S133.

[0069] S133. Based on the controller information and bridge channel information, determine the corresponding parameter storage location in the configuration data.

[0070] S14. Determine whether the current signal equalization parameter in the parameter storage location is the same as the target signal equalization parameter. If they are different, update the current signal equalization parameter to the target signal equalization parameter.

[0071] In this embodiment, the current signal equalization parameter is the signal equalization parameter already saved in the parameter storage location determined in step S13, and the target signal equalization parameter is the signal equalization parameter determined in step S12 based on the current peripheral device. The basic input / output system can compare the two; when they differ, the current signal equalization parameter is updated to the target signal equalization parameter. Thus, after a change in the peripheral device's connection location or channel configuration, it can be determined whether the corresponding signal equalization parameter needs adjustment based on the current peripheral device and its actual connection location, ensuring that the parameter configuration matches the actual connection relationship of the current peripheral device; when they are the same, there is no need for repeated updates, and unnecessary flash memory write operations can be reduced.

[0072] The following describes the specific update process for the signal equalization parameters. In one possible scenario, updating the current signal equalization parameters to the target signal equalization parameters includes: S141. Store the acquired configuration data in memory, and modify the current signal equalization parameter in the parameter storage location in the configuration data in memory to the target signal equalization parameter.

[0073] The basic input / output system stores the configuration data obtained from flash memory into memory, and modifies the current signal equalization parameter in the parameter storage location determined in step S13 to the target signal equalization parameter determined in step S12 in memory, while keeping other data in the configuration data unchanged.

[0074] S142. Erase the storage area in the flash memory that stores the configuration data, and write the modified complete configuration data into the flash memory.

[0075] Since the corresponding storage area in the flash memory needs to be erased and rewritten, the basic input / output system erases the storage area storing the configuration data and rewrites the modified complete configuration data in memory into the storage area, thereby saving the target signal equalization parameters to the corresponding parameter storage location while retaining other data in the configuration data.

[0076] Furthermore, when the current signal equalization parameters differ from the target signal equalization parameters, the basic input / output system also sets a restart flag; when they are the same, the current signal equalization parameters remain unchanged, and there is no need to perform the above parameter update.

[0077] Furthermore, to confirm that the modified configuration data has been correctly written to the flash memory, in one possible scenario, this method also includes: S144. After writing the modified complete configuration data to the flash memory, reread the configuration data in the flash memory and verify the reread configuration data with the modified configuration data in memory.

[0078] The basic input / output system rereads the configuration data written to flash memory and compares it with the modified configuration data in memory, which serves as the source of the write, to confirm that the written configuration data is consistent with the modified configuration data.

[0079] S145. If the verification passes, set the configuration activation flag.

[0080] When the reread configuration data matches the modified configuration data in memory, the basic input / output system sets a configuration activation flag to indicate that the updated configuration data has passed write verification, enabling the host device to load the updated target signal equalization parameters based on this configuration data after restarting.

[0081] Furthermore, when a restart flag is set, this method also includes: S146. Control the host device to restart according to the restart flag; after the host device restarts, read the updated configuration data in the flash memory, and load the target signal equalization parameters in the updated configuration data into the corresponding controller.

[0082] The basic input / output system controls the host device to restart based on a restart flag. After the host device restarts, the processor's basic firmware reads the updated configuration data from the flash memory and loads the target signal equalization parameters into the corresponding controller, so that the updated target signal equalization parameters are actually applied to the corresponding peripheral devices.

[0083] Based on the above embodiments, this invention can identify the physical bus topology of the host device using a basic input / output system, determine the controller and bridge channel currently connected to the peripheral device, and determine the corresponding target signal equalization parameters based on the device identification information of the peripheral device. Subsequently, the parameter storage location is determined in the flash memory configuration data according to the controller and bridge channel, and updated when the current signal equalization parameters differ from the target signal equalization parameters. In this way, the target signal equalization parameters can be determined according to the peripheral device, and the parameter storage location can be determined according to the physical bus position of the peripheral device. Therefore, even after the peripheral device changes slots or the controller channel splitting method changes, the parameter storage location can still be re-determined and the corresponding parameters written according to the changed physical bus topology. This reduces the need for re-selecting channels, creating configuration files, and recompiling and writing firmware for different hardware topologies, while also reducing errors caused by manually configuring controllers, bridge channels, and parameters. Furthermore, since the signal equalization parameters are configured separately for the controller and bridge channel, corresponding signal equalization parameters can also be set separately for peripheral devices connected to different bridge channels under the same controller. In this way, the target signal equalization parameters can be mapped to the peripheral devices, and the parameters can be automatically set according to the actual physical bus location of the peripheral devices. No manual configuration is required, which can ensure that the signal equalization parameters are reliably set and matched with the peripheral devices.

[0084] Based on the above embodiments, the parameter setting method described above will be fully explained below with reference to specific examples and diagrams. Please refer to... Figure 2 , Figure 2 This is a flowchart of an automatic PCIe device preset curing method according to the present invention. The parameter setting process may include: Step S21: Identify and match the PCIe devices for which presets need to be embedded. During the PCIe enumeration phase, the BIOS completes bus scanning and device initialization, obtains basic information of all PCIe devices, compares the device VID and DID with the preset whitelist, filters out target peripherals that need to have their exclusive preset parameters embedded, excludes general devices and peripherals that do not require parameter adjustment, and ensures that subsequent configuration operations are performed only on the target devices.

[0085] Step S22: Parse the target device bridge channel and its associated controller information. The BIOS obtains the target device's RootBDF information, maps the root port number to the corresponding device's bridge channel number, and, based on the current split mode in UEFI, parses the PCIe controller number actually mounted on the target device, establishing the correspondence between the device and the physical channel, providing an accurate location basis for subsequent parameter modifications.

[0086] Step S23: Locate the corresponding PCIe configuration parameters in the BIOS Flash. Based on the bridge channel and controller number, map the index location of the PCIe Config structure in the BIOS Flash, read and verify the integrity and validity of the configuration data, ensuring that the data in the Flash can be read and written normally, and prepare for parameter modification.

[0087] Step S24: Modify and save the Preset parameters to Flash. The BIOS erases the sector containing the PCIe configuration in Flash, modifies the Preset parameters of the target controller channel to a device-specific value, and then rewrites the complete configuration data into Flash. After writing, the data is read for verification, and a configuration activation flag is set to ensure that the parameters can be correctly loaded by PBF after reboot.

[0088] Further, please refer to Figure 3 , Figure 3 This is a flowchart illustrating the process of identifying and matching PCIe devices that require firmware embedding in this invention. The specific process of step S21 is as follows: Step S211: The BIOS completes PCIe bus enumeration. During the PCIe initialization phase, the BIOS traverses all PCIe buses and devices, establishing a topology to provide a foundation for subsequent device identification. During boot initialization, the BIOS determines the partitioning status based on the external Riser card and its associated chip circuitry. Based on the partitioning status, it configures the CPU's PCIe controller and assigns the corresponding RootBDF to the appropriate controller.

[0089] Step S212: Call the device scan function to obtain information about all PCIe devices. VID and DID can be obtained by reading the fixed address content of the device's PCIe configuration space. BDF and RootBDF BIOS can also be obtained through standard interfaces.

[0090] Step S213: Match the target device according to the preset VID / DID whitelist. VID is a unique identifier specific to the manufacturer, and DID is a device identifier assigned by the manufacturer to its various hardware products. Both of these codes are hard-coded into the hardware and cannot be modified by software. The combination of the two ensures uniqueness and accurate differentiation of each hardware device.

[0091] Further, please refer to Figure 4 , Figure 4 This is a flowchart illustrating the parsing of the controller and bridge channel information of the target device according to the present invention. The specific process of step S22 is as follows: Step S221: Obtain the RootBDF information of the target device. Read the root port BDF from the PCIe configuration space of the target device to locate the PCIe root controller where it resides.

[0092] Step S222: Parse the RootBDF to determine the UEFI bridge number. The format of the RootBDF is PciRoot(0x0) / Pci(0x4,0x0) / Pci(0x0,0x0). Based on the BIOS's previous allocation of the RootBDF, 0x4 represents the channel number of the bridge in the UEFI. The BIOS code first obtains the device path, then converts the device path into a platform-defined PCI device path structure, and finally directly reads the device number field in the structure to obtain the UEFI bridge number.

[0093] Step S223: Based on the correspondence between bridges and controllers, the controller number is parsed and obtained. According to the system-provided correspondence between UEFI bridge numbers and CPU PCIe controller numbers, the bridge number is converted to a PCIe controller number. In the BIOS code, this conversion can be performed using a simple switch function, with the bridge number as the input variable and the controller number as the output variable.

[0094] Further, please refer to Figure 5 , Figure 5 This is a flowchart illustrating the location of corresponding PCIe configuration parameters in the BIOS Flash of this invention. The specific process of step S23 is as follows: Step S231: Read PCIe configuration data from Flash. The BIOS reads the complete PCIe configuration structure data from a specified area of ​​Flash into memory. The specific area can be found in the CPU's software programming manual, which describes the offset size of the relevant addresses. The BIOS only needs to read the content at the corresponding offset address that matches the size of the PCIe configuration data.

[0095] Step S232: Locate the information for the corresponding PCIe controller number. Read the Preset parameter under the corresponding controller number from the PCIe configuration data into memory.

[0096] Step S233: Determine if the Preset parameter matches the required value. This involves determining if the Preset parameter for a specific device read from memory matches the Preset parameter to be fixed. The fixed Preset value is defined in advance by the developer in the code based on parameters obtained from actual measurements.

[0097] If the steps in S234 are inconsistent, set the restart flag.

[0098] Further, please refer to Figure 6 , Figure 6 This is a flowchart illustrating the modification and embedding of Preset parameters into Flash in this invention. The specific process of step S24 is as follows: Step S241: Modify the Preset parameter of the corresponding bridge to the target value. In the PCIe Config structure in memory, the BIOS modifies the Preset parameter of the target controller to the preset value that the device needs to be fixed. Using the same logic, the BIOS scans and judges the device data in each controller of the PCIe Config structure to ensure that all whitelisted PCIe devices have the required fixed Preset value written to them.

[0099] Step S242: Erase the sector containing the PCIe configuration in the Flash memory. The BIOS calls the Flash erase interface to erase the Flash sector containing the configuration data, ensuring that the write space is empty.

[0100] Step S243: Write the modified complete configuration data to Flash. The BIOS writes the modified PCIe Config structure data to the original address of Flash.

[0101] Step S244: Read and verify the written data. The BIOS reads the data just written and compares it with the configuration in memory. After confirming that there are no errors, the relevant code ends.

[0102] In step S245, the BIOS determines whether to restart based on the restart flag. After writing the PCIe configuration data, the BIOS actively restarts to avoid signal problems caused by PCIe devices not meeting the preset requirements during the initial boot. It also ensures that during PCIe initialization after restart, the PBF can read and apply the PCIe configuration parameters in the FLASH, guaranteeing the normal use of peripherals in the whitelist later.

[0103] The above process leverages the BIOS's existing PCIe device enumeration, topology identification, and Flash read / write capabilities. Based on the VID and DID, it identifies PCIe devices requiring a dedicated preset from a pre-defined whitelist. Using RootBDF, it determines the corresponding UEFI bridge channel and PCIe controller for that device and locates and updates parameters within the PCIe Config in Flash. Therefore, after a device is swapped or the PCIe controller channel splitting method changes, the BIOS can redetermine the preset write location according to the current topology, reducing the need to use PBF configuration tools to reselect the controller and bridge channel, create configuration files, and recompile and write the BIOS firmware. Devices not matching the pre-defined whitelist are not updated, and Flash writing and restarting are only performed when the current preset differs from the target preset, minimizing unnecessary configuration operations.

[0104] The parameter setting device, host device, computer-readable storage medium, and computer program product provided in the embodiments of the present invention will be described below. The parameter setting device, host device, computer-readable storage medium, and computer program product described below can be referred to in correspondence with the parameter setting method described above.

[0105] Please refer to Figure 7 , Figure 7 This is a structural block diagram of a parameter setting device provided in an embodiment of the present invention. The device is applied to the basic input / output system of a host device and may include: The identification module 710 is used to identify the physical bus topology of the host device and determine the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device based on the physical bus topology. The target parameter acquisition module 720 is used to acquire the device identification information of the peripheral device and determine the target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information. The storage location determination module 730 is used to obtain configuration data in flash memory and determine the corresponding parameter storage location in the configuration data based on controller information and bridge channel information. The parameter update module 740 is used to determine whether the current signal equalization parameter in the parameter storage location is the same as the target signal equalization parameter. If they are different, the current signal equalization parameter is updated to the target signal equalization parameter.

[0106] Optionally, the identification module 710 includes: The initialization submodule is used to determine the channel splitting method of the controller based on the expansion card and supporting circuits during the host device startup initialization process, configure the controller according to the channel splitting method, and assign root port identification information to the root port of the corresponding controller. The topology creation submodule is used to traverse the physical bus of the host device and the peripheral devices connected to the physical bus to establish the physical bus topology. The root port determination submodule is used to determine the root port for peripheral device connections based on the physical bus topology and to obtain the root port identification information of the root port. The information determination submodule is used to determine the bridge channel information based on the root port identification information, and to determine the controller information based on the correspondence between the bridge channel and the controller.

[0107] Optionally, the target parameter acquisition module 720 includes: The device identification submodule is used to obtain the device manufacturer identifier and device model identifier from the configuration space of the peripheral device; The parameter matching submodule is used to match the device manufacturer identifier and device model identifier with a preset whitelist, and when the match is successful, to determine the target signal equalization parameters according to the preset whitelist; wherein, the preset whitelist stores the correspondence between the device manufacturer identifier, device model identifier and signal equalization parameters.

[0108] Optionally, if the device manufacturer identifier and device model identifier do not match the preset whitelist, the parameter update module 740 will not perform signal equalization parameter updates for the corresponding peripheral device.

[0109] Optionally, a preset whitelist is pre-set in the code of the basic input / output system, and the signal equalization parameters in the preset whitelist are parameters pre-determined based on the signal test results of the corresponding peripheral devices.

[0110] Optionally, when there are multiple peripheral devices that match the preset whitelist, the identification module 710, the target parameter acquisition module 720, the storage location determination module 730, and the parameter update module 740 perform corresponding processing for each peripheral device to determine the target signal equalization parameters, controller information, bridge channel information, and parameter storage location corresponding to each peripheral device, and update the parameters according to the comparison results between the current signal equalization parameters and the corresponding target signal equalization parameters.

[0111] Optionally, the parameter update module 740 includes: The flag setting submodule is used to set a restart flag when the current signal equalization parameters are different from the target signal equalization parameters; and to keep the current signal equalization parameters unchanged when the current signal equalization parameters are the same as the target signal equalization parameters.

[0112] Optionally, the parameter update module 740 includes: The restart control submodule is used to control the host device to restart based on the restart flag; The parameter loading submodule is used to read the updated configuration data in the flash memory after the host device restarts, and load the target signal equalization parameters in the updated configuration data into the corresponding controller.

[0113] Optionally, the parameter update module 740 includes: The memory modification submodule is used to store the acquired configuration data in memory, and modify the current signal equalization parameter in the parameter storage location in the configuration data in memory to the target signal equalization parameter; The flash write submodule is used to erase the storage area in the flash memory that stores configuration data and write the modified complete configuration data to the flash memory.

[0114] Optionally, the parameter update module 740 includes: The write verification submodule is used to reread the configuration data in flash memory after writing the modified complete configuration data to flash memory, and verify the reread configuration data with the modified configuration data in memory; The Effective Flag Setting submodule is used to set the configuration effective flag when the verification passes.

[0115] Optionally, the storage location determination module 730 includes: The configuration verification submodule is used to perform integrity and validity verification on the configuration data obtained from flash memory before determining the corresponding parameter storage location based on controller information and bridge channel information, so as to ensure that the configuration data meets the normal read and write requirements. The location determination submodule is used to determine the corresponding parameter storage location in the configuration data based on the controller information and bridge channel information when the verification passes.

[0116] The specific processing procedure of the above parameter setting device can be found in the corresponding content provided in the aforementioned parameter setting method embodiments, and will not be repeated here.

[0117] The specific processing procedures for each module and unit of the above parameter setting device can be found in the corresponding content of the parameter setting method, and will not be repeated here.

[0118] Please refer to Figure 8 , Figure 8 This is a structural block diagram of a host device provided in an embodiment of the present invention. The host device 80 includes a processor 81 and a memory 82; wherein, the memory 82 is used to store computer programs; and the processor 81 is used to implement the aforementioned parameter setting method when executing the computer program.

[0119] The memory 82 serves as a storage medium for programs and data and may include read-only memory, random access memory, flash memory, magnetic disk, or optical disk, etc. The computer program executed by the processor 81 may include a basic input / output system program, enabling the processor 81 to perform the aforementioned device identification, topology location determination, parameter positioning, flash memory update, and restart loading processes during the host device startup initialization process.

[0120] Optionally, the host device 80 also includes a power supply 83, a communication interface 84, an input / output interface 85, and a communication bus 86; the power supply 83 is used to provide operating voltage for the hardware in the host device 80, the communication interface 84 is used to establish a data transmission channel between the host device 80 and external devices, the input / output interface 85 is used to acquire input data or output processing results, and the processor 81, memory 82, power supply 83, communication interface 84, and input / output interface 85 are connected through the communication bus 86.

[0121] This invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-described parameter setting method. Since the computer program product and the parameter setting method correspond to each other, the specific processing procedure can be found in the corresponding content of the parameter setting method, and will not be repeated here.

[0122] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described parameter setting method. The computer-readable storage medium may include a read-only memory, a random access memory, a disk, an optical disk, or other storage media capable of storing a computer program. Since the computer-readable storage medium and the parameter setting method correspond to each other, the specific processing procedure can be found in the corresponding content of the parameter setting method, and will not be repeated here.

[0123] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0124] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0125] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0126] The foregoing has provided a detailed description of the parameter setting method, apparatus, host device, storage medium, and program product provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A parameter setting method, characterized in that, Basic input / output systems used in host devices include: Identify the physical bus topology of the host device, and determine the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device based on the physical bus topology; Obtain the device identification information of the peripheral device, and determine the target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information; Obtain configuration data from flash memory, and determine the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information; Determine whether the current signal equalization parameter in the parameter storage location is the same as the target signal equalization parameter. If they are different, update the current signal equalization parameter to the target signal equalization parameter.

2. The parameter setting method according to claim 1, characterized in that, Identify the physical bus topology of the host device, and determine the controller information and bridge channel information corresponding to the current physical bus location of the peripheral device based on the physical bus topology, including: During the startup initialization process of the host device, the channel splitting method of the controller is determined according to the expansion card and supporting circuit, the controller is configured according to the channel splitting method, and root port identification information is assigned to the root port of the corresponding controller. Traverse the physical bus of the host device and the peripheral devices connected to the physical bus to establish the physical bus topology; The root port to which the peripheral device is connected is determined based on the physical bus topology, and the root port identification information of the root port is obtained. The bridge channel information is determined based on the root port identification information, and the controller information is determined based on the correspondence between the bridge channel and the controller.

3. The parameter setting method according to claim 1, characterized in that, The device identification information includes the device manufacturer identifier and the device model identifier. The preset corresponding information includes a preset whitelist, which stores the correspondence between the device manufacturer identifier, the device model identifier and the signal equalization parameters. Acquiring the device identification information of the peripheral device, and determining the target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information, including: The device manufacturer identifier and the device model identifier are obtained from the configuration space of the peripheral device. The device manufacturer identifier and the device model identifier are matched with the preset whitelist. When the match is successful, the target signal equalization parameters are determined according to the preset whitelist.

4. The parameter setting method according to claim 3, characterized in that, The method further includes: If the device manufacturer identifier and the device model identifier do not match the preset whitelist, the signal equalization parameters will not be updated for the corresponding peripheral device.

5. The parameter setting method according to claim 3, characterized in that, When multiple peripheral devices match the preset whitelist, the method further includes: For each of the peripheral devices, the corresponding target signal equalization parameters are determined according to their device identification information, the controller information and bridge channel information corresponding to their current physical bus position are determined according to the physical bus topology, and the corresponding parameter storage location is determined in the configuration data according to the controller information and bridge channel information. Determine whether the current signal equalization parameter in each of the parameter storage locations is the same as the corresponding target signal equalization parameter. If they are different, update the corresponding current signal equalization parameter to the target signal equalization parameter.

6. The parameter setting method according to claim 3, characterized in that, The preset whitelist is pre-set in the code of the basic input / output system, and the signal equalization parameters in the preset whitelist are parameters pre-determined based on the signal test results of the corresponding peripheral devices.

7. The parameter setting method according to claim 1, characterized in that, The method further includes: If the current signal equalization parameters are different from the target signal equalization parameters, then set the restart flag; If the current signal equalization parameter is the same as the target signal equalization parameter, then the current signal equalization parameter remains unchanged.

8. The parameter setting method according to claim 7, characterized in that, The method further includes: The host device is restarted according to the restart flag; After the host device restarts, it reads the updated configuration data from the flash memory and loads the target signal equalization parameters from the updated configuration data into the corresponding controller.

9. The parameter setting method according to claim 1, characterized in that, Updating the current signal equalization parameters to the target signal equalization parameters includes: The acquired configuration data is stored in memory, and the current signal equalization parameter in the parameter storage location in the configuration data in memory is modified to the target signal equalization parameter. Erase the storage area in the flash memory that stores the configuration data, and write the modified complete configuration data into the flash memory.

10. The parameter setting method according to claim 9, characterized in that, The method further includes: After writing the modified complete configuration data into the flash memory, the configuration data in the flash memory is read again, and the read configuration data is verified with the modified configuration data in the memory. If the verification passes, set the configuration to take effect flag.

11. The parameter setting method according to claim 1, characterized in that, Before determining the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information, the method further includes: The configuration data obtained from the flash memory is subjected to integrity and validity checks to determine whether the configuration data meets the normal read and write requirements. If the verification passes, proceed to the step of determining the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information.

12. A parameter setting device, characterized in that, Basic input / output systems used in host devices include: The identification module is used to identify the physical bus topology of the host device and determine the controller information and bridge channel information corresponding to the physical bus position of the peripheral device based on the physical bus topology. The target parameter acquisition module is used to acquire the device identification information of the peripheral device, and determine the target signal equalization parameters corresponding to the peripheral device based on the device identification information and preset corresponding information. A storage location determination module is used to obtain configuration data in flash memory and determine the corresponding parameter storage location in the configuration data based on the controller information and the bridge channel information. The parameter update module is used to determine whether the current signal equalization parameter in the parameter storage location is the same as the target signal equalization parameter. If they are different, the current signal equalization parameter is updated to the target signal equalization parameter.

13. A host device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the parameter setting method as described in any one of claims 1 to 11 when executing the computer program.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the parameter setting method as described in any one of claims 1 to 11.

15. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the parameter setting method according to any one of claims 1 to 11.