A device management method, system, electronic device and readable storage medium

By matching and loading the OPROM data of PCIE devices in faster access storage space during computer startup, the problem of too long startup time during PCIE bus scanning is solved, the system startup efficiency and user experience are improved, and the system compatibility and security are enhanced.

CN119225861BActive Publication Date: 2025-07-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411721771.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-07-18
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

During the computer startup process, the UEFI OPROM of all PCIE devices needs to be reloaded during the PCIE bus scanning process, resulting in too long startup time, especially in systems configured with multiple PCIE devices, which affects the system startup efficiency and user experience.

Method used

During the computer startup process, the device connected to the target communication bus is identified, its identification information is obtained, and a matching is performed in the first preset storage space with faster access speed. If the match is successful, OPROM data is loaded from the first preset storage space, otherwise it is loaded and written from the preset physical storage device to optimize the startup process.

Benefits of technology

Reduces the time to load data from physical storage devices every time it starts up, improves the system startup efficiency and user experience, especially in systems with multiple PCIE devices, and enhances the system compatibility, security and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225861B_ABST
    Figure CN119225861B_ABST
Patent Text Reader

Abstract

The present invention discloses a device management method, system, electronic device and readable storage medium, relating to the field of servers. To solve the problem of long computer startup time, the method includes: during the computer startup process, obtaining the identification information corresponding to the device; matching the identification information with the information stored in the first preset storage space, where the access speed of the first preset storage space is greater than or equal to the memory access speed of the preset physical storage device corresponding to the device; in response to successful matching, loading the option read-only memory data of the device from the first preset storage space; in response to failed matching, loading the option read-only memory data of the device from the preset physical storage device and writing the option read-only memory data of the device into the first preset storage space. The present invention can optimize the loading process of the option read-only memory data during startup, reduce the startup time, and improve the startup efficiency of the system and the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of servers, and particularly to a device management method, system, electronic device, and readable storage medium. Background Art

[0002] During the computer startup process, the PCIE (Peripheral Component Interconnect Express) bus scan is a critical step, which ensures that all high-performance hardware devices connected through the PCIE interface can be accurately recognized by the system and initialized smoothly. When the computer starts up, the UEFI (Unified Extensible Firmware Interface) firmware performs a PCIE bus scan to identify each PCIE device connected to the bus and its attached UEFI OPROM (Option ROM), and loads the OPROM into memory as a driver so that the UEFI firmware can manage the PCIE device. However, since the UEFI OPROM of all PCIE devices needs to be reloaded every time the computer starts up, this process is cumbersome and time-consuming. Especially in a system configured with multiple PCIE devices, this repeated loading process will significantly increase the startup time.

[0003] Therefore, how to provide a solution to the above technical problems is an issue that those skilled in the art need to solve currently. Summary of the Invention

[0004] The purpose of the present invention is to provide a device management method, system, electronic device, and readable storage medium, which can optimize the loading process of option read-only memory data during startup, reduce the startup time, and improve the startup efficiency and user experience of the system.

[0005] To solve the above technical problems, the present invention provides a device management method, including: during the computer startup process, when a device connected to the target communication bus is recognized, obtaining the identification information corresponding to the device; matching the identification information with the information stored in the first preset storage space; the access speed of the first preset storage space is greater than or equal to the memory access speed of the preset physical storage device corresponding to the device; in response to a successful match, loading the option read-only memory data of the device from the first preset storage space to manage the device; in response to a failed match, loading the option read-only memory data of the device from the preset physical storage device to manage the device, and writing the option read-only memory data of the device into the first preset storage space.

[0006] Among them, the process of loading the option read-only memory data of the device from the preset physical storage device includes: in response to the preset physical storage device satisfying the direct access condition, directly loading the option read-only memory data of the device from the preset physical storage device; in response to the preset physical storage device not satisfying the direct access condition, creating a memory area that satisfies the direct access condition, copying the option read-only memory data of the device from the preset physical storage device to the memory area, so as to load the option read-only memory data in the memory area, and creating a device access path for the loaded option read-only memory data.

[0007] Among them, after loading the option read-only memory data of the device from the first preset storage space, the device management method further includes: recording the information of the loaded device; generating a current record table based on the information of all the devices recorded in the current time; according to the comparison result between the current record table and the previous record table, determining whether there is a deleted device; if so, deleting the option read-only memory data of the deleted device from the first preset storage space.

[0008] Among them, before matching the identification information with the information stored in the first preset storage space, the device management method further includes: determining a reference memory space capacity based on the device recognized when the computer is first started with the device in place; dividing the first preset storage space according to the reference memory space capacity.

[0009] Among them, after determining the reference memory space capacity, the device management method further includes: determining a reserved space capacity; the process of dividing the first preset storage space according to the reference memory space capacity includes: dividing the first preset storage space according to the reserved space capacity and the reference memory space capacity.

[0010] Among them, the device management method further includes: determining a target memory space capacity based on the device recognized when the computer is not first started; when the target memory space capacity is greater than the reference memory space capacity, re-dividing the first preset storage space according to the target memory space capacity.

[0011] Among them, the process of writing the option read-only memory data of the device into the first preset storage space includes: in response to the first preset storage space satisfying the first writing condition, writing the option read-only memory data of the device into the first preset storage space; in response to the first preset storage space not satisfying the first writing condition, determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space, so that the first preset storage space satisfies the first writing condition.

[0012] Among them, in response to the first preset storage space not meeting the first writing condition, determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space so that the first preset storage space meets the first writing condition includes: in response to the first preset storage space not meeting the first writing condition and the option read-only memory data of the device not meeting the second writing condition, not writing the option read-only memory data of the device into the first preset storage space; in response to the first preset storage space not meeting the first writing condition and the option read-only memory data of the device meeting the second writing condition, determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space so that the first preset storage space meets the first writing condition.

[0013] Among them, the process of determining the data to be deleted in the first preset storage space includes: determining the option read-only memory data with the longest storage time in the first preset storage space as the data to be deleted; and / or, determining the option read-only memory data of the device with the lowest usage frequency in the first preset storage space as the data to be deleted; and / or, determining the smallest option read-only memory data in the first preset storage space as the data to be deleted.

[0014] Among them, the device management method further includes: partitioning the first preset storage space in the memory space of the baseboard management controller; configuring the baseboard management controller to be in read-only mode for the first preset storage space, and configuring the host of the computer to be in read-write mode for the first preset storage space.

[0015] Among them, the device management method further includes: determining a communication interface on the baseboard management controller; establishing an interface mapping relationship between the communication interface and the first preset storage space.

[0016] Among them, the process of obtaining the identification information corresponding to the device includes: sending a configuration read-write request to the configuration space of the device, and obtaining the supplier identification information and device identification information corresponding to the device; the identification information includes the supplier identification information and the device identification information.

