Equipment management method and system, electronic equipment and readable storage medium
By identifying the PCIE device when the computer starts and loading OPROM data in the fast storage space, the problem of reloading the OPROM data of the PCIE device needs to be reloaded every time it starts, improving the system startup efficiency and user experience.
Patent Information
- Application Number
- CN202411721771.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-11-28
AI Technical Summary
During the computer startup process, the UEFI OPROM data of the PCIE device needs to be reloaded each time it starts, resulting in an extended startup time, especially in systems configured with multiple PCIE devices, which affects the system startup efficiency and user experience.
By identifying the connected PCIE device at startup, obtaining its identification information, and matching searches in a fast access preset storage space. If the match is successful, load OPROM data from the storage space; if the match fails, load and write to the preset storage space from the preset physical storage device for direct loading next time.
Optimize the OPROM data loading time during startup, reduce the number of accesses to physical storage devices, improve the system startup efficiency and user experience, and significantly shorten the startup time in multiple devices systems.
Smart Images

Figure CN119225861A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of servers, and in particular to a device management method, system, electronic device and readable storage medium. Background Art
[0002] During the computer startup process, PCIE (Peripheral Component Interconnect Express) bus scanning is a key step, which ensures that all high-performance hardware devices connected through the PCIE interface can be accurately identified by the system and initialized smoothly. When the computer starts, the UEFI (Unified Extensible Firmware Interface) firmware performs a PCIE bus scan to identify each PCIE device connected to the bus and its accompanying UEFI OPROM (Option ROM), and loads the OPROM into the memory as a driver so that the UEFI firmware can manage the PCIE device. However, since the UEFI OPROMs of all PCIE devices need to be reloaded every time the computer is started, this process is cumbersome and time-consuming. Especially in a system configured with multiple PCIE devices, this repeated loading process will significantly increase the time required for startup.
[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. 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 the startup process, reduce the startup time, and improve the system startup efficiency and user experience.
[0005] To solve the above technical problems, the present invention provides a device management method, comprising: during the computer startup process, when a device connected to a target communication bus is identified, obtaining identification information corresponding to the device; matching based on the identification information with 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; 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 also includes: recording the information of the loaded device; generating a current record table based on the information of all the devices recorded currently; judging whether there is a deleted device according to the comparison result of 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.
[0008] Among them, before matching the identification information with the information stored in the first preset storage space, the device management method also includes: determining the reference memory space capacity based on the device identified when the computer is first started when the device is 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 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.
[0010] Among them, the device management method also includes: determining the target memory space capacity based on the device 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.
[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 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.
[0012] Among them, in response to the first preset storage space not satisfying 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 satisfies the first write condition. The process includes: in response to the first preset storage space not satisfying the first write condition and the option read-only memory data of the device not satisfying the second write 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 write condition and the option read-only memory data of the device satisfying 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 so that the first preset storage space satisfies the first write 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] The device management method further includes: dividing 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] Wherein, the device management method further includes: determining a communication interface on the baseboard management controller; and establishing an interface mapping relationship between the communication interface and the first preset storage space.
[0016] The process of obtaining the identification information corresponding to the device includes: sending a configuration read and 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.
[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; and 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 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.
[0019] 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 the first preset storage space so as to load option read-only memory data in the data packet to be updated.
[0020] Among them, the device management method also includes: dividing the 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 obtains the data packet to be updated in the second preset storage space, and determines the data packet to be processed in the first preset storage space, and replaces the data packet to be processed with the data packet to be updated.
[0021] To solve the above technical problems, the present invention also provides a device management system, including: a first acquisition module, used to obtain identification information corresponding to the 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; an access speed of the first preset storage space is greater than or equal to a memory access speed of a preset physical storage device corresponding to the device; a first loading module, used to load option read-only memory data of the device from the first preset storage space in response to a successful match to manage the device; a second loading module, used to load option read-only memory data of the device from the preset physical storage device in response to a failed match 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 problem, the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the device management method as described in any one of the above items when executed by a processor.
[0023] To solve the above technical problems, the present invention further provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the device management method as described in any one of the above items when executing the computer program.
[0024] To solve the above technical problems, the present invention further 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 as described in any one of the above items are implemented.
[0025] The present invention provides a device management method. During the computer startup process, each device connected to a target communication bus is identified, and its corresponding identification information is obtained, and a matching search is performed in a first preset storage space. The first preset storage space is a fast-access memory area, and its access speed is greater than the memory access speed of a 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 at each startup. If the match fails, the option read-only memory data of the device is loaded from the preset physical storage device to perform 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 at the next startup. The loading process of the option read-only memory data during the startup process is optimized, and the startup time is reduced, especially in a system configured with multiple PCIE devices, thereby improving the startup efficiency and user experience of the system.
[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-mentioned device management method. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 This is a flow chart of the steps of a device management method provided by the present invention.
[0029] Figure 2 This is a flowchart of the steps of another device management method provided by the present invention.
[0030] Figure 3 This is a structural schematic diagram of a device management system provided by the present invention.
[0031] Figure 4 The present invention is a schematic structural diagram of an electronic device provided by the present invention.
[0032] Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[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 the startup process, reduce the startup time, and improve the system startup efficiency and user experience.
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] In a first aspect, the present invention provides a device management method, such as Figure 1 shown.
[0036] S101: During the computer startup process, when a device connected to a target communication bus is identified, identification information corresponding to the device is obtained.
[0037] In this embodiment, the computer startup process is each startup process of the computer, and this embodiment is only described by taking one startup process as an example. When the computer starts, the UEFI firmware running on its hardware scans all target communication buses, wherein the target communication bus includes but is 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 the PCIE bus. After identifying the device, the UEFI firmware reads identification information from the configuration space of each device. These identification information are independent identifications of the device, i.e., unique identifiers of the device, including but not limited to vendor ID, device ID, etc., to facilitate subsequent device matching based on the identification information. In this way, the UEFI firmware can efficiently identify and manage PCIE devices, reduce startup time, especially in a system configured with multiple PCIE devices, which improves the startup efficiency and user experience of the system.
[0038] S102: Matching the information stored in the first preset storage space based on the identification information; 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 device's identification information to match in the first preset storage space, which is an area specially divided for storing OPROM data, and its access speed is faster than the physical storage device of the device. The first preset storage space includes but is not limited to a memory space divided from the BMC's memory space, or a memory space divided from the system memory (such as RAM (Random Access Memory)), etc., for easy access by the host's BIOS (Basic Input / Output System).
[0040] In this embodiment, a device identified by the UEFI firmware is used as an example for explanation. 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 so, the match is determined to be successful. If not, the match is determined to be unsuccessful. 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 boot efficiency. In particular, in a system configured with multiple PCIE devices, this optimization can significantly reduce the boot 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 first preset storage space includes the identification information of the device, the OPROM data of the device is directly loaded from the first preset storage space for successful matching. The OPROM data includes the initialization code and driver of the device. These codes and programs are executed before the operating system is loaded to ensure that the device can be correctly identified and configured when the operating system is started. Since the access speed of the first preset storage space is much faster than 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 is started, which significantly reduces the startup time.
[0043] S104: In response to a match failure, load the option ROM data of the device from a preset physical storage device to manage the device, and write the option ROM data of the device into a first preset storage space.
[0044] In this embodiment, if the first preset storage space does not include the identification information of the device, it is a match failure. At this time, the UEFI firmware will load the OPROM data of the device from the preset physical storage device and write it into the first preset storage space. In this way, in 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 fast-access memory area, 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 to load data from the physical storage device each time it is started. If the match fails, the option read-only memory data of the device is loaded from the preset physical storage device to perform device management. At the same time, the loaded data is written to the first preset storage space so that it can be directly loaded from the first preset storage space the next time it is started. Optimizes the loading process of option ROM data during the startup process to reduce the startup time, especially in systems configured with multiple PCIE devices, thereby improving the system startup efficiency and user experience.
[0045] In an exemplary embodiment, the process of loading the device's option read-only memory data from a preset physical storage device includes: in response to the preset physical storage device satisfying a direct access condition, 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 satisfying the direct access condition, creating a memory area that satisfies the direct access condition, copying the device's option read-only memory data 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 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 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 device's option read-only memory data from the preset physical storage device, avoiding the data copying process, thereby improving the boot efficiency. If the UEFI firmware cannot access the address of the preset physical storage device, it cannot directly load the OPROM data from the device. At this time, the computer host will create a new memory area that meets the direct access condition. The host copies the device's OPROM data 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 later. This flexibility enables the system to adapt to the storage characteristics of different devices.
[0047] In this way, the 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, avoiding the need to reload OPROM data every time it boots, reducing the complexity of the system startup process, and making the startup process more stable and reliable. This method enables 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 OPROM data in memory, unauthorized access or modification can be prevented, enhancing the security of the system.
[0048] In summary, this method of managing OPROM data according to whether a preset physical storage device meets the direct access condition not only improves the boot 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 the device from the first preset storage space, the device management method also includes: recording information of the loaded device; generating a current record table based on information of all devices currently recorded; judging whether there is a deleted device based on a comparison result of 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 loaded with the option read-only memory data during the current startup process, and generate the current record table based on all the device information recorded during the current startup process. The record table is a structured data set used to store and manage detailed information of the device. A comparison will be performed based on the current record table and 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 are deleted from the first preset storage space. The deletion operation ensures that the data in the first preset storage space is the latest and does not contain device information that is no longer used, ensuring that unnecessary storage space is not occupied, thereby 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 also includes: determining a reference memory space capacity based on the device identified when the computer is first started when the device is in place; and dividing the first preset storage space according to the reference memory space capacity.
[0052] When the computer is first started with devices in place, the UEFI firmware will identify all devices connected to the PCIE bus. Based on these devices, the UEFI firmware will calculate the sum of the OPROM data of all devices, and this sum can be used as the reference memory space capacity. According to the calculated reference memory space capacity, the UEFI firmware will divide a piece of 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, so as to ensure that the UEFI OPROM data of all devices can be effectively cached and the boot process can be optimized.
[0054] 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.
[0055] In this embodiment, after calculating the reference memory space capacity, the reserved space capacity is also determined. The reserved space capacity is to reserve a certain amount of additional space to cope with possible expansion 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, which means that the size of the first preset storage space will be the reference memory space capacity plus the reserved space capacity. The addition of the reserved space capacity ensures that the first preset storage space can still meet the demand when new devices are added or when some devices are removed.
[0056] In this way, it is possible to ensure that the size of the first preset storage space matches the number of devices supported by the computer and the estimated size of the OPROM data, thereby providing sufficient space to cache the UEFI OPROM data of all devices and optimize the boot process. At the same time, the reserved space capacity also improves the redundancy and future scalability of the system.
[0057] In an exemplary embodiment, the device management method further includes: determining a target memory space capacity based on a device identified when the computer is not started for the first time; 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.
[0058] In this embodiment, when the computer is not started for the first time, the UEFI firmware will identify all 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, this means that during the non-first startup process of the computer, a new device has been added or the OPROM data of an existing device has increased. In order 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 devices recognized when the computer is not started for the first time, the sum of the OPROM data of all devices is calculated to obtain the target memory space capacity. If the target memory space capacity is larger than the reference memory space capacity, this 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.
[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 boot 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 the device into a first preset storage space includes: in response to the first preset storage space satisfying a first write 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 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 satisfies the first write condition.
[0062] In this embodiment, the process of writing the option read-only memory (Option ROM, OPROM) data of the device into the first preset storage space can be divided into two cases, depending on whether the first preset storage space meets the first writing condition. If the remaining storage capacity of the first preset storage space is not lower than the write restriction threshold, then it meets 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 write restriction threshold, then it does not meet 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 meets the first writing condition. Finally, the UEFI firmware can write the OPROM data of the device into the first preset storage space.
[0063] The data to be deleted refers to unnecessary data or data with a lower priority, which can be deleted to release 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, thereby avoiding data overflow and insufficient storage space. This method improves system stability and data management efficiency.
[0065] In an exemplary embodiment, in response to a first preset storage space not satisfying a first 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 so that the first preset storage space satisfies the first write condition. The process includes: in response to the first preset storage space not satisfying the first write condition and the option read-only memory data of the device not satisfying the second write 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 write condition and the option read-only memory data of the device satisfying 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 so that the first preset storage space satisfies the first write condition.
[0066] In this embodiment, if the OPROM data of the device does not meet the second write condition, that is, the device is not a device selected by the host that needs to be written to the first preset storage space, it is determined that the second write 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 write condition includes but is not limited to the device being a device selected by the user, wherein the device selected by the user includes but is not limited to the device selected by the user in the UEFI setting menu or the boot menu. If the OPROM data of the device meets the second write condition, the UEFI firmware will continue to perform subsequent steps, that is, the UEFI firmware will determine the data to be deleted in the first preset storage space, and the data to be deleted refers to those unnecessary or low-priority data, which 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 write 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, while avoiding 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, in 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 strategy 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 size of each OPROM data in the first preset storage space, and select the OPROM data with the smallest data 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 for deletion in order to make room for new or more important data. This strategy can ensure that the data in the first preset storage space is the latest and most commonly used, and that space is not wasted due to storing too much unnecessary data.
[0069] It can be understood that by deleting the OPROM data with the longest storage time and the lowest or smallest usage frequency, the UEFI firmware reduces the amount of data that needs to be loaded during the boot process, which can shorten the boot time because the system does not need to process and load unnecessary information. Deleting OPROM data that is no longer needed helps optimize the use of storage space, which ensures that the storage space only contains information required for the current boot process, thereby reducing the data processing burden at boot time. After deleting the old data, the UEFI firmware and operating system need to access a smaller memory area at boot time, thereby reducing the memory access time and improving the system's response speed. In summary, by deleting the OPROM data with the longest storage time and the lowest or smallest usage frequency, the UEFI firmware can improve computer boot efficiency, reduce boot time, and optimize system resource usage.
[0070] In an 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 be in read-only mode for the first preset storage space, and configuring the host computer to be in read-write mode for the first preset storage space.
[0071] In this embodiment, a portion (H2B) is divided out of the memory space of the BMC as the first preset storage space for caching the OPROM data of the PCIE device. This division can be static or dynamic, depending on the specific needs 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 the management and monitoring of the system. Its memory space may need to be configured in read-only mode to ensure the security and integrity of the data. The read-only mode means that the BMC firmware can only read the data in the memory space, but cannot modify or delete the data. The host 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 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 adding, updating or removing devices.
[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 H2B memory space. This change significantly shortens the UEFI boot self-test time and improves the system startup speed, while reducing the reliance on hard disks or solid-state storage devices and reducing wear caused by frequent reading and writing. With this configuration, the division of labor between the baseboard management controller and the computer host is clearer, 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 loading and updating data. This design can improve system performance while protecting critical data from unauthorized modifications.
[0073] In an exemplary embodiment, the device management method further includes: determining a communication interface on the baseboard management controller; and 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 BaseInterface). 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] For an efficient loading mechanism based on MMBI, MMBI, as a high-level 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, realizing a one-way data transmission mode - Host to BMC (H2B), that is, the Host Controller 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 modifications, and ensures 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 directly read the previously encapsulated data packet from the H2B memory space. This change significantly shortens the UEFI firmware boot self-test time, improves the system startup speed, and reduces the dependence on hard disks or solid-state storage devices, reducing wear caused by frequent reading and writing. This process realizes the rapid transmission and storage of data, provides a basis for direct calls in the subsequent boot process, and thus improves the system startup efficiency and performance.
[0077] In an exemplary embodiment, the process of obtaining identification information corresponding to a device includes: sending a configuration read / write request to the configuration space of the device to obtain vendor identification information and device identification information corresponding to the device; the identification information includes vendor identification information and device identification information.
[0078] It is understandable 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 sends PCI configuration read and write requests to the configuration space of the target PCIE device to read 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 in a specific position 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, 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 vendor ID, device ID, command and status registers, etc.; the vendor ID (Vendor ID) is a unique identifier assigned to the device manufacturer by the PCI Vendor Alliance; the device ID (Device ID) is a unique identifier assigned to a specific model of device by the device manufacturer. These two fields together constitute the unique identification of the device.
[0080] During the boot 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 device's vendor ID and device ID fields to determine the manufacturer and model of the device. This information is 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, UEFI firmware can manage PCIE devices and provide the necessary hardware support for loading and running the operating system.
[0082] 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 a 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.
[0083] In this embodiment, the UEFI firmware reads the value of the target register of the PCIE device, which is usually 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, and 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, 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 device's option read-only memory data into a first preset storage space includes: calculating a check code of the device's option read-only memory data; encapsulating the check code, 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.
[0085] In this embodiment, the UEFI firmware calculates the checksum of the OPROM data, which may be a CRC checksum, wherein the CRC checksum is an error detection code used to ensure the integrity and correctness of the data, and the calculated CRC checksum is compared with the CRC checksum stored in the OPROM data. If the two match, it means that no error occurs in the transmission process of the OPROM data and it can be used safely.
[0086] The calculated checksum, OPROM data and device identification information are encapsulated to form a data packet, the encapsulated data packet includes the checksum, OPROM data and device identification information, which together constitute a complete data unit, and 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 to the first preset storage space and verify the integrity and correctness of the data by calculating and comparing the CRC checksum. This helps ensure data security and correct configuration of the device during the system startup process.
[0088] In an exemplary embodiment, the device management method also includes: dividing a second preset storage space in the memory space of the baseboard management controller; configuring the computer host 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 obtains the data packets to be updated in the second preset storage space, and determines the data packets to be processed in the first preset storage space, and replaces the data packets to be processed with the data packets to be updated.
[0089] In a computer system, the baseboard management controller (BMC) is an independent management unit that monitors and controls server hardware, including management operations during the boot process. In order to improve user experience and system management flexibility, the BMC can provide an innovative out-of-band OPROM update method, allowing users to update and replace OPROM without directly intervening in the system boot process.
[0090] In this out-of-band update mechanism, the user first needs to place the OPROM loader or update package in the BMC's B2H (BMC-To-Host) memory space in advance. The B2H memory space is specially designed for BMC to exchange data with the host system. It allows the BMC to pass important data or instructions to the host without affecting the normal operation of the system. The host system can only read this memory space but cannot modify it.
[0091] The user or system administrator places the OPROM loader or update package in the B2H memory space (the second preset storage space) of the BMC. These data packets contain OPROM update instructions or codes, which are used to update the device's firmware. During the boot process, the BMC reads the OPROM update package from the B2H memory space, and the BMC executes these update instructions or codes to update the device's OPROM data. During the boot process, the host (such as UEFI firmware) reads the OPROM update information from the B2H memory space of the BMC 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 so as to load 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, for example, through the OPROM update package preset 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 specifically divided for 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 the 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. In this process, the BMC ensures the consistency and integrity of the data to avoid system instability or startup failure caused by data transmission errors. After completing the update and replacement of the OPROM data, the BMC sends an update completion signal to the UEFI self-check process. In 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, ensuring that the device driver is up to date.
[0094] In this way, users can implement 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 caused by direct intervention in the system startup process. At the same time, it also reflects the important role and potential of BMC in computer system management.
[0095] In summary, refer 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 is not only time-consuming, but also increases the uncertainty in the system startup process. In response to this problem, the present invention creatively proposes an intelligent cache and prediction strategy to efficiently encapsulate and store the PCIE OPROM data read for the first time in a safe and reliable memory area. In the subsequent startup process, the system can directly obtain the required data from this memory area quickly without accessing the physical device again, thereby achieving a significant reduction in the number of accesses and a significant reduction in the loading time. The efficiency of system startup is greatly improved, and many practical benefits are brought to users. First, users can enjoy a faster and smoother boot experience, and there will be no problems such as user experience or slow server service launch due to the long time of loading OPROM. Secondly, since the number of accesses to the physical device is reduced, the present invention also helps to reduce energy consumption and wear during the system startup process and extend the service life of the hardware. In addition, the solution also enhances the overall stability and reliability of the system and reduces errors and failures that may be caused by frequent access to physical devices. From the perspective of the PCIE external device's own firmware, if the user modifies the OPROM and restarts to cause an abnormal crash, the UEFI firmware can then load the normal PCIE OPROM driver from the MMBI space, thereby avoiding system abnormalities.
[0096] Second, please refer to Figure 3 The present invention also provides a device management system, comprising:
[0097] The first acquisition module 11 is used to obtain 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 12 is used to match the information stored in the first preset storage space based on the identification information; 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 option read-only memory data of the device from the first preset storage space in response to a successful match to manage the device; the second loading module 14 is used to load the option read-only memory data of the device from the preset physical storage device in response to a failed match to manage the device, 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 fast-access memory area, 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 at each startup. If the match fails, the option read-only memory data of the device is loaded from the preset physical storage device to perform device management. At the same time, 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. The loading process of the option read-only memory data during the startup process is optimized to reduce the startup time, especially in a system configured with multiple PCIE devices, thereby improving the system startup efficiency and user experience.
[0099] In an exemplary embodiment, the process of loading the device's option read-only memory data from a preset physical storage device includes: in response to the preset physical storage device satisfying a direct access condition, 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 satisfying the direct access condition, creating a memory area that satisfies the direct access condition, copying the device's option read-only memory data 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.
[0100] In an exemplary embodiment, the device management system also includes: a recording module for recording information of loaded devices; an information generation module for generating a current record table based on information of all devices in the current record; and a management module for determining whether there is a deleted device based on a comparison result between the current record table and the previous record table, and if so, deleting the option read-only memory data of the deleted device from the first preset storage space.
[0101] In an exemplary embodiment, the device management system further includes: a first determination module for determining a reference memory space capacity based on the device identified when the computer is first started when the device is in place; and 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 also includes: a third determination module, used to determine the target memory space capacity based on the device 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, the first preset storage space is re-divided 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 a first preset storage space includes: in response to the first preset storage space satisfying a first write 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 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 satisfies the first write condition.
[0105] In an exemplary embodiment, in response to a first preset storage space not satisfying a first 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 so that the first preset storage space satisfies the first write condition. The process includes: in response to the first preset storage space not satisfying the first write condition and the option read-only memory data of the device not satisfying the second write 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 write condition and the option read-only memory data of the device satisfying 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 so that the first preset storage space satisfies the first write 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 equipment management system also includes: a first partitioning module, used to partition a first preset storage space in the memory space of the baseboard management controller; a first configuration module, used to 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.
[0108] In an exemplary embodiment, the equipment 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 the first preset storage space.
[0109] In an exemplary embodiment, the process of obtaining identification information corresponding to a device includes: sending a configuration read / write request to the configuration space of the device to obtain vendor identification information and device identification information corresponding to the device; the identification information includes vendor identification information and 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 a 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 device's option read-only memory data into a first preset storage space includes: calculating a check code of the device's option read-only memory data; encapsulating the check code, 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.
[0112] In an exemplary embodiment, the device management system also includes: a reading module, which is used to read the data packet to be updated stored in the second preset storage space in response to detecting a device firmware update request; and an updating module, which is used 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 equipment management system also includes: a second partitioning module, used to partition a second preset storage space in the memory space of the baseboard management controller; a second configuration module, used to configure the computer host 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 obtains the data packets to be updated in the second preset storage space, determines the data packets to be processed in the first preset storage space, and replaces the data packets to be processed with the data packets to be updated.
[0114] In a third aspect, the present invention further provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the device management method as described in any one of the above items.
[0115] For an introduction to a computer program product provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.
[0116] A computer program product provided by the present invention has the same beneficial effects as the above-mentioned device management method.
[0117] Fourth, please refer to Figure 4The present invention further provides an electronic device, comprising: 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 items when executing the computer program.
[0118] The electronic device also includes: an input interface 23, which is connected to the processor 22 via a communication bus 26, and is used to obtain computer programs, parameters and instructions imported from the outside, and is saved 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 a user. The input device can be a touch layer covered on the display screen, or a key, trackball or touch pad set on the terminal shell. The display unit 24 is connected to the processor 22 via the communication bus 26, and is used to display the data sent by the processor 22. The display unit can be a liquid crystal display or an electronic ink display, etc. The network port 25 is connected to the processor 22 via the communication bus 26, and is used to communicate with various external terminal devices. The communication technology used in the 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, wireless fidelity technology, Bluetooth communication technology, low-power Bluetooth communication technology, communication technology based on IEEE802.11s, etc.
[0119] For an introduction to an electronic device provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.
[0120] The electronic device provided by the present invention has the same beneficial effects as the above-mentioned device management method.
[0121] Fifth, please refer to Figure 5 The present invention further provides a computer-readable storage medium 30, on which a computer program 31 is stored. When the computer program 31 is executed by a processor, the steps of the device management method described in any one of the above items are implemented.
[0122] The computer-readable storage medium 30 may include: a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc., which may store program codes.
[0123] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.
[0124] A computer-readable storage medium provided by the present invention has the same beneficial effects as the above-mentioned device management method.
[0125] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including 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 may 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 rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A device management method, characterized in that: include: During the computer startup process, when a device connected to a target communication bus is identified, identification information corresponding to the device is obtained; Matching is performed 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; In response to successful matching, loading the option read-only memory data of the device from the first preset storage space to manage the device; In response to a match failure, the option read-only memory data of the device is loaded from the preset physical storage device to manage the device, and the option read-only memory data of the device is written into the first preset storage space.
2. The device management method according to claim 1, characterized in that: The process of loading the option read-only memory data of the device from the preset physical storage device comprises: In response to the preset physical storage device satisfying a 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, a memory area satisfying the direct access condition is created, option read-only memory data of the device is copied 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 a device access path is created for the loaded option read-only memory data.
3. The device management method according to claim 1, characterized in that: 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; Generate a current record table based on the information of all the devices recorded in the current time; According to the comparison result of the current record table and the previous record table, determining whether there is a deleted device; If so, 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 in that: 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 identified when the computer is first started when the device is in place; The first preset storage space is divided according to the reference memory space capacity.
5. The device management method according to claim 4, characterized in that: 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 in that: The device management method further includes: Determining a target memory space capacity based on the device 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, 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 in that: The process of writing the option read-only memory data of the device into the first preset storage space comprises: 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, 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 satisfies the first writing condition.
8. The device management method according to claim 7, characterized in that: In response to the first preset storage space not satisfying the first writing 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 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 write condition and the option read-only memory data of the device not satisfying a second write 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 write condition and the option read-only memory data of the device satisfying 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 so that the first preset storage space satisfies the first write 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: determining the option read-only memory data with the longest storage time in the first preset storage space as data to be deleted; and / or, determining the option read-only memory data of the device with the lowest frequency of use in the first preset storage space as data to be deleted; and / or, The smallest option read-only memory data in the first preset storage space is determined as the data to be deleted.
10. The device management method according to claim 1, characterized in that: The device management method further includes: dividing the first preset storage space in the memory space of the baseboard management controller; The baseboard management controller is configured to be in a read-only mode for the first preset storage space, and the host of the computer is configured to be in a 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: Determining a communication interface on the baseboard management controller; An interface mapping relationship between the communication interface and the first preset storage space is established.
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 and 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.
13. The device management method according to claim 1, characterized in that: The process of loading the option read-only memory data of the device from the preset physical storage device comprises: Reading a value of a target register of the device; the target register is used to indicate a physical address of the optional read-only memory data of the device in the preset physical storage device; determining a physical address of the device in the preset physical storage device based on the value of the target register; Loads the option read-only memory data of the device at 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 comprises: Calculate a checksum 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; The data packet is written into the first preset storage space.
15. The device management method according to any one of claims 1 to 14, characterized in that: The device management method further includes: In response to detecting a device firmware update request, reading a to-be-updated data packet stored in a second preset storage space; The data packet to be updated is 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, characterized in that: The device management method further includes: dividing the second preset storage space in the memory space of the baseboard management controller; The host of the computer is configured to be in read-only mode for the second preset storage space, and the baseboard management controller is configured to be in read-write mode for the second preset storage space, so that the baseboard management controller obtains the data packet to be updated in the second preset storage space, determines the data packet to be processed in the first preset storage space, and replaces the data packet to be processed with the data packet to be updated.
17. A device management system, characterized in that: include: A first acquisition module is used to acquire identification information corresponding to a device connected to a target communication bus when the device is identified during the computer startup process; A matching module, configured to match the identification information with information stored in a first preset storage space; an access speed of the first preset storage space being greater than or equal to a memory access speed of a preset physical storage device corresponding to the device; A first loading module, configured to load the option read-only memory data of the device from the first preset storage space in response to a successful match, so as to manage the device; The second loading module is used for, in response to a matching failure, 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.
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 as described in any one of claims 1 to 16 are implemented.
19. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the device management method according to any one of claims 1 to 16 when executing the computer program.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device management method according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
BIOS architecture, self-test method, system, and storage medium
CN109086181A
Method for setting Option ROM type of PCIe equipment
CN110515666A
Method and system for controlling Option Rom execution of PCIE equipment
CN111352663A
Equipment enumeration method and device, computer equipment and storage medium
CN114817105A
Method, system and device for loading network card option ROM (Read Only Memory)
CN115269022A
Cited By
Device management method and system, electronic device, and readable storage medium
WO2026114124A1
