Device management method and system, electronic device, and readable storage medium
By identifying device identification information during computer startup and loading OPROM data into the fast storage space, the cumbersome problem of loading UEFIOPROM every time during PCIe bus scanning is solved, improving system startup efficiency and user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2025-11-21
- Publication Date
- 2026-06-04
AI Technical Summary
During the computer startup process, during the PCIe bus scan, the UEFIOPROM of all PCIe devices needs to be reloaded every time the computer starts up, which makes the startup process cumbersome and time-consuming, especially in systems with multiple PCIe devices.
During the computer startup process, the device connected to the target communication bus is identified, the device identification information is obtained, and a match is performed in the first preset storage space. If the match is successful, OPROM data is loaded from the first preset storage space with fast access. If the match fails, the data is loaded from the preset physical storage device and written to the first preset storage space to optimize the startup process.
It reduces the time spent loading data from physical storage devices at each startup, improving system startup efficiency and user experience, especially in systems with multiple PCIe devices.
Smart Images

Figure CN2025136770_04062026_PF_FP_ABST
Abstract
Description
A device management method, system, electronic device, and readable storage medium
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202411721771.X, filed on November 28, 2024, entitled “A device management method, system, electronic device and readable storage medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of servers, and in particular to a device management method, system, electronic device, and non-volatile readable storage medium. Background Technology
[0004] During computer startup, PCIe (Peripheral Component Interconnect Express) bus scanning is a crucial step, ensuring that all high-performance hardware devices connected via the PCIe interface are accurately identified and successfully initialized by the system. When the computer boots, the UEFI (Unified Extensible Firmware Interface) firmware performs a PCIe bus scan to identify each PCIe device connected to the bus and its associated UEFIOPROM (Option ROM). The OPROM is loaded into memory as a driver so that the UEFI firmware can manage the PCIe devices. However, since the UEFIOPROM of all PCIe devices needs to be reloaded every time the computer boots, this process is cumbersome and time-consuming. This repetitive loading process significantly increases boot time, especially in systems with multiple PCIe devices. Summary of the Invention
[0005] The purpose of this application is to provide a device management method, system, electronic device, and non-volatile readable storage medium that can optimize the loading process of option read-only memory data during the startup process, reduce startup time, and improve system startup efficiency and user experience.
[0006] To address the aforementioned technical problems, this application provides a device management method, comprising: during computer startup, when a device connected to a target communication bus is identified, obtaining identification information corresponding to the device; matching the identification information with information stored in a first preset storage space; the access speed of the first preset storage space being greater than or equal to the memory access speed of a preset physical storage device corresponding to the device; in response to a successful match, loading the device's option read-only memory data from the first preset storage space for device management; in response to a failed match, loading the device's option read-only memory data from the preset physical storage device for device management, and writing the device's option read-only memory data into the first preset storage space.
[0007] The process of loading the device's option read-only memory data from the preset physical storage device includes: in response to the preset physical storage device meeting the direct access conditions, directly loading the device's option read-only memory data from the preset physical storage device; in response to the preset physical storage device not meeting the direct access conditions, creating a memory region that meets the direct access conditions, copying the device's option read-only memory data from the preset physical storage device to the memory region, so as to load the option read-only memory data in the memory region, and creating a device access path for the loaded option read-only memory data.
[0008] The device management method further includes, after loading the device option read-only memory data from the first preset storage space, the 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 record; determining whether there is a deleted device based on the comparison result between the current record table and the previous record table; and deleting the option read-only memory data of the deleted device from the first preset storage space if there is a deleted device.
[0009] Before matching the identification information with the information stored in the first preset storage space, the device management method further includes: determining the reference memory space capacity based on the device identified when the computer first starts up when the device is in place; and dividing the first preset storage space according to the reference memory space capacity.
[0010] The device management method, after determining the reference memory space capacity, also includes: 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.
[0011] The device management method further includes: determining the target memory space capacity based on the devices identified 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-dividing the first preset storage space according to the target memory space capacity.
[0012] The process of writing the device's option read-only memory data into the first preset storage space includes: in response to the first preset storage space meeting the first write condition, writing the device's option read-only memory data into the first preset storage space; in response to the first preset storage space not meeting the first write 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 write condition.
[0013] The process of determining the data to be deleted in the first preset storage space in response to the first preset storage space not meeting the first write condition, and deleting the data to be deleted from the first preset storage space to make the first preset storage space meet the first write condition includes: in response to the first preset storage space not meeting the first write condition and the device's option read-only memory data not meeting the second write condition, not writing the device's option read-only memory data into the first preset storage space; and in response to the first preset storage space not meeting the first write condition and the device's option read-only memory data meeting the second write 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 to make the first preset storage space meet the first write condition.
[0014] 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 option read-only memory data with the smallest usage time in the first preset storage space as the data to be deleted.
[0015] The device management method further includes: allocating a first preset storage space in the memory space of the baseboard management controller; configuring the baseboard management controller to read-only mode for the first preset storage space; and configuring the host computer to read-write mode for the first preset storage space.
[0016] The device management method further includes: determining the communication interface on the baseboard management controller; and establishing an interface mapping relationship between the communication interface and the first preset storage space.
[0017] The process of obtaining the identification information corresponding to the device includes: sending a configuration read / write request to the device's configuration space to obtain the supplier identification information and device identification information corresponding to the device; the identification information includes supplier identification information and device identification information.
[0018] The process of loading the device's optional read-only memory data from the preset physical storage device includes: reading the value of the device's target register; the target register being used to indicate the physical address of the device's optional read-only memory data 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 device's optional read-only memory data according to the physical address.
[0019] The process of writing the device's option read-only memory data into the first preset storage space includes: calculating the check code of the device's option read-only memory data; encapsulating the check code, the device's option read-only memory data, and the identification information to obtain a data packet; and writing the data packet into the first preset storage space.
[0020] 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 in order to load the option read-only memory data in the data packet to be updated.
[0021] The device management method further includes: dividing a second preset storage space in the memory space of the baseboard management controller; configuring the host computer to read-only mode for the second preset storage space, and configuring the baseboard management controller to 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.
[0022] To address the aforementioned technical problems, this application also provides a device management system, comprising: a first acquisition module, used to acquire identification information corresponding to a device when a device connected to a target communication bus is identified during computer startup; a matching module, used to match the identification information with information stored in a first preset storage space; wherein 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, used to load the device's option read-only memory data from the first preset storage space in response to a successful match, for managing the device; and a second loading module, used to load the device's option read-only memory data from a preset physical storage device in response to a failed match, for managing the device, and write the device's option read-only memory data into the first preset storage space.
[0023] To address the aforementioned technical problems, this application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the device management methods described above.
[0024] To address the aforementioned technical problems, this application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the device management methods described above.
[0025] To address the aforementioned technical problems, this application also provides a computer non-volatile readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the device management methods described above.
[0026] This application provides a device management method. During computer startup, each device connected to a target communication bus is identified, and its corresponding identification information is obtained. A matching search is then performed in a first preset storage space, which is a fast-access memory area with an access speed greater than the memory access speed of the corresponding preset physical storage device. If a match is successful, the device's option read-only memory data is directly loaded from the first preset storage space, thereby reducing the time spent loading data from the physical storage device at each startup. If a match fails, the device's option read-only memory data is loaded from the preset physical storage device for device management. Simultaneously, the loaded data is written to the first preset storage space so that it can be directly loaded from the first preset storage space at the next startup. This optimizes the loading process of option read-only memory data during startup, reducing startup time, especially in systems configured with multiple PCIe devices, thus improving system startup efficiency and user experience.
[0027] This application also provides a device management system, electronic device, and computer non-volatile readable storage medium, which has the same beneficial effects as the above-described device management method. Attached Figure Description
[0028] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 is a flowchart of the steps of an equipment management method provided in this application.
[0030] Figure 2 is a flowchart of another equipment management method provided in this application.
[0031] Figure 3 is a schematic diagram of the structure of an equipment management system provided in this application.
[0032] Figure 4 is a schematic diagram of the structure of an electronic device provided in this application.
[0033] Figure 5 is a schematic diagram of the structure of a computer non-volatile readable storage medium provided in this application. Detailed Implementation
[0034] The core of this application is to provide a device management method, system, electronic device, and non-volatile readable storage medium that can optimize the loading process of option read-only memory data during startup, reduce startup time, and improve system startup efficiency and user experience.
[0035] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0036] In one aspect, this application provides a device management method, as shown in Figure 1.
[0037] S101: During the computer startup process, when a device connected to the target communication bus is identified, the identification information corresponding to the device is obtained.
[0038] In this embodiment, the computer boot process refers to each boot process of the computer, and this embodiment only uses one boot process as an example for explanation. When the computer boots up, the UEFI firmware running on its hardware scans all target communication buses, including but not limited to the PCIe bus. For the PCIe bus, the UEFI firmware identifies each PCIe device connected to the PCIe bus. Specifically, the UEFI firmware scans the PCIe bus to identify each PCIe device connected to it. After identifying the device, the UEFI firmware reads the identification information from the configuration space of each device. This identification information is the device's unique identifier, including but not limited to vendor ID, device ID, etc., which facilitates subsequent device matching based on this identification information. In this way, the UEFI firmware can efficiently identify and manage PCIe devices, reducing boot time, especially in systems with multiple PCIe devices configured. This improves system boot efficiency and user experience.
[0039] 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.
[0040] It is understandable that during the computer boot process, the UEFI firmware uses the device's identification information for matching in the first preset storage space. The first preset storage space is an area specifically allocated for storing OPROM data, and its access speed is faster than that of the device's physical storage device. The first preset storage space includes, but is not limited to, a segment of memory space allocated from the BMC's memory space, or a segment of memory space allocated from system memory (such as RAM (Random Access Memory)), etc., to facilitate access by the host's BIOS (Basic Input / Output System).
[0041] In this embodiment, a device identified by the UEFI firmware is used as an example. Based on the device's identification information, a match is made in the first preset storage space to determine if the device's identification information exists there. If it does, the match is considered successful; otherwise, the match is considered unsuccessful. By matching the device's identification information with the first preset storage space, the UEFI firmware can reduce the number of accesses to the device's physical storage, thereby improving boot efficiency. This optimization can significantly reduce boot time, especially in systems with multiple PCIe devices.
[0042] S103: In response to a successful match, load the device's option read-only memory data from the first preset storage space to manage the device.
[0043] In this embodiment, if the first preset storage space includes the device's identification information, the match is successful, and the device's OPROM data is directly loaded from the first preset storage space. The OPROM data contains the device's initialization code and driver programs, which are executed before the operating system loads to ensure that the device can be correctly identified and configured when the operating system starts. Since the access speed of the first preset storage space is much faster than that of the device's physical storage device, the UEFI firmware can quickly load and execute the OPROM data, while avoiding the UEFI firmware reading data from the device's physical storage device (such as ROM (Read-Only Memory)) every time it boots, significantly reducing boot time.
[0044] S104: In response to a matching failure, load the device's option read-only memory data from a preset physical storage device to manage the device, and write the device's option read-only memory data into a first preset storage space.
[0045] In this embodiment, if the device's identification information is not included in the first preset storage space, the matching fails. In this case, the UEFI firmware loads the device's OPROM data from the preset physical storage device and writes it into the first preset storage space. This way, during subsequent boot processes, the UEFI firmware can directly load the OPROM data from the first preset storage space instead of reading it from the device's ROM each time. Therefore, in this embodiment, during computer boot, each device connected to the target communication bus is identified, and its corresponding identification information is obtained. A matching search is then performed in the first preset storage space, which is a fast-access memory area with an access speed greater than the memory access speed of the device's corresponding preset physical storage device. If the matching is successful, the device's option read-only memory data is directly loaded from the first preset storage space, thereby reducing the time spent loading data from the physical storage device each time boot. If the matching fails, the device's option read-only memory data is loaded from the preset physical storage device for device management. Simultaneously, the loaded data is written to the first preset storage space so that it can be directly loaded from the first preset storage space during the next boot. The process of loading option read-only memory data during startup has been optimized, reducing startup time, especially in systems with multiple PCIe devices, thus improving system startup efficiency and user experience.
[0046] In one exemplary embodiment, the process of loading device option read-only memory data from a preset physical storage device includes: loading device option read-only memory data directly from the preset physical storage device in response to the preset physical storage device meeting direct access conditions; and creating a memory region that meets direct access conditions in response to the preset physical storage device not meeting direct access conditions, copying device option read-only memory data from the preset physical storage device to the memory region so as to load option read-only memory data in the memory region, and creating a device access path for the loaded option read-only memory data.
[0047] In this embodiment, the process of loading the device's option read-only memory data from the preset physical storage device can be divided into two cases, depending on whether the preset physical storage device meets the direct access conditions. 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 conditions; 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 conditions. If the direct access conditions are met, the UEFI firmware directly loads the device's option read-only memory data from the preset physical storage device, avoiding the data copying process and thus improving boot efficiency. If the UEFI firmware cannot access the address of the preset physical storage device, then it cannot directly load the OPROM data from the device. In this case, the computer host will create a new memory region that meets the direct access conditions. The host copies the device's OPROM data from the preset physical storage device to this new memory region. After the copying is complete, 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 in the future. This flexibility allows the system to adapt to the storage characteristics of different devices.
[0048] In this way, UEFI firmware can select the appropriate loading method to manage OPROM data based on whether the preset physical storage device meets the direct access conditions. This avoids the need to reload OPROM data at each boot, reducing the complexity of the system boot process and making it more stable and reliable. This method allows UEFI firmware to support various storage devices, including those with slower access speeds, thereby improving system compatibility and scalability. By copying OPROM data in memory, unauthorized access or modification can be prevented, enhancing system security.
[0049] In summary, this method of managing OPROM data based on whether the preset physical storage device meets the direct access conditions not only improves boot efficiency but also enhances the system's flexibility, resource utilization efficiency, compatibility, and security.
[0050] In an exemplary embodiment, after loading the device option read-only memory data 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 devices currently recorded; determining whether there is a deleted device based on the comparison result between the current record table and the previous record table; and if there is a deleted device, deleting the option read-only memory data of the deleted device from the first preset storage space.
[0051] In this embodiment, after loading the device's option ROM data from the first preset storage space, the host records the information of the devices whose option ROM data was 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 collection used to store and manage detailed device information. The current record table is compared with the previous record table (if any), and the comparison result is used to determine whether there are any deleted devices. If the comparison result shows that there are deleted devices, the OPROM data of these devices is 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 about devices that are no longer in use, ensuring that unnecessary storage space is not occupied, improving system efficiency and performance, especially in scenarios involving a large number of devices or frequent changes in device configuration.
[0052] 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 the capacity of a reference memory space based on the device identified when the computer first starts up when the device is in place; and dividing the first preset storage space according to the capacity of the reference memory space.
[0053] When a computer boots for the first time with devices in place, the UEFI firmware identifies all devices connected to the PCIe bus. Based on these devices, the UEFI firmware calculates the sum of the OPROM data for all devices, using this sum as a reference memory space capacity. According to the calculated reference memory space capacity, the UEFI firmware allocates a block of memory as the first preset storage space. This allocation process may involve UEFI firmware configuration to ensure that the size of the first preset storage space matches the reference memory space capacity.
[0054] 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, so as to ensure that the UEFI OPROM data of all devices can be effectively cached and the boot process can be optimized.
[0055] In an exemplary embodiment, after determining the reference memory space capacity, the device management method further includes: 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.
[0056] In this embodiment, after calculating the reference memory space capacity, a reserved space capacity is also determined. The reserved space capacity is to reserve a certain amount of extra space to accommodate possible expansions or future versions of OPROM data. The first preset storage space is divided according to the reserved space capacity and the reference memory space capacity. This means that the size of the first preset storage space will be the reference memory space capacity plus the reserved space capacity. The inclusion of the reserved space capacity ensures that the first preset storage space can still meet the needs when new devices are added or when some devices are removed.
[0057] In this way, the size of the initial preset storage space can be ensured to match the estimated number of devices supported by the computer and the size of the OPROM data, thus providing sufficient space to cache the UEFIOPROM data of all devices and optimizing the boot process. At the same time, the reserved space capacity also improves system redundancy and future scalability.
[0058] In one exemplary embodiment, the device management method further includes: determining a target memory space capacity based on the device identified when the computer is not first started; and 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.
[0059] In this embodiment, during non-first-time computer startups, the UEFI firmware identifies all devices connected to the PCIe bus and determines 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 new devices have been added or the OPROM data of existing devices has increased during non-first-time computer startups. To ensure that the first preset storage space can accommodate the OPROM data of all devices, the UEFI firmware re-divides the first preset storage space according to the target memory space capacity.
[0060] Specifically, based on all devices identified during non-first boots of the computer, the total OPROM data of all devices is calculated 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. 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.
[0061] In this embodiment, the UEFI firmware can dynamically adjust the size of the first preset storage space to adapt to an increase in the number of devices or an increase in OPROM data, thereby optimizing the boot process and ensuring the stability and efficiency of the system.
[0062] In an exemplary embodiment, the process of writing the device's option read-only memory data into a first preset storage space includes: writing the device's option read-only memory data into the first preset storage space in response to the first preset storage space meeting a first write condition; and determining data to be deleted in the first preset storage space in response to the first preset storage space not meeting the first write condition, and deleting the data to be deleted from the first preset storage space so that the first preset storage space meets the first write condition.
[0063] In this embodiment, the process of writing the device's Option ROM (OPROM) data into the first preset storage space can be divided into two cases, depending on whether the first preset storage space meets the first write condition. If the remaining storage capacity of the first preset storage space is not lower than the write limit threshold, then it meets the first write condition. In this case, the UEFI firmware can directly write the device's OPROM data into the first preset storage space. If the remaining storage capacity of the first preset storage space is lower than the write limit threshold, then it does not meet the first write condition. In this case, the UEFI firmware will determine the data to be deleted in the first preset storage space, and then 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, thereby meeting the first write condition. Finally, the UEFI firmware can write the device's OPROM data into the first preset storage space.
[0064] Among them, data to be deleted refers to unnecessary or low-priority data that can be deleted to free up storage space.
[0065] In this way, the UEFI firmware can ensure that the data in the first preset storage space does not exceed its capacity limit, thereby avoiding data overflow and insufficient storage space problems. This method improves system stability and data management efficiency.
[0066] In an exemplary embodiment, the process of determining data to be deleted in the first preset storage space in response to the first preset storage space not meeting the first write condition, and deleting the data to be deleted from the first preset storage space to make the first preset storage space meet the first write condition includes: in response to the first preset storage space not meeting the first write condition and the device's option read-only memory data not meeting the second write condition, not writing the device's option read-only memory data into the first preset storage space; and in response to the first preset storage space not meeting the first write condition and the device's option read-only memory data meeting the second write condition, determining data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space to make the first preset storage space meet the first write condition.
[0067] In this embodiment, if the device's OPROM data does not meet the second write condition (i.e., the device is not the device selected by the host to be written to the first preset storage space), then the second write condition is determined not to be met, and the UEFI firmware will not write the device's OPROM data to the first preset storage space. The second write condition includes, but is not limited to, the device being a user-selected device, where user-selected devices include, but are not limited to, devices selected by the user in the UEFI settings menu or boot menu. If the device's OPROM data meets the second write condition, the UEFI firmware will continue to execute 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 unnecessary or low-priority data that can be deleted to free up storage space. The UEFI firmware will delete 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, thereby satisfying the first write condition. After the deletion operation is completed, the UEFI firmware will write the device's OPROM data 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, while avoiding the problem of insufficient storage space. This method improves system efficiency and data management flexibility.
[0068] In one 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.
[0069] In this embodiment, during the process of determining the data to be deleted in the first preset storage space, the UEFI firmware selects which data should be deleted according to a certain strategy to make room for new data. The UEFI firmware checks the OPROM data with the longest storage time in the first preset storage space; this data may be the earliest loaded into the storage space or the least frequently used data. The UEFI firmware analyzes the usage frequency of the OPROM data of each device in the first preset storage space and selects the OPROM data of the device with the lowest usage frequency as the data to be deleted. The UEFI firmware compares the size of each OPROM data in the first preset storage space and selects the OPROM data with the smallest data size or the smallest space occupation as the data to be deleted to save space. Through these steps, the UEFI firmware can determine which data is most suitable for deletion to make room for new or more important data. This strategy ensures that the data in the first preset storage space is the latest and most frequently used, and does not waste space by storing too much unnecessary data.
[0070] It's understandable that by deleting the longest-stored, least frequently used, or least frequently accessed OPROM data, UEFI firmware reduces the amount of data that needs to be loaded during boot, thus shortening boot time because the system doesn't need to process and load unnecessary information. Deleting no longer needed OPROM data helps optimize storage space usage, ensuring that storage only contains the information needed during the current boot process, thereby reducing the data processing burden at boot. After deleting old data, the UEFI firmware and operating system need to access a smaller memory area during boot, reducing memory access time and improving system responsiveness. In summary, by deleting the longest-stored, least frequently used, or least frequently accessed OPROM data, UEFI firmware can improve computer boot efficiency, reduce boot time, and optimize system resource usage.
[0071] In one exemplary embodiment, the device management method further includes: dividing a first preset storage space in the memory space of the baseboard management controller; configuring the baseboard management controller to use a read-only mode for the first preset storage space; and configuring the host computer to use a read-write mode for the first preset storage space.
[0072] In this embodiment, a portion of the BMC (Baseboard Management Controller) memory space (H2B (Host to BMC)) is allocated as a first preset storage space to cache OPROM data from PCIe devices. This allocation can be static or dynamic, depending on the specific requirements and design of the system. The Baseboard Management Controller is configured to use 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. Read-only mode means that the BMC firmware can only read the data in the memory space and cannot modify or delete this data. The computer host is configured to use 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 to load and update OPROM data. Read-write mode allows the computer host to read and modify the data in the memory space to accommodate the addition, updating, or removal of devices.
[0073] When the system boots up again, the UEFI firmware will skip the traditional step of reading the PCIe OPROM from the physical device and instead read the pre-packaged data packets directly from the H2B's memory space. This change significantly shortens the UEFI boot self-test time, improves system startup speed, and reduces reliance on hard drives or solid-state storage devices, thus reducing wear and tear caused by frequent read and write operations. This configuration clarifies the division of labor between the baseboard management controller and the computer host, ensuring system stability and security. The baseboard management controller is responsible for secure data storage, while the computer host is responsible for data loading and updating. This design improves system performance while protecting critical data from unauthorized modification.
[0074] In an exemplary embodiment, the device management method further includes: determining a communication interface on a baseboard management controller; and establishing an interface mapping relationship between the communication interface and a first preset storage space.
[0075] In this embodiment, a communication interface is defined 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 or a USB (Universal Serial Bus) interface, or a software interface, such as a Management Module Base Interface (MMBI). An interface mapping relationship is established between the communication interface and the first preset storage space to ensure that data can be transmitted from the communication interface to the first preset storage space. This mapping relationship can be a direct memory mapping or data transmission via a specific protocol or interface.
[0076] A high-efficiency loading mechanism based on MMBI is proposed. MMBI, as a high-level interface for BMC memory mapping, optimizes system resource management and significantly improves the efficiency of PCIe device initialization. The MMBI interface allows the BMC to allocate a protected memory region to the Host Controller, enabling a one-way data transfer mode—Host to BMC (H2B). That is, the Host Controller can write data to this region, while the BMC only has read permissions. This design fundamentally ensures the security of PCIe OPROM data, prevents unauthorized modification, and guarantees system stability and reliability.
[0077] When the system boots up again, the UEFI firmware will skip the traditional step of reading the PCIe OPROM from the physical device and instead read the pre-packaged data packets directly from the H2B memory space. This change significantly shortens the UEFI firmware boot self-test time, improves system boot speed, and reduces reliance on hard drives or solid-state storage devices, thus reducing wear and tear caused by frequent read and write operations. This process enables rapid data transfer and storage, providing a foundation for direct access during subsequent boot processes, thereby improving system boot efficiency and performance.
[0078] In one exemplary embodiment, the process of obtaining the identification information corresponding to the device includes: sending a configuration read / write request to the device's configuration space to obtain the supplier identification information and device identification information corresponding to the device; the identification information includes supplier identification information and device identification information.
[0079] Understandably, during the computer boot process, the UEFI firmware needs to identify and initialize all hardware devices connected via the PCI Express (PCIe, Peripheral Component Interconnect Fast) interface. To accomplish this task, the UEFI firmware sends PCI configuration read / write requests to the configuration space of the target PCIe device to read important device information.
[0080] Specifically, the UEFI firmware reads the Vendor ID and Device ID fields from the PCIe device's configuration space. These fields are located in specific locations within the configuration space, typically the first 8 bytes. The configuration space is a memory-mapped storage area located in the device's physical address space. Specifically, the PCI (Peripheral Component Interconnect) configuration space: PCI devices (such as graphics cards and network cards) all contain a PCI configuration space, a memory-mapped storage area located in the device's physical address space. This configuration space contains important device information, such as the Vendor ID, Device ID, command and status registers, etc. The Vendor ID is a unique identifier assigned to the device manufacturer by the PCI vendor alliance; the Device ID is a unique identifier assigned to a specific model of device by the device manufacturer. Together, these two fields constitute the unique identifier of the device.
[0081] During the boot process, the UEFI firmware accesses the configuration space of the target PCIe device via PCI configuration space read / write requests. The UEFI firmware first reads the device's vendor ID and device ID fields to determine the device's manufacturer and model. This information is used to further identify the device and load the appropriate drivers. 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 drivers and perform necessary initialization steps to ensure the device functions correctly.
[0082] In this way, UEFI firmware can manage PCIe devices and provide the necessary hardware support for the loading and operation of the operating system.
[0083] In one exemplary embodiment, the process of loading optional read-only memory data of a device from a preset physical storage device includes: reading the value of a target register of the device; the target register being used to indicate the physical address of the optional 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 optional read-only memory data of the device according to the physical address.
[0084] In this embodiment, the UEFI firmware reads the value of the target register of the PCIe device. This register typically indicates 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. This physical address refers to the specific location of the OPROM data in the device's ROM. The UEFI firmware loads the device's OPROM data according to the determined physical address. The loaded OPROM data can be executed by the UEFI firmware to initialize and configure the device.
[0085] In an exemplary embodiment, the process of writing the device's option read-only memory data into a first preset storage space includes: calculating a checksum of the device's option read-only memory data; encapsulating the checksum, the device's option read-only memory data, and identification information to obtain a data packet; and writing the data packet into the first preset storage space.
[0086] In this embodiment, the UEFI firmware calculates the checksum of the OPROM data. Specifically, it can be a CRC (Cyclic Redundancy Check) checksum, where 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 means that no errors occurred during the transmission of the OPROM data and it can be used safely.
[0087] The calculated checksum, OPROM data, and device identification information are encapsulated to form a data packet. The encapsulated data packet contains the checksum, OPROM data, and device identification information, which together constitute a complete data unit. The UEFI firmware writes the encapsulated data packet into the first preset storage space.
[0088] In this way, the UEFI firmware can securely write OPROM data to a first preset storage space and verify the integrity and correctness of the data by calculating and comparing CRC checksums. This helps ensure data security and proper device configuration during system startup.
[0089] In one exemplary embodiment, the device management method further includes: dividing a second preset storage space in the memory space of the baseboard management controller; configuring the host computer to read-only mode for the second preset storage space, and configuring the baseboard management controller to 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.
[0090] In a computer system, the Baseboard Management Controller (BMC) is a standalone management unit responsible for monitoring and controlling server hardware, including management operations during the boot process. To improve user experience and system management flexibility, the BMC can provide an innovative out-of-band OPROM update method, enabling users to update and replace OPROMs without directly intervening in the system boot process.
[0091] 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 exchanging data with the host system. It allows the BMC to transfer important data or instructions to the host without affecting normal system operation. The host system can only read this memory space and cannot modify it.
[0092] Users or system administrators place OPROM loader programs or update packages in the B2H memory space (second preset storage space) of the BMC. These data packages contain OPROM update instructions or code used to update the device's firmware. During startup, the BMC reads the OPROM update package from the B2H memory space and executes these update instructions or code to update the device's OPROM data. During startup, the host (such as UEFI firmware) reads OPROM update information from the BMC's B2H memory space and updates the PCIe device's OPROM data accordingly.
[0093] In one exemplary embodiment, 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; updating the data packet to be updated to a first preset storage space to load option read-only memory data in the data packet to be updated.
[0094] In this embodiment, when the host detects a device firmware update request, for example, through a pre-configured OPROM update package in the B2H memory space of the BMC, the UEFI firmware reads the update data package stored in the second preset storage space. These data packages contain OPROM update instructions or code. The UEFI firmware updates the read update data package to the first preset storage space. The first preset storage space is typically a region in the system memory specifically allocated for storing OPROM data. The BMC reads the OPROM update package from the B2H memory space and temporarily stores it in its internal cache. The BMC checks and confirms the old OPROM data in the H2B memory space for subsequent update replacement operations. The BMC copies the new OPROM data from the cache to the H2B memory space, overwriting the original old data. During this process, the BMC ensures data consistency and integrity, avoiding system instability or boot failure due to data transmission errors. After completing the OPROM data update replacement, the BMC sends an update completion signal to the UEFI self-test process. In the subsequent boot process, the BIOS loads the new OPROM data from the H2B memory space based on the update information provided by the BMC. The new OPROM data is applied to the corresponding PCIe devices to ensure that the device drivers are up-to-date.
[0095] In this way, users can perform real-time out-of-band updates of PCIe device OPROMs without interrupting normal system operation. 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 arise from directly interfering with the system startup process. At the same time, it also demonstrates the important role and potential of BMC in computer system management.
[0096] In summary, referring to Figure 2, this application first deeply analyzes the bottleneck of the PCIe OPROM access mechanism in traditional systems, namely, the need to read a large amount of data from the physical device each time the system starts. This process is not only time-consuming but also increases the uncertainty of the system startup process. To address this problem, this application creatively proposes an intelligent caching and prediction strategy. The PCIe OPROM data read for the first time is efficiently encapsulated and stored in a secure and reliable memory area. During subsequent startup processes, the system can directly and quickly obtain the required data from this memory area without accessing the physical device again, thus significantly reducing the number of accesses and greatly shortening the loading time. This greatly improves the efficiency of system startup and brings many practical benefits to users. First, users can enjoy a faster and smoother boot experience, avoiding problems such as slow user experience or slow server service launch due to excessive OPROM loading time. Second, by reducing the number of physical device accesses, this application also helps reduce energy consumption and wear during system startup, extending the lifespan of the hardware. Furthermore, this solution enhances the overall stability and reliability of the system, reducing errors and malfunctions that may be caused by frequent access to the physical device. From the perspective of the firmware of the PCIe external device itself, if the user modifies the OPROM and causes an abnormal crash due to a reboot, the UEFI firmware can then load the normal PCIe OPROM driver from the MMBI space, thereby avoiding system abnormality problems.
[0097] Secondly, referring to Figure 3, this application also provides an equipment management system, including:
[0098] The first acquisition module 11 is used to acquire the identification information of a device when it is identified as connected to a target communication bus during computer startup. The matching module 12 is used to 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. The first loading module 13 is used to load the device's option read-only memory data from the first preset storage space in response to a successful match, so as to manage the device. The second loading module 14 is used to load the device's option read-only memory data from the preset physical storage device in response to a failed match, so as to manage the device, and write the device's option read-only memory data into the first preset storage space.
[0099] As can be seen, 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. A matching search is then performed in a first preset storage space, which is a fast-access memory area with an access speed greater than the memory access speed of the device's corresponding preset physical storage device. If a match is successful, the device's option read-only memory data is directly loaded from the first preset storage space, thereby reducing the time spent loading data from the physical storage device each time the computer starts. If a match fails, the device's option read-only memory data is loaded from the preset physical storage device for device management. Simultaneously, the loaded data is written to the first preset storage space so that it can be directly loaded from the first preset storage space on the next startup. This optimized loading process of option read-only memory data during startup reduces startup time, especially in systems configured with multiple PCIe devices, improving system startup efficiency and user experience.
[0100] In one exemplary embodiment, the process of loading device option read-only memory data from a preset physical storage device includes: loading device option read-only memory data directly from the preset physical storage device in response to the preset physical storage device meeting direct access conditions; and creating a memory region that meets direct access conditions in response to the preset physical storage device not meeting direct access conditions, copying device option read-only memory data from the preset physical storage device to the memory region so as to load option read-only memory data in the memory region, and creating a device access path for the loaded option read-only memory data.
[0101] In an exemplary embodiment, the device management system further includes: a recording module for recording information of loaded devices; an information generation module for generating a current recording table based on the information of all devices recorded in the current recording; and a management module for determining whether there are any deleted devices based on the comparison result between the current recording table and the previous recording table, and if there are deleted devices, deleting the option read-only memory data of the deleted devices from the first preset storage space.
[0102] In an exemplary embodiment, the device management system further includes: a first determining module, configured to determine a reference memory space capacity based on the device identified when the computer first starts up while the device is in place; and to divide a first preset storage space according to the reference memory space capacity.
[0103] In an exemplary embodiment, the device management system further includes: a second determining module, configured to determine 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.
[0104] In an exemplary embodiment, the device management system further includes: a third determining module, configured to determine the target memory space capacity based on the device identified when the computer is not first started; and when the target memory space capacity is greater than the reference memory space capacity, to re-divide the first preset storage space according to the target memory space capacity.
[0105] In an exemplary embodiment, the process of writing the device's option read-only memory data into a first preset storage space includes: writing the device's option read-only memory data into the first preset storage space in response to the first preset storage space meeting a first write condition; and determining data to be deleted in the first preset storage space in response to the first preset storage space not meeting the first write condition, and deleting the data to be deleted from the first preset storage space so that the first preset storage space meets the first write condition.
[0106] In an exemplary embodiment, the process of determining data to be deleted in the first preset storage space in response to the first preset storage space not meeting the first write condition, and deleting the data to be deleted from the first preset storage space to make the first preset storage space meet the first write condition includes: in response to the first preset storage space not meeting the first write condition and the device's option read-only memory data not meeting the second write condition, not writing the device's option read-only memory data into the first preset storage space; and in response to the first preset storage space not meeting the first write condition and the device's option read-only memory data meeting the second write condition, determining data to be deleted in the first preset storage space, and deleting the data to be deleted from the first preset storage space to make the first preset storage space meet the first write condition.
[0107] In one 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.
[0108] 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; and a first configuration module, configured to configure the baseboard management controller to use the first preset storage space in read-only mode and configure the host computer to use the first preset storage space in read-write mode.
[0109] In an exemplary embodiment, the device management system further includes: a fourth determining module, configured to determine a communication interface on the baseboard management controller; and establish an interface mapping relationship between the communication interface and a first preset storage space.
[0110] In one exemplary embodiment, the process of obtaining the identification information corresponding to the device includes: sending a configuration read / write request to the device's configuration space to obtain the supplier identification information and device identification information corresponding to the device; the identification information includes supplier identification information and device identification information.
[0111] In one exemplary embodiment, the process of loading optional read-only memory data of a device from a preset physical storage device includes: reading the value of a target register of the device; the target register being used to indicate the physical address of the optional 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 optional read-only memory data of the device according to the physical address.
[0112] In an exemplary embodiment, the process of writing the device's option read-only memory data into a first preset storage space includes: calculating a checksum of the device's option read-only memory data; encapsulating the checksum, the device's option read-only memory data, and identification information to obtain a data packet; and writing the data packet into the first preset storage space.
[0113] In one 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 a first preset storage space to load option read-only memory data in the data packet to be updated.
[0114] In one 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 computer to read-only mode for the second preset storage space and configure the baseboard management controller to 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.
[0115] Thirdly, this application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the device management method as described in any of the above.
[0116] For a description of the computer program product provided in this application, please refer to the above embodiments; further details will not be repeated here.
[0117] The computer program product provided in this application has the same beneficial effects as the aforementioned device management method.
[0118] Fourthly, referring to FIG4, this application also provides an electronic device, including: a memory 21 for storing a computer program; and a processor 22 for executing the computer program to implement the steps of the device management method as described in any of the above.
[0119] The electronic device also includes: an input interface 23, connected to the processor 22 via a communication bus 26, used to acquire externally imported computer programs, parameters, and instructions, and to save them to the memory 21 under the control of the processor 22. This 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 buttons, a trackball, or a touchpad on the terminal casing. A display unit 24, connected to the processor 22 via the communication bus 26, is used to display data sent by the processor 22. This display unit can be an LCD screen or an e-ink display screen, etc. A network port 25, connected to the processor 22 via the communication bus 26, is used to establish communication connections with various external terminal devices. The communication technology used for this connection can be wired or wireless communication technology, such as mobile high-definition link technology, universal serial bus, high-definition multimedia interface, wireless fidelity technology, Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE 802.11s (Institute of Electrical and Electronics Engineers 802.11s, wireless mesh network protocol standard), etc.
[0120] For a description of the electronic device provided in this application, please refer to the above embodiments; further details will not be repeated here.
[0121] The electronic device provided in this application has the same beneficial effects as the aforementioned device management method.
[0122] Fifthly, referring to FIG5, this application also provides a computer non-volatile 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 as described in any of the above claims.
[0123] The non-volatile readable storage medium 30 of the computer may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0124] For a description of the non-volatile readable storage medium provided in this application, please refer to the above embodiments; further details will not be repeated here.
[0125] The non-volatile readable storage medium provided in this application has the same beneficial effects as the device management method described above.
[0126] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0127] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to 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 method for managing equipment, characterized in that, include: During the computer startup process, when a device connected to the target communication bus is identified, the identification information corresponding to the device is obtained; The identification information is matched 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, the device's option read-only memory data is loaded from the first preset storage space to manage the device; In response to a matching failure, the device's option read-only memory data is loaded from the preset physical storage device to manage the device, and the device's option read-only memory data is written to the first preset storage space.
2. The equipment management method according to claim 1, characterized in that, The process of loading the optional 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 conditions, the optional read-only memory data of the device is loaded directly from the preset physical storage device; In response to the preset physical storage device not meeting the direct access conditions, a memory region that meets the direct access conditions is created, and the device's option read-only memory data is copied from the preset physical storage device to the memory region so that the option read-only memory data is loaded in the memory region, and a device access path is created for the loaded option read-only memory data.
3. The device management method according to Claim 1, characterized by, After loading the device's option read-only memory data from the first preset storage space, the device management method further includes: Record the information of the loaded device; Generate the current record table based on the information of all the devices in the current record; Based on the comparison results between the current record table and the previous record table, determine whether there are any deleted devices; If a deleted device exists, the option read-only memory data of the deleted device is deleted from the first preset storage space.
4. The device management method according to Claim 1, characterized by, 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 identified when the computer first boots up while the device is in place, a reference memory space capacity is determined; the first preset storage space is then divided according to the reference memory space capacity.
5. The device management method according to claim 4, characterized by, 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: The first preset storage space is divided according to the reserved space capacity and the reference memory space capacity.
6. The device management method according to Claim 4, characterized by, The equipment management method further includes: The target memory space capacity is determined based on the device identified during the computer's non-first startup. When the target memory space capacity is greater than the reference memory space capacity, the first preset storage space is re-divided according to the target memory space capacity.
7. The device management method according to Claim 4, characterized by, The process of writing the device's option read-only memory data into the first preset storage space includes: In response to the first preset storage space meeting the first write condition, the device's option read-only memory data is written into the first preset storage space; In response to the first preset storage space not meeting the first write condition, data to be deleted in the first preset storage space is determined, and the data to be deleted is deleted from the first preset storage space so that the first preset storage space meets the first write condition.
8. The device management method according to Claim 7, characterized by, In response to the first preset storage space not meeting the first write 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 write condition includes: in response to the first preset storage space not meeting the first write condition and the device's option read-only memory data not meeting the second write condition, not writing the device's option read-only memory data into the first preset storage space. In response to the first preset storage space not meeting the first write condition, and the device's option read-only memory data meeting the second write condition, the data to be deleted in the first preset storage space is determined, and the data to be deleted is deleted from the first preset storage space so that the first preset storage space meets the first write condition.
9. The device management method according to Claim 7, characterized by, The process of determining the data to be deleted in the first preset storage space includes: The option read-only memory data with the longest storage time in the first preset storage space is identified as the data to be deleted; and / or, The option read-only memory data of the device with the lowest usage frequency in the first preset storage space is identified as the data to be deleted; and / or, The smallest option read-only memory data in the first preset storage space is identified as the data to be deleted.
10. The device management method of claim 1, wherein, The device management method further includes: allocating the first preset storage space in the memory space of the baseboard management controller; Configure the baseboard management controller to read-only mode for the first preset storage space, and configure the computer host to read-write mode for the first preset storage space.
11. The device management method according to Claim 10, characterized by, The device management method further includes: determining 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 by, 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 of claim 1, wherein, The process of loading the optional 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 configured to indicate the physical address of the device's optional read-only memory data in the preset physical storage device; The physical address of the device in the preset physical storage device is determined based on the value of the target register; Load the device's read-only memory data according to the physical address.
14. The device management method of claim 1, wherein The process of writing the device's option read-only memory data into the first preset storage space includes: Calculate the checksum of the device's option read-only memory data; The verification code, the device's option read-only memory data, and the identification information are encapsulated to obtain a data packet; the data packet is then written into the first preset storage space.
15. The device management method according to any one of claims 1 to 14, characterized by, The equipment management method further includes: In response to the detection of a device firmware update request, the update data packet stored in the second preset storage space is read; The data packet to be updated is updated to the first preset storage space in order to load the option read-only memory data in the data packet to be updated.
16. The equipment management method according to claim 15, characterized in that, The device management method further includes: allocating the second preset storage space in the memory space of the baseboard management controller; The host computer is configured to use the second preset storage space in read-only mode, and the baseboard management controller is configured to use the second preset storage space in read-write mode, 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.
17. A device management system, characterized by include: The first acquisition module is configured to acquire the identification information corresponding to the device when a device connected to the target communication bus is identified during the computer startup process. The matching module is configured to 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. The first loading module is configured to load the device's option read-only memory data from the first preset storage space in response to a successful match, so as to manage the device; The second loading module is configured to load the device's option read-only memory data from the preset physical storage device in response to a matching failure, so as to manage the device, and write the device's option read-only memory data into the first preset storage space.
18. A computer program product comprising computer programs / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the device management method as described in any one of claims 1-16.
19. An electronic device, comprising: include: Memory, configured to store computer programs; The processor is configured to implement the steps of the device management method as described in any one of claims 1-16 when executing the computer program.
20. A computer non-volatile readable storage medium characterized in that, The computer non-volatile readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the device management method as described in any one of claims 1-16.
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
Optional read-only memory loading method, computer program product, equipment and medium
CN118672664A
Equipment management method and system, electronic equipment and readable storage medium
CN119225861A