[0017] Among them, the process of loading the option read-only memory data of the device from the preset physical storage device includes: reading the value of the target register of the device; the target register is used to indicate the physical address of the option read-only memory data of the device in the preset physical storage device; determining the physical address of the device in the preset physical storage device based on the value of the target register; loading the option read-only memory data of the device according to the physical address.

[0018] Among them, the process of writing the option read-only memory data of the device into the first preset storage space includes: calculating a check code of the option read-only memory data of the device; encapsulating the check code, the option read-only memory data of the device, and the identification information to obtain a data packet; and writing the data packet into the first preset storage space.

[0019] Among them, the device management method further includes: in response to detecting a device firmware update request, reading a data packet to be updated stored in a second preset storage space; and updating the data packet to be updated to the first preset storage space so as to load the option read-only memory data in the data packet to be updated.

[0020] Among them, the device management method further includes: partitioning the second preset storage space in the memory space of a baseboard management controller; configuring the host of the computer to be in a read-only mode for the second preset storage space, and configuring the baseboard management controller to be in a read-write mode for the second preset storage space, so that the baseboard management controller can obtain the data packet to be updated in the second preset storage space, determine the data packet to be processed in the first preset storage space, and use the data packet to be updated to replace the data packet to be processed.

[0021] To solve the above technical problems, the present invention further provides a device management system, including: a first acquisition module, configured to, during the startup process of a computer, when a device connected to a target communication bus is recognized, acquire the identification information corresponding to the device; a matching module, configured to match based on the identification information and the information stored in a first preset storage space; the access speed of the first preset storage space is greater than or equal to the memory access speed of a preset physical storage device corresponding to the device; a first loading module, configured to, in response to a successful match, load the option read-only memory data of the device from the first preset storage space to manage the device; and a second loading module, configured to, in response to a failed match, load the option read-only memory data of the device from the preset physical storage device to manage the device, and write the option read-only memory data of the device into the first preset storage space.

[0022] To solve the above technical problems, the present invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the device management method described in any one of the above are implemented.

[0023] To solve the above technical problems, the present invention further provides an electronic device, including: a memory, configured to store a computer program; and a processor, configured to implement the steps of the device management method described in any one of the above when executing the computer program.

[0024] To solve the above technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the device management method described in any one of the above are implemented.

[0025] The present invention provides a device management method. During the computer startup process, each device connected to the target communication bus is identified, and its corresponding identification information is obtained, and a matching search is performed in a first preset storage space, which is a memory area with fast access speed and its access speed is greater than the memory access speed of the preset physical storage device corresponding to the device. If the match is successful, the option read-only memory data of the device is directly loaded from the first preset storage space, thereby reducing the time for loading data from the physical storage device each time the computer starts up. If the match fails, the option read-only memory data of the device is loaded from the preset physical storage device for device management. At the same time, the loaded data is written into the first preset storage space for direct loading from the first preset storage space during the next startup. The loading process of the option read-only memory data during startup is optimized, reducing the startup time. Especially in a system configured with multiple PCIE devices, the startup efficiency of the system and the user experience are improved.

[0026] The present invention also provides a device management system, an electronic device, and a computer-readable storage medium, which have the same beneficial effects as the above device management method. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a flowchart of the steps of a device management method provided by the present invention.

[0029] Figure 2 It is a flowchart of the steps of another device management method provided by the present invention.

[0030] Figure 3 It is a schematic structural diagram of a device management system provided by the present invention.

[0031] Figure 4 It is a schematic structural diagram of an electronic device provided by the present invention.

[0032] Figure 5 It is a schematic structural diagram of a computer-readable storage medium provided by the present invention. Specific implementation manners

[0033] The core of the present invention is to provide a device management method, system, electronic device and readable storage medium, which can optimize the loading process of option read-only memory data during startup, reduce the startup time, and improve the startup efficiency and user experience of the system.

[0034] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0035] In a first aspect, the present invention provides a device management method, as Figure 1 shown.

[0036] S101: During the startup process of the computer, when a device connected to the target communication bus is recognized, obtain the identification information corresponding to the device.

[0037] In this embodiment, the startup process of the computer refers to each startup process of the computer. This embodiment only takes one startup process as an example for illustration. When the computer starts up, the UEFI firmware running on its hardware will scan all target communication buses. Among them, the target communication buses include but are not limited to the PCIE bus. For the PCIE bus, the UEFI firmware will identify each PCIE device connected to the PCIE bus. Specifically, the UEFI firmware scans through the PCIE bus to identify each PCIE device connected to the PCIE bus. After identifying the device, the UEFI firmware will read the identification information from the configuration space of each device. These identification information are the unique identifiers of the devices, that is, the unique identifiers of the devices, including but not limited to the vendor ID, device ID, etc., which are convenient for subsequent device matching based on this identification information. In this way, the UEFI firmware can efficiently identify and manage PCIE devices, reduce the startup time, especially in a system configured with multiple PCIE devices, which improves the startup efficiency and user experience of the system.

[0038] S102: Match the identification information with the information stored in the first preset storage space; the access speed of the first preset storage space is greater than or equal to the memory access speed of the preset physical storage device corresponding to the device.

[0039] It can be understood that during the computer startup process, the UEFI firmware uses the identification information of the device to perform matching in the first preset storage space. The first preset storage space is an area specifically divided for storing OPROM data, and its access speed is faster than that of the physical storage device of the device. The first preset storage space includes, but is not limited to, a section of memory space divided from the memory space of the BMC, or a section of memory space divided from the system memory (such as RAM (Random Access Memory)). This is convenient for the BIOS (Basic Input / Output System) of the host to access.

[0040] In this embodiment, taking a device recognized by the UEFI firmware as an example, based on the identification information of the device, matching is performed in the first preset storage space to determine whether the identification information of the device exists in the first preset storage space. If it exists, it is determined that the matching is successful; if not, it is determined that the matching fails. By using the identification information of the device and the first preset storage space for matching, the UEFI firmware can reduce the number of accesses to the physical storage device of the device, thereby improving the startup efficiency. Especially in a system configured with multiple PCIE devices, this optimization can significantly reduce the startup time.

[0041] S103: In response to successful matching, load the option read-only memory data of the device from the first preset storage space to manage the device.

[0042] In this embodiment, if the identification information of the device is included in the first preset storage space, it is considered a successful match, and the OPROM data of the device is directly loaded from the first preset storage space. The OPROM data contains the initialization code and driver program of the device. These codes and programs are executed before the operating system is loaded to ensure that the device can be correctly recognized and configured when the operating system starts. Since the access speed of the first preset storage space is much faster than that of the physical storage device of the device, the UEFI firmware can quickly load and execute the OPROM data, and at the same time avoid the UEFI firmware reading data from the physical storage device of the device (such as ROM (Read-Only Memory)) every time it starts, significantly reducing the startup time.

[0043] S104: In response to failed matching, load the option read-only memory data of the device from the preset physical storage device to manage the device, and write the option read-only memory data of the device into the first preset storage space.

[0044] In this embodiment, if the identification information of the device is not included in the first preset storage space, the matching fails. At this time, the UEFI firmware loads the OPROM data of the device from the preset physical storage device and writes it into the first preset storage space. In this way, during the subsequent startup process, the UEFI firmware can directly load the OPROM data from the first preset storage space without having to read it from the ROM of the device every time. It can be seen that in this embodiment, during the computer startup process, each device connected to the target communication bus is identified, and its corresponding identification information is obtained, and a matching search is performed in the first preset storage space. The first preset storage space is a memory area with fast access, and its access speed is greater than the memory access speed of the preset physical storage device corresponding to the device. If the matching is successful, the option read-only memory data of the device is directly loaded from the first preset storage space, thereby reducing the time for loading data from the physical storage device during each startup. If the matching fails, the option read-only memory data of the device is loaded from the preset physical storage device for device management. At the same time, the loaded data is written into the first preset storage space so that it can be directly loaded from the first preset storage space during the next startup. The loading process of the option read-only memory data during startup is optimized, reducing the startup time. Especially in a system configured with multiple PCIE devices, the startup efficiency of the system and the user experience are improved.

[0045] In an exemplary embodiment, the process of loading the option read-only memory data of the device from the preset physical storage device includes: in response to the preset physical storage device meeting the direct access condition, directly loading the option read-only memory data of the device from the preset physical storage device; in response to the preset physical storage device not meeting the direct access condition, creating a memory area that meets the direct access condition, copying the option read-only memory data of the device from the preset physical storage device to the memory area, so as to load the option read-only memory data in the memory area, and creating a device access path for the loaded option read-only memory data.

[0046] In this embodiment, the process of loading the option read-only memory data of a device from a preset physical storage device can be divided into two cases, depending on whether the preset physical storage device meets the direct access condition. If the UEFI firmware can access the address of the preset physical storage device, it is determined that the preset physical storage device meets the direct access condition; if the UEFI firmware cannot access the address of the preset physical storage device, it is determined that the preset physical storage device does not meet the direct access condition. If the direct access condition is met, the UEFI firmware directly loads the option read-only memory data of the device from the preset physical storage device, avoiding the process of data replication, thereby improving the startup efficiency. If the UEFI firmware cannot access the address of the preset physical storage device, then it cannot directly load the OPROM data from this device. At this time, the computer host will create a new memory area that meets the direct access condition, and the host will copy the OPROM data of the device from the preset physical storage device to this new memory area. After the copying is completed, the UEFI firmware creates a device access path for the loaded OPROM data so that the OPROM data can be accessed and managed through this path subsequently. This flexibility enables the system to adapt to the storage characteristics of different devices.

[0047] In this way, the UEFI firmware can select an appropriate loading method to manage the OPROM data according to whether the preset physical storage device meets the direct access condition, avoiding the situation of reloading the OPROM data every time the system starts, reducing the complexity in the system startup process, and making the startup process more stable and reliable. This method enables the UEFI firmware to support a variety of storage devices, including those with slower access speeds, thereby improving the compatibility and scalability of the system. By copying the OPROM data in memory, unauthorized access or modification can be prevented, enhancing the security of the system.

[0048] In summary, this method of managing the OPROM data according to whether the preset physical storage device meets the direct access condition not only improves the startup efficiency but also enhances the flexibility, resource utilization efficiency, compatibility, and security of the system.

[0049] In an exemplary embodiment, after loading the option read-only memory data of a device from a first preset storage space, the device management method further includes: recording the information of the loaded device; generating a current record table based on the information of all devices recorded in the current instance; and judging whether there is a deleted device according to the comparison result between the current record table and the previous record table. If so, deleting the option read-only memory data of the deleted device from the first preset storage space.

[0050] In this embodiment, after loading the option read-only memory data of the device from the first preset storage space, the host will record the information of the device for which the option read-only memory data is loaded during the current startup process. Based on all the device information recorded during the current startup process, a current record table is generated. The record table is a structured data set used to store and manage the detailed information of the device. It will be compared with the previous record table (if any), and the comparison result is used to determine whether there are deleted devices. If the comparison result shows that there are deleted devices, the OPROM data of these devices will be deleted from the first preset storage space. The deletion operation ensures that the data in the first preset storage space is up-to-date and does not contain information of devices that are no longer in use, ensuring that unnecessary storage space is not occupied, improving the efficiency and performance of the system, especially in scenarios where a large number of devices are processed or device configurations are frequently changed.

[0051] In an exemplary embodiment, before matching the identification information with the information stored in the first preset storage space, the device management method further includes: determining a reference memory space capacity based on the devices recognized when the computer is first started with the device present; dividing the first preset storage space according to the reference memory space capacity.

[0052] When the computer is first started with the device present, the UEFI firmware will recognize all the devices connected to the PCIE bus. Based on these devices, the UEFI firmware will calculate the sum of the OPROM data of all the devices, which can be used as the reference memory space capacity. According to the calculated reference memory space capacity, the UEFI firmware will divide a memory space as the first preset storage space. The division process may involve the configuration of the UEFI firmware to ensure that the size of the first preset storage space matches the reference memory space capacity.

[0053] In this embodiment, the UEFI firmware can dynamically adjust the size of the first preset storage space according to the number of devices supported by the computer and the size of the OPROM data to ensure that it can effectively cache the UEFI OPROM data of all devices and optimize the startup process.

[0054] In an exemplary embodiment, after determining the reference memory space capacity, the device management method further includes: determining a reserved space capacity; the process of dividing the first preset storage space according to the reference memory space capacity includes: dividing the first preset storage space according to the reserved space capacity and the reference memory space capacity.

[0055] In this embodiment, after calculating the reference memory space capacity, the reserved space capacity will also be determined. The reserved space capacity is to reserve a certain amount of extra space to cope with possible expansions or OPROM data of future versions. The first preset storage space is divided according to the reserved space capacity and the reference memory space capacity, which means that the size of the first preset storage space will be the sum of the reference memory space capacity and the reserved space capacity. The addition of the reserved space capacity ensures that the first preset storage space can still meet the requirements when new devices are added or when some devices are removed.

[0056] In this way, it can be ensured that the size of the first preset storage space matches the estimation of the number of devices supported by the computer and the size of the OPROM data, so as to provide enough space to cache the UEFI OPROM data of all devices and optimize the startup process. At the same time, the reserved space capacity also improves the redundancy and future expandability of the system.

[0057] In an exemplary embodiment, the device management method further includes: determining the target memory space capacity based on the devices recognized during the non-first startup of the computer; when the target memory space capacity is greater than the reference memory space capacity, re-dividing the first preset storage space according to the target memory space capacity.

[0058] In this embodiment, during the non-first startup of the computer, the UEFI firmware will recognize all the devices connected to the PCIE bus and determine the target memory space capacity based on these devices. The target memory space capacity can be the sum of the OPROM data of all devices during the current startup process. When the target memory space capacity is greater than the reference memory space capacity, it means that during the non-first startup process of the computer, new devices are added or the OPROM data of existing devices has increased. To ensure that the first preset storage space can accommodate the OPROM data of all devices, the UEFI firmware will re-divide the first preset storage space according to the target memory space capacity.

[0059] Specifically, based on all the devices recognized during the non-first startup of the computer, calculate the sum of the OPROM data of all devices to obtain the target memory space capacity. If the target memory space capacity is greater than the reference memory space capacity, it means that more space is needed to store the OPROM data. The UEFI firmware will re-divide the first preset storage space according to the target memory space capacity, and the size of the new first preset storage space will be the target memory space capacity to ensure that there is enough space to cache the new OPROM data.

[0060] In this embodiment, the UEFI firmware can dynamically adjust the size of the first preset storage space to adapt to the increase in the number of devices or the increase in OPROM data, thereby optimizing the startup process and ensuring the stability and efficiency of the system.

[0061] In an exemplary embodiment, the process of writing the option read-only memory data of a device into a first preset storage space includes: in response to the first preset storage space satisfying a first writing condition, writing the option read-only memory data of the device into the first preset storage space; in response to the first preset storage space not satisfying the first writing condition, determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition.

[0062] In this embodiment, the process of writing the option read-only memory (OPROM) data of a device into a first preset storage space can be divided into two cases, depending on whether the first preset storage space satisfies the first writing condition. If the remaining storage capacity of the first preset storage space is not lower than the writing limit threshold, then it satisfies the first writing condition. In this case, the UEFI firmware can directly write the OPROM data of the device into the first preset storage space; if the remaining storage capacity of the first preset storage space is lower than the writing limit threshold, then it does not satisfy the first writing condition. In this case, the UEFI firmware will determine the data to be deleted in the first preset storage space, and then the UEFI firmware will delete the data to be deleted from the first preset storage space to free up space. After the deletion is completed, the remaining storage capacity of the first preset storage space will increase, so that it satisfies the first writing condition. Finally, the UEFI firmware can write the OPROM data of the device into the first preset storage space.

[0063] Among them, the data to be deleted refers to those unnecessary or low-priority data, which can be deleted to free up storage space.

[0064] In this way, the UEFI firmware can ensure that the data in the first preset storage space does not exceed its capacity limit, thus avoiding problems such as data overflow and insufficient storage space. This method improves the stability of the system and the efficiency of data management.

[0065] In an exemplary embodiment, the process of determining the data to be deleted in the first preset storage space and deleting the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition in response to the first preset storage space not satisfying the first writing condition includes: in response to the first preset storage space not satisfying the first writing condition and the option read-only memory data of the device not satisfying the second writing condition, not writing the option read-only memory data of the device into the first preset storage space; in response to the first preset storage space not satisfying the first writing condition and the option read-only memory data of the device satisfying the second writing condition, determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition.

[0066] In this embodiment, if the OPROM data of the device does not meet the second writing condition, that is, the device is not the device selected by the host that needs to write to the first preset storage space, it is determined that the second writing condition is not met, and the UEFI firmware will not write the OPROM data of the device to the first preset storage space. The second writing condition includes but is not limited to that the device is a device selected by the user, where the device selected by the user includes but is not limited to the device selected by the user in the UEFI setup menu or the boot menu. If the OPROM data of the device meets the second writing condition, the UEFI firmware will continue to execute the subsequent steps, that is, the UEFI firmware will determine the data to be deleted in the first preset storage space. The data to be deleted refers to those unnecessary or low-priority data that can be deleted to free up storage space. The UEFI firmware deletes the data to be deleted from the first preset storage space. After the deletion operation, the remaining storage capacity of the first preset storage space will increase, so that it meets the first writing condition. After the deletion operation is completed, the UEFI firmware will write the OPROM data of the device to the first preset storage space. In this way, the UEFI firmware can ensure that the data in the first preset storage space is up-to-date and necessary, and at the same time avoid the problem of insufficient storage space. This method improves the efficiency of the system and the flexibility of data management.

[0067] In an exemplary embodiment, the process of determining the data to be deleted in the first preset storage space includes: determining the option read-only memory data with the longest storage time in the first preset storage space as the data to be deleted; and / or, determining the option read-only memory data of the device with the lowest usage frequency in the first preset storage space as the data to be deleted; and / or, determining the smallest option read-only memory data in the first preset storage space as the data to be deleted.

[0068] In this embodiment, during the process of determining the data to be deleted in the first preset storage space, the UEFI firmware will select which data should be deleted according to a certain policy to make room for new data. The UEFI firmware will check the OPROM data with the longest storage time in the first preset storage space. These data may be the earliest loaded into the storage space and may be the least frequently used data. The UEFI firmware will analyze the usage frequency of the OPROM data of each device in the first preset storage space and select the OPROM data of the device with the lowest usage frequency as the data to be deleted. The UEFI firmware will compare the sizes of the various OPROM data in the first preset storage space and select the OPROM data with the smallest size or the smallest occupied space as the data to be deleted to save space. Through these steps, the UEFI firmware can determine which data is most suitable to be deleted to make room for new or more important data. This policy can ensure that the data in the first preset storage space is the latest, most frequently used, and will not waste space due to storing too much unnecessary data.

[0069] It can be understood that by deleting the OPROM data with the longest storage time, the lowest usage frequency or the smallest size, the UEFI firmware reduces the amount of data that needs to be loaded during the startup process, which can shorten the startup time because the system does not need to process and load unnecessary information. Deleting the no-longer-needed OPROM data helps to optimize the use of the storage space, which can ensure that the storage space only contains the information required during the current startup process, thereby reducing the data processing burden during startup. After deleting the old data, the memory areas that the UEFI firmware and the operating system need to access during startup are smaller, thus reducing the memory access time and improving the system response speed. In summary, by deleting the OPROM data with the longest storage time, the lowest usage frequency or the smallest size, the UEFI firmware can improve the computer startup efficiency, reduce the startup time, and optimize the system resource usage.

[0070] In an exemplary embodiment, the device management method further includes: partitioning a first preset storage space in the memory space of the baseboard management controller; configuring the baseboard management controller to be in a read-only mode for the first preset storage space, and configuring the host of the computer to be in a read-write mode for the first preset storage space.

[0071] In this embodiment, a part (H2B) is partitioned in the memory space of the BMC as the first preset storage space for caching the OPROM data of the PCIE device. This partitioning can be either static or dynamic, depending on the specific requirements and design of the system. The baseboard management controller is configured to be in read-only mode for the first preset storage space. The BMC is responsible for system management and monitoring, and its memory space may need to be configured in read-only mode to ensure data security and integrity. The read-only mode means that the firmware of the BMC can only read the data in the memory space, and cannot modify or delete these data. The host computer of the computer is configured to be in read-write mode for the first preset storage space. The computer host (UEFI firmware) needs to perform read and write operations on the first preset storage space in order to be able to load and update the OPROM data. The read-write mode allows the computer host to read and modify the data in the memory space to adapt to the situation of device addition, update, or removal.

[0072] When the system boots up next time, the UEFI firmware will skip the traditional step of reading the PCIE OPROM from the physical device and instead directly read the previously encapsulated data packet from the memory space of H2B. This change significantly shortens the UEFI boot self-check time, improves the system startup speed, and at the same time reduces the dependence on the hard disk or solid-state storage device, and reduces the wear caused by frequent reading and writing. With this configuration, the division of labor between the baseboard management controller and the computer host is more clearly defined, ensuring the stability and security of the system. The baseboard management controller is responsible for the secure storage of data, while the computer host is responsible for the loading and updating of data. This design can improve the performance of the system while protecting critical data from unauthorized modification.

[0073] In an exemplary embodiment, the device management method further includes: determining a communication interface on the baseboard management controller; establishing an interface mapping relationship between the communication interface and the first preset storage space.

[0074] In this embodiment, a communication interface is determined on the BMC for data transmission with the first preset storage space. The communication interface can be a hardware interface, such as a PCIE interface, a USB (Universal Serial Bus) interface, etc., or a software interface, such as a management module base interface (MMBI, Management Module Base Interface). An interface mapping relationship between the communication interface and the first preset storage space is established to ensure that data can be transmitted from the communication interface to the first preset storage space. The mapping relationship can be direct memory mapping or data transmission through a specific protocol or interface.

[0075] Regarding an efficient loading mechanism based on MMBI, MMBI, as an advanced interface for BMC memory mapping, optimizes system resource management and greatly improves the efficiency of PCIE device initialization. The MMBI interface allows the BMC to allocate a protected memory area to the Host Controller, implementing a one-way data transfer mode - Host to BMC (H2B), that is, the HostController can write data to this area, while the BMC only has read permission. This design fundamentally ensures the security of PCIE OPROM data, prevents unauthorized modification, and guarantees the stability and reliability of the system.

[0076] When the system boots up next time, the UEFI firmware will skip the traditional step of reading PCIE OPROM from the physical device and instead directly read the previously encapsulated data packet from the memory space of H2B. This change significantly shortens the time for the UEFI firmware to perform the power-on self-test, improves the system boot speed, reduces the dependence on the hard disk or solid-state storage device at the same time, and reduces the wear caused by frequent reading and writing. This process realizes the rapid transmission and storage of data, provides a basis for direct invocation during the subsequent boot process, and thus improves the system boot efficiency and performance.

[0077] In an exemplary embodiment, the process of obtaining the identification information corresponding to the device includes: sending a configuration read / write request to the configuration space of the device to obtain the vendor identification information and device identification information corresponding to the device; the identification information includes the vendor identification information and the device identification information.

[0078] It can be understood that during the computer startup process, the UEFI firmware needs to identify and initialize all hardware devices connected through the PCI Express (PCIE) interface. To complete this task, the UEFI firmware will send PCI configuration read / write requests to the configuration space of the target PCIE device to read the important information of the device.

[0079] Specifically, the UEFI firmware reads the Vendor ID and Device ID fields in the configuration space of the PCIe device. These fields are located at specific positions in the configuration space, usually the first 8 bytes. The configuration space is a memory-mapped storage area located in the physical address space of the device. Among them, the PCI configuration space: PCI devices (such as graphics cards, network cards, etc.) all contain a PCI configuration space, which is a memory-mapped storage area located in the physical address space of the device. The configuration space contains important information about the device, such as the Vendor ID, Device ID, command and status registers, etc.; the Vendor ID is a unique identifier assigned by the PCI vendor consortium to the device manufacturer; the DeviceID is a unique identifier assigned by the device manufacturer to a specific model of the device. These two fields together constitute the unique identification of the device.

[0080] During the startup process, the UEFI firmware accesses the configuration space of the target PCIe device through PCI configuration space read and write requests. The UEFI firmware first reads the Vendor ID and Device ID fields of the device to determine the manufacturer and model of the device. These information are used to further identify the device and load the appropriate driver for the device. By reading the Vendor ID and Device ID fields, the UEFI firmware can accurately identify each device connected to the PCIe bus. Once the device is identified, the UEFI firmware can load the corresponding driver and perform the necessary initialization steps to ensure that the device can work properly.

[0081] In this way, the UEFI firmware can manage the PCIe device and provide the necessary hardware support for the loading and running of the operating system.

[0082] In an exemplary embodiment, the process of loading the option read-only memory data of the device from a preset physical storage device includes: reading the value of the target register of the device; the target register is used to indicate the physical address of the option read-only memory data of the device in the preset physical storage device; determining the physical address of the device in the preset physical storage device based on the value of the target register; loading the option read-only memory data of the device according to the physical address.

[0083] In this embodiment, the UEFI firmware reads the value of the target register of the PCIE device. This register is typically used to indicate the physical address of the device's OPROM data in a preset physical storage device (such as the device's ROM). Based on the value of the target register, the UEFI firmware determines the physical address of the device in the preset physical storage device, which refers to the specific location of the OPROM data in the device ROM. The UEFI firmware loads the OPROM data of the device according to the determined physical address, and the loaded OPROM data can be executed by the UEFI firmware to initialize and configure the device.

[0084] In an exemplary embodiment, the process of writing the option read-only memory data of the device into the first preset storage space includes: calculating the checksum of the option read-only memory data of the device; encapsulating the checksum, the option read-only memory data of the device, and the identification information to obtain a data packet; and writing the data packet into the first preset storage space.

[0085] In this embodiment, the UEFI firmware calculates the checksum of the OPROM data. Specifically, it can be a CRC checksum. The CRC checksum is an error detection code used to ensure the integrity and correctness of the data. The calculated CRC checksum is compared with the CRC checksum stored in the OPROM data. If the two match, it indicates that the OPROM data has not been corrupted during transmission and can be safely used.

[0086] The calculated checksum, the OPROM data, and the identification information of the device are encapsulated to form a data packet. The encapsulated data packet contains the checksum, the OPROM data, and the device identification information. These information together constitute a complete data unit. The UEFI firmware writes the encapsulated data packet into the first preset storage space.

[0087] In this way, the UEFI firmware can safely write the OPROM data into the first preset storage space and verify the integrity and correctness of the data by calculating and comparing the CRC checksum. This helps to ensure the data security during the system startup process and the correct configuration of the device.

[0088] In an exemplary embodiment, the device management method further includes: partitioning a second preset storage space in the memory space of the baseboard management controller; configuring the host of the computer to be in read-only mode for the second preset storage space, and configuring the baseboard management controller to be in read-write mode for the second preset storage space, so that the baseboard management controller can obtain the data packet to be updated in the second preset storage space, determine the data packet to be processed in the first preset storage space, and use the data packet to be updated to replace the data packet to be processed.

[0089] In a computer system, the Baseboard Management Controller (BMC) is an independent management unit that is responsible for monitoring and controlling server hardware, including management operations during the startup process. To improve the user experience and the flexibility of system management, the BMC can provide an innovative out-of-band OPROM update method, enabling users to update and replace the OPROM without directly intervening in the system startup process.

[0090] In this out-of-band update mechanism, the user first needs to pre-place the OPROM loader or update package in the BMC's B2H (BMC-To-Host) memory space. The B2H memory space is specifically designed by the BMC for data exchange with the host system, allowing the BMC to transfer important data or instructions to the host without affecting the normal operation of the system. The host system can only read this memory space and cannot modify it.

[0091] The user or system administrator places the OPROM loader or update package in the BMC's B2H memory space (the second preset storage space). These data packets contain OPROM update instructions or codes for updating the firmware of the device. During the startup process, the BMC reads the OPROM update package from the B2H memory space and executes these update instructions or codes to update the OPROM data of the device. The host (such as UEFI firmware) reads the OPROM update information from the BMC's B2H memory space during the startup process and updates the OPROM data of the PCIE device based on this information.

[0092] In an exemplary embodiment, the device management method further includes: in response to detecting a device firmware update request, reading the data packet to be updated stored in the second preset storage space; updating the data packet to be updated to the first preset storage space for loading the option read-only memory data in the data packet to be updated.

[0093] In this embodiment, when the host detects a device firmware update request, such as an OPROM update package pre - set in the B2H memory space of the BMC. The UEFI firmware reads the data packets to be updated stored in the second preset storage space, and these data packets contain the update instructions or codes of the OPROM. The UEFI firmware updates the read data packets to be updated to the first preset storage space. The first preset storage space is usually an area in the system memory dedicated to storing OPROM data. The BMC reads the OPROM update package from the B2H memory space and temporarily stores it in the internal cache. The BMC checks and confirms the old version of OPROM data in the H2B memory space for subsequent update and replacement operations. The BMC copies the new OPROM data from the cache to the H2B memory space, overwriting the original old version of the data. During this process, the BMC ensures the consistency and integrity of the data, avoiding system instability or startup failure caused by data transmission errors. After completing the update and replacement of the OPROM data, the BMC sends a signal indicating the update is complete to the UEFI self - test process. During the subsequent startup process, the BIOS loads the new OPROM data from the H2B memory space according to the update information provided by the BMC. The new OPROM data is applied to the corresponding PCIE device to ensure that the device driver is the latest.

[0094] In this way, users can achieve real - time out - of - band updates of the PCIE device OPROM without interrupting the normal operation of the system. This out - of - band update method not only improves the convenience and flexibility of system maintenance but also reduces the risks and inconveniences that may be brought by directly intervening in the system startup process. At the same time, it also reflects the important role and potential of the BMC in computer system management.

[0095] In summary, referring to Figure 2, the present invention first deeply analyzes the bottleneck of the PCIE OPROM access mechanism in the traditional system, that is, a large amount of data needs to be read from the physical device each time the system starts. This process not only takes a long time but also increases the uncertainty during the system startup process. To address this issue, the present invention creatively proposes an intelligent caching and prediction strategy, which efficiently encapsulates and stores the first-read PCIE OPROM data in a secure and reliable memory area. During subsequent startup processes, the system can directly obtain the required data from this memory area quickly without accessing the physical device again, thereby significantly reducing the number of accesses and greatly shortening the loading time. This not only greatly improves the system startup efficiency but also brings many practical benefits to users. Firstly, users can enjoy a faster and smoother boot experience, and there will be no problem of slow user experience or slow server service go-live due to the long time for loading the OPROM. Secondly, since the number of accesses to the physical device is reduced, the present invention also helps to reduce the energy consumption and wear during the system startup process and extends the service life of the hardware. In addition, this solution also enhances the overall stability and reliability of the system and reduces errors and faults that may be caused by frequent access to the physical device. Considering the firmware of the PCIE external device itself, if the user modifies the OPROM and the system crashes abnormally after restart, the UEFI firmware can then load the normal PCIE OPROM driver program from the MMBI space, thus avoiding system anomalies.

[0096] In a second aspect, please refer to Figure 3 , the present invention also provides a device management system, including:

[0097] A first acquisition module 11, configured to obtain the identification information corresponding to the device when a device connected to the target communication bus is recognized during the computer startup process; a matching module 12, configured to perform matching based on the identification information and the information stored in the first preset storage space; the access speed of the first preset storage space is greater than or equal to the memory access speed of the preset physical storage device corresponding to the device; a first loading module 13, configured to load the option read-only memory data of the device from the first preset storage space in response to a successful match for device management; a second loading module 14, configured to load the option read-only memory data of the device from the preset physical storage device in response to a failed match for device management and write the option read-only memory data of the device into the first preset storage space.

[0098] It can be seen that in this embodiment, during the computer startup process, each device connected to the target communication bus is identified, and its corresponding identification information is obtained, and a matching search is performed in the first preset storage space. The first preset storage space is a memory area with fast access speed, and its access speed is greater than the memory access speed of the preset physical storage device corresponding to the device. If the match is successful, the option read-only memory data of the device is directly loaded from the first preset storage space, thereby reducing the time for loading data from the physical storage device during each startup. If the match fails, the option read-only memory data of the device is loaded from the preset physical storage device for device management. At the same time, the loaded data is written into the first preset storage space for direct loading from the first preset storage space during the next startup. The loading process of the option read-only memory data during startup is optimized, reducing the startup time. Especially in a system configured with multiple PCIE devices, the startup efficiency of the system and the user experience are improved.

[0099] In an exemplary embodiment, the process of loading the option read-only memory data of the device from the preset physical storage device includes: in response to the preset physical storage device meeting the direct access condition, directly loading the option read-only memory data of the device from the preset physical storage device; in response to the preset physical storage device not meeting the direct access condition, creating a memory area that meets the direct access condition, copying the option read-only memory data of the device from the preset physical storage device to the memory area for loading the option read-only memory data in the memory area, and creating a device access path for the loaded option read-only memory data.

[0100] In an exemplary embodiment, the device management system further includes: a recording module for recording information of the loaded devices; an information generation module for generating a current record table based on the information of all the devices recorded in the current time; a management module for judging whether there are deleted devices according to the comparison result between the current record table and the previous record table. If so, deleting the option read-only memory data of the deleted devices from the first preset storage space.

[0101] In an exemplary embodiment, the device management system further includes: a first determination module for determining the reference memory space capacity based on the devices recognized during the first startup of the computer when the device is present; dividing the first preset storage space according to the reference memory space capacity.

[0102] In an exemplary embodiment, the device management system further includes: a second determination module for determining the reserved space capacity; the process of dividing the first preset storage space according to the reference memory space capacity includes: dividing the first preset storage space according to the reserved space capacity and the reference memory space capacity.

[0103] In an exemplary embodiment, the device management system further includes: a third determination module, configured to determine a target memory space capacity based on the devices recognized when the computer is not started for the first time; when the target memory space capacity is greater than the reference memory space capacity, re-partition the first preset storage space according to the target memory space capacity.

[0104] In an exemplary embodiment, the process of writing the option read-only memory data of the device into the first preset storage space includes: in response to the first preset storage space satisfying the first writing condition, writing the option read-only memory data of the device into the first preset storage space; in response to the first preset storage space not satisfying the first writing condition, determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition.

[0105] In an exemplary embodiment, the process of determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition includes: in response to the first preset storage space not satisfying the first writing condition and the option read-only memory data of the device not satisfying the second writing condition, not writing the option read-only memory data of the device into the first preset storage space; in response to the first preset storage space not satisfying the first writing condition and the option read-only memory data of the device satisfying the second writing condition, determining the data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition.

[0106] In an exemplary embodiment, the process of determining the data to be deleted in the first preset storage space includes: determining the option read-only memory data with the longest storage time in the first preset storage space as the data to be deleted; and / or, determining the option read-only memory data of the device with the lowest usage frequency in the first preset storage space as the data to be deleted; and / or, determining the smallest option read-only memory data in the first preset storage space as the data to be deleted.

[0107] In an exemplary embodiment, the device management system further includes: a first partitioning module, configured to partition a first preset storage space in the memory space of the baseboard management controller; a first configuration module, configured to configure the baseboard management controller to be in a read-only mode for the first preset storage space, and configure the host of the computer to be in a read-write mode for the first preset storage space.

[0108] In an exemplary embodiment, the device management system further includes: a fourth determination module, configured to determine a communication interface on the baseboard management controller; establish an interface mapping relationship between the communication interface and the first preset storage space.

[0109] In an exemplary embodiment, the process of obtaining the identification information corresponding to a device includes: sending a configuration read / write request to the configuration space of the device to obtain the vendor identification information and the device identification information corresponding to the device; the identification information includes the vendor identification information and the device identification information.

[0110] In an exemplary embodiment, the process of loading the option read-only memory data of a device from a preset physical storage device includes: reading the value of the target register of the device; the target register is used to indicate the physical address of the option read-only memory data of the device in the preset physical storage device; determining the physical address of the device in the preset physical storage device based on the value of the target register; and loading the option read-only memory data of the device according to the physical address.

[0111] In an exemplary embodiment, the process of writing the option read-only memory data of a device into a first preset storage space includes: calculating the check code of the option read-only memory data of the device; encapsulating the check code, the option read-only memory data of the device, and the identification information to obtain a data packet; and writing the data packet into the first preset storage space.

[0112] In an exemplary embodiment, the device management system further includes: a reading module, configured to read a data packet to be updated stored in a second preset storage space in response to detecting a device firmware update request; and an updating module, configured to update the data packet to be updated to the first preset storage space so as to load the option read-only memory data in the data packet to be updated.

[0113] In an exemplary embodiment, the device management system further includes: a second partitioning module, configured to partition a second preset storage space in the memory space of the baseboard management controller; and a second configuration module, configured to configure the host of the computer to be in a read-only mode for the second preset storage space, and configure the baseboard management controller to be in a read / write mode for the second preset storage space, so that the baseboard management controller can obtain the data packet to be updated in the second preset storage space, determine the data packet to be processed in the first preset storage space, and replace the data packet to be processed with the data packet to be updated.

[0114] In a third aspect, the present invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the device management method described in any one of the above are implemented.

[0115] For the introduction of a computer program product provided by the present invention, please refer to the above embodiments, and the present invention will not be elaborated herein.

[0116] A computer program product provided by the present invention has the same beneficial effects as the above device management method.

[0117] In a fourth aspect, please refer to Figure 4, the present invention also provides an electronic device, including: a memory 21 for storing a computer program; a processor 22 for implementing the steps of the device management method described in any one of the above when executing the computer program.

[0118] The electronic device further includes: an input interface 23 connected to the processor 22 via a communication bus 26, for obtaining externally imported computer programs, parameters, and instructions, and storing them in the memory 21 under the control of the processor 22. The input interface can be connected to an input device to receive parameters or instructions manually input by the user. The input device can be a touch layer covering the display screen, or a button, trackball, or touchpad provided on the terminal housing. A display unit 24 connected to the processor 22 via a communication bus 26, for displaying data sent by the processor 22. The display unit can be a liquid crystal display screen or an electronic ink display screen, etc. A network port 25 connected to the processor 22 via a communication bus 26, for communicating and connecting with external terminal devices. The communication technology used for this communication connection can be a wired communication technology or a wireless communication technology, such as Mobile High-Definition Link technology, Universal Serial Bus, High-Definition Multimedia Interface, Wi-Fi technology, Bluetooth communication technology, Low Energy Bluetooth communication technology, communication technology based on IEEE802.11s, etc.

[0119] For the introduction of an electronic device provided by the present invention, please refer to the above embodiments, and the present invention will not be elaborated herein.

[0120] An electronic device provided by the present invention has the same beneficial effects as the above device management method.

[0121] In the fifth aspect, please refer to Figure 5 , the present invention also provides a computer-readable storage medium 30, on which a computer program 31 is stored, and when the computer program 31 is executed by a processor, it implements the steps of the device management method described in any one of the above.

[0122] The computer-readable storage medium 30 can include: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disc.

[0123] For the introduction of a computer-readable storage medium provided by the present invention, please refer to the above embodiments, and the present invention will not be elaborated herein.

[0124] A computer-readable storage medium provided by the present invention has the same beneficial effects as the above device management method.

[0125] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0126] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A device management method, characterized in that, Including: During the computer startup process, when a device connected to the target communication bus is recognized, obtain the identification information corresponding to the device; Match the identification information with the information stored in the first preset storage space; the access speed of the first preset storage space is greater than or equal to the memory access speed of the preset physical storage device corresponding to the device; In response to a successful match, load the option read-only memory data of the device from the first preset storage space to manage the device, so as to reduce the time for the computer to load data from the preset physical storage device each time it starts up; In response to a failed match, load the option read-only memory data of the device from the preset physical storage device to manage the device, and write the option read-only memory data of the device into the first preset storage space.

2. The device management method according to claim 1, wherein The process of loading the option read-only memory data of the device from the preset physical storage device includes: In response to the preset physical storage device meeting the direct access condition, directly load the option read-only memory data of the device from the preset physical storage device; In response to the preset physical storage device not meeting the direct access condition, create a memory area that meets the direct access condition, copy the option read-only memory data of the device from the preset physical storage device to the memory area, so as to load the option read-only memory data in the memory area, and create a device access path for the loaded option read-only memory data.

3. The device management method according to claim 1, wherein After loading the option read-only memory data of the device from the first preset storage space, the device management method further includes: Record the information of the loaded device; Generate a current record table based on the information of all the devices recorded in the current time; According to the comparison result between the current record table and the previous record table, determine whether there is a deleted device; If so, delete the option read-only memory data of the deleted device from the first preset storage space.

4. The device management method according to claim 1, wherein Before matching the identification information with the information stored in the first preset storage space, the device management method further includes: Based on the device recognized when the computer first starts up when the device is present, determine the reference memory space capacity; Divide the first preset storage space according to the reference memory space capacity.

5. The device management method according to claim 4, wherein After determining the reference memory space capacity, the device management method further includes: Determine the reserved space capacity; The process of dividing the first preset storage space according to the reference memory space capacity includes: Divide the first preset storage space according to the reserved space capacity and the reference memory space capacity.

6. The device management method according to claim 4, wherein The device management method further includes: Based on the device recognized when the computer starts up non-first time, determine the target memory space capacity; When the target memory space capacity is greater than the reference memory space capacity, re-divide the first preset storage space according to the target memory space capacity.

7. The device management method according to claim 4, characterized in that The process of writing the option read-only memory data of the device into the first preset storage space includes: In response to the first preset storage space satisfying the first writing condition, write the option read-only memory data of the device into the first preset storage space; In response to the first preset storage space not satisfying the first writing condition, determine the data to be deleted in the first preset storage space, and delete the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition.

8. The device management method according to claim 7, wherein The process of determining the data to be deleted in the first preset storage space and deleting the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition in response to the first preset storage space not satisfying the first writing condition includes: In response to the first preset storage space not satisfying the first writing condition and the option read-only memory data of the device not satisfying the second writing condition, do not write the option read-only memory data of the device into the first preset storage space; In response to the first preset storage space not satisfying the first writing condition and the option read-only memory data of the device satisfying the second writing condition, determine the data to be deleted in the first preset storage space, and delete the data to be deleted from the first preset storage space so that the first preset storage space satisfies the first writing condition.

9. The device management method according to claim 7, characterized in that, The process of determining the data to be deleted in the first preset storage space includes: Determine the option read-only memory data with the longest storage time in the first preset storage space as the data to be deleted; and / or, Determine the option read-only memory data of the device with the lowest usage frequency in the first preset storage space as the data to be deleted; and / or, Determine the smallest option read-only memory data in the first preset storage space as the data to be deleted.

10. The device management method according to claim 1, characterized in that, The device management method further includes: Partition the first preset storage space in the memory space of the baseboard management controller; Configure the baseboard management controller to be in read-only mode for the first preset storage space, and configure the host of the computer to be in read-write mode for the first preset storage space.

11. The device management method according to claim 10, characterized in that The device management method further includes: Determine a communication interface on the baseboard management controller; Establish an interface mapping relationship between the communication interface and the first preset storage space.

12. The device management method according to claim 1, characterized in that, The process of obtaining the identification information corresponding to the device includes: Send a configuration read-write request to the configuration space of the device to obtain the supplier identification information and device identification information corresponding to the device; the identification information includes the supplier identification information and the device identification information.

13. The device management method according to claim 1, wherein, The process of loading the option read-only memory data of the device from the preset physical storage device includes: Read the value of the target register of the device; the target register is used to indicate the physical address of the option read-only memory data of the device in the preset physical storage device; Determine the physical address of the device in the preset physical storage device based on the value of the target register; Load the option read-only memory data of the device according to the physical address.

14. The device management method according to claim 1, characterized in that, The process of writing the option read-only memory data of the device into the first preset storage space includes: Calculate the check code of the option read-only memory data of the device; Encapsulate the check code, the option read-only memory data of the device, and the identification information to obtain a data packet; Write the data packet into the first preset storage space.

15. The device management method according to any one of claims 1-14, characterized in that, The device management method further includes: In response to detecting a device firmware update request, read the data packet to be updated stored in the second preset storage space; Update the data packet to be updated to the first preset storage space so as to load the option read-only memory data in the data packet to be updated.

16. The device management method according to claim 15, wherein The device management method further includes: Divide the second preset storage space in the memory space of the baseboard management controller; Configure the host of the computer to be in read-only mode for the second preset storage space, and configure the baseboard management controller to be in read-write mode for the second preset storage space, so that the baseboard management controller can obtain the data packet to be updated in the second preset storage space, determine the data packet to be processed in the first preset storage space, and use the data packet to be updated to replace the data packet to be processed.

17. A device management system, characterized in that, It includes: A first acquisition module, configured to, during the startup process of the computer, when identifying a device connected to the target communication bus, acquire the identification information corresponding to the device; A matching module, configured to match based on the identification information and the information stored in the first preset storage space; the access speed of the first preset storage space is greater than or equal to the memory access speed of the preset physical storage device corresponding to the device; A first loading module, configured to, in response to a successful match, load the option read-only memory data of the device from the first preset storage space to manage the device, so as to reduce the time for the computer to load data from the preset physical storage device each time it starts up; A second loading module, configured to, in response to a failed match, load the option read-only memory data of the device from the preset physical storage device to manage the device, and write the option read-only memory data of the device into the first preset storage space.

18. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by a processor, the steps of the device management method according to any one of claims 1-16 are implemented.

19. An electronic device, characterized in that, It includes: A memory, configured to store a computer program; A processor, configured to implement the steps of the device management method according to any one of claims 1-16 when executing the computer program.

20. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the device management method according to any one of claims 1-16 are implemented.

Citation Information

Patent Citations

  • Method, system and device for loading network card option ROM (Read Only Memory)

    CN115269022A

  • Server starting operation method and device, server and storage medium

    CN117369891A