A method, device and storage medium for sharing two non-volatile memories by a BMC system
By dividing the storage area in the BMC system and synchronizing and sharing data, the problem of wasted spare flash resources in dual-flash design is solved, the normal startup and operation of the BMC system is realized, and the resource utilization rate is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZIGUANG HENGYUE TECH CO LTD
- Filing Date
- 2025-04-03
- Publication Date
- 2026-06-02
AI Technical Summary
In existing storage server operation and maintenance systems, when the BMC system adopts a dual-flash design, the utilization rate of the backup flash resources is extremely low, resulting in resource waste.
By dividing the storage area of the BMC system into a synchronization area and a shared area, the core functional data of the primary non-volatile memory and the backup non-volatile memory are synchronized, while application data and runtime data are shared in the shared area, thus rationally storing data from different areas.
It effectively alleviates the resource waste in the process of sharing dual non-volatile memory in the BMC system, ensures that the system can start and run normally when the main non-volatile memory fails, and improves the utilization rate of storage resources.
Smart Images

Figure CN119938410B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage server operation and maintenance, and more specifically, to a method, apparatus, device, and storage medium for sharing dual non-volatile memory in a BMC system. Background Technology
[0002] In existing storage server operation and maintenance systems, the BMC (Management and Control) system typically adopts a dual-flash (non-volatile memory) storage mode, i.e., a primary and a backup design. While this design provides system redundancy, the backup flash is idle during normal operation.
[0003] In the dual-flash solution commonly used in the industry today, the resource utilization rate of the backup flash is extremely low. When the main flash is running stably, the storage space of the backup flash is completely unused, resulting in a waste of resources.
[0004] Therefore, how to alleviate the resource waste during the sharing of dual non-volatile memory in BMC systems is a technical problem that needs to be solved. Summary of the Invention
[0005] The purpose of this application is to provide a method for sharing dual non-volatile memory in a BMC system. The technical solution of this application can alleviate the phenomenon of resource waste during the sharing of dual non-volatile memory in a BMC system.
[0006] In a first aspect, embodiments of this application provide a method for sharing dual non-volatile memory in a BMC system, comprising: dividing the storage area of the BMC system, wherein the storage area includes a synchronization area and a shared area; synchronizing core functional data of the primary non-volatile memory and the backup non-volatile memory through the synchronization area of the storage area, wherein the BMC system simultaneously mounts two memory chips of the primary non-volatile memory and the backup non-volatile memory, and the core functional data includes the operation data of the core functions of the BMC system; and sharing application data and operation data of the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area, wherein the application data and operation data are multiple applications in the BMC system and the operation data corresponding to the multiple applications.
[0007] In the above embodiments, by dividing the storage area of the BMC system, the core functional data of the two non-volatile memories can be synchronized, and application data and running data can be shared in the shared area. Through the storage chip hardware design and the above-mentioned area division method, the security of the shared area data can be guaranteed, and the corresponding data can be stored in different areas in a reasonable manner, thereby alleviating the phenomenon of resource waste in the process of sharing the two non-volatile memories in the BMC system.
[0008] In some embodiments, after sharing application data and runtime data between the primary non-volatile memory and the backup non-volatile memory through a shared area of the storage area, the method further includes: when the primary non-volatile memory is damaged, booting the BMC system through the backup non-volatile memory and sharing the application data and runtime data to the backup non-volatile memory; detecting whether the primary non-volatile memory can be recognized; when the primary non-volatile memory can be recognized, detecting and initializing the first boot area of the primary non-volatile memory and detecting whether the shared area is readable; when the primary non-volatile memory cannot be recognized, issuing a warning of damage to the primary non-volatile memory.
[0009] In the above embodiments, when the primary non-volatile memory is damaged, the BMC system can be started through the boot area of the backup non-volatile memory via synchronized and shared data to prevent the BMC system from failing to boot. Furthermore, when the primary non-volatile memory cannot be identified, a timely warning will be issued to achieve the effect of timely maintenance.
[0010] In some embodiments, the primary non-volatile memory includes a first boot region and a first shared region; the backup non-volatile memory includes a second boot region and a second shared region; the shared region includes a first shared region and a second shared region; and the synchronization region includes a first boot region and a second boot region.
[0011] In the above embodiments, by dividing the main non-volatile memory into the aforementioned regions, the functional program data and application program data at BMC startup can be stored reasonably.
[0012] In some embodiments, the core functional data of the primary non-volatile memory and the backup non-volatile memory are synchronized through the synchronization area of the storage area, including: when the primary non-volatile memory is damaged, synchronizing the core functional data in the first boot area of the primary non-volatile memory to the second boot area of the backup non-volatile memory.
[0013] In the above embodiments, by synchronizing the core function data, this application can ensure that the BMC system can start normally and enable the main core functions when the main non-volatile memory is damaged.
[0014] In some embodiments, application data and runtime data of a primary non-volatile memory and a backup non-volatile memory are shared through a shared area of the storage area, including: in the event of failure of the primary non-volatile memory, sharing the application data and runtime data of the primary non-volatile memory to a second shared area of the backup non-volatile memory.
[0015] In the above embodiments, by sharing application data and runtime data, this application ensures that the BMC system can operate normally and start the main applications when the main non-volatile memory is damaged.
[0016] In some embodiments, the core functional data of the primary non-volatile memory and the backup non-volatile memory are synchronized through the synchronization area of the storage area, including: synchronizing the core functional data stored in the synchronization area when the BMC system was last started to the primary non-volatile memory and the backup non-volatile memory of the current BMC system.
[0017] In the above embodiments, this application can also synchronize the core function data used when the BMC system was last started to the main non-volatile memory and the backup non-volatile memory of the current BMC system, so as to quickly obtain the core function data of the BMC and start the relevant functions.
[0018] In some embodiments, after sharing application data and runtime data between the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area, the method further includes: when the shared area of the primary non-volatile memory is full, storing the remaining application data and runtime data to the end area of the shared area of the backup non-volatile memory.
[0019] In the above embodiments, this application can store excess data from the primary non-volatile memory to the end region of the shared area of the backup non-volatile memory, ensuring the normal storage of subsequent data in the backup non-volatile memory while achieving the effect of making reasonable use of storage space.
[0020] Secondly, embodiments of this application provide a device for sharing dual non-volatile memories in a BMC system, comprising:
[0021] The region partitioning module is used to partition the storage regions of the BMC system, which include a synchronization region and a shared region.
[0022] The synchronization module is used to synchronize the core functional data of the primary non-volatile memory and the backup non-volatile memory through the synchronization area of the storage area. The BMC system simultaneously mounts two storage chips, the primary non-volatile memory and the backup non-volatile memory. The core functional data includes the operating data of the core functions of the BMC system.
[0023] The shared module is used to share application data and runtime data of the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area. The application data and runtime data are multiple applications in the BMC system and the runtime data corresponding to multiple applications.
[0024] Optionally, the device further includes:
[0025] The early warning module is used so that, after the shared module shares application data and running data with the main non-volatile memory and the backup non-volatile memory through the shared area of the storage area, when the main non-volatile memory is damaged, it can start the BMC system through the backup non-volatile memory and share the application data and running data to the backup non-volatile memory.
[0026] Test whether the main non-volatile memory can be recognized;
[0027] When the primary non-volatile memory is recognizable, the first boot region of the primary non-volatile memory is detected and initialized, and the shared region is detected as readable.
[0028] A warning is issued when the primary non-volatile memory cannot be recognized, indicating damage to the primary non-volatile memory.
[0029] Optionally, the primary non-volatile memory includes a first boot region and a first shared region;
[0030] The backup non-volatile memory includes a second boot region and a second shared region;
[0031] The shared area includes a first shared area and a second shared area;
[0032] The synchronization area includes the first startup area and the second startup area.
[0033] Optionally, the synchronization module is specifically used for:
[0034] In the event of failure of the primary non-volatile memory, the core functional data in the first boot area of the primary non-volatile memory is synchronized to the second boot area of the backup non-volatile memory.
[0035] Optionally, the shared module is specifically used for:
[0036] In the event of primary non-volatile memory failure, application data and runtime data shared with the primary non-volatile memory are transferred to a second shared area of the backup non-volatile memory.
[0037] Optionally, the synchronization module is specifically used for:
[0038] The core functional data stored in the synchronization area during the last BMC system startup will be synchronized to the main non-volatile memory and backup non-volatile memory of the current BMC system.
[0039] Optionally, the device further includes:
[0040] A storage module is provided for the shared module to store the remaining application data and runtime data in the end area of the shared area of the backup non-volatile memory after sharing application data and runtime data in the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area.
[0041] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method provided in the first aspect above are performed.
[0042] Fourthly, embodiments of this application provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the first aspect above.
[0043] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A flowchart illustrating a method for sharing dual non-volatile memory in a BMC system, provided as an embodiment of this application;
[0046] Figure 2 A schematic diagram illustrating the space utilization principle of a BMC system provided in this application embodiment;
[0047] Figure 3 A flowchart illustrating an implementation method for sharing dual non-volatile memories in a BMC system, provided as an embodiment of this application;
[0048] Figure 4 A schematic block diagram of a device for sharing dual non-volatile memories in a BMC system, provided as an embodiment of this application;
[0049] Figure 5 This is a schematic block diagram of a device for sharing dual non-volatile memories in a BMC system, provided as an embodiment of this application. Detailed Implementation
[0050] 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, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0051] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0052] First, some of the terms used in the embodiments of this application will be explained to facilitate understanding by those skilled in the art.
[0053] A Baseboard Management Controller (BMC) system is a dedicated controller for monitoring and managing servers. It is independent of the server's operating system and hardware, providing an access interface via the Intelligent Platform Management Interface (IPMI) protocol.
[0054] Flash memory (non-volatile memory) is a type of non-volatile memory used to store data and programs. It uses electronic methods for reading and writing, offering fast access speeds and high reliability.
[0055] This application is applied to scenarios where storage servers are used. Specifically, by dividing the storage server, the data of the BMC system is stored in different areas of the storage server, ensuring that different flash memory within the BMC system can enable the operation of the BMC system and the reasonable storage of resources.
[0056] However, in current storage server operation and maintenance systems, the BMC (Management and Control) system typically adopts a dual-flash (non-volatile memory) storage mode, i.e., a primary and a backup design. While this design provides system redundancy, the backup flash is idle during normal operation. In the currently prevalent dual-flash solutions in the industry, the resource utilization rate of the backup flash is extremely low. When the primary flash is running stably, the storage space of the backup flash is completely unused, resulting in resource waste.
[0057] To address this issue, this application divides the storage area of the Management Controller (BMC) system, including a synchronization area and a shared area. The synchronization area synchronizes the core functional data of the primary and backup non-volatile memory (NVOMCs). The BMC system simultaneously mounts two memory chips for both the primary and backup NVOMCs, and the core functional data includes the operational data of the BMC system's core functions. The shared area shares application and operational data between the primary and backup NVOMCs. This application and operational data comprises multiple applications within the BMC system and their corresponding operational data. By dividing the BMC system's storage areas, the core functional data of the two NVOMCs can be synchronized, while application and operational data can be shared in the shared area. Through the memory chip hardware design and the aforementioned area division method, the security of data in the shared area can be ensured, and different areas can rationally store corresponding data, thus mitigating resource waste during the sharing of dual NVOMCs in the BMC system.
[0058] In this embodiment of the application, the executing entity can be the BMC system dual non-volatile memory sharing device in the BMC system dual non-volatile memory sharing system. In practical applications, the BMC system dual non-volatile memory sharing device can be electronic devices such as terminal devices and servers, and there are no restrictions here.
[0059] The following is combined with Figure 1 The method for sharing dual non-volatile memory in a BMC system according to embodiments of this application will be described in detail.
[0060] Please refer to Figure 1 , Figure 1 A flowchart illustrating a method for sharing dual non-volatile memory in a BMC system, as provided in this application embodiment, is shown below. Figure 1 The method for sharing dual non-volatile memory in the BMC system shown includes:
[0061] Step 110: Allocate storage areas for the BMC (Bureau Management Controller) system.
[0062] The storage area includes a synchronization area and a shared area. The BMC system simultaneously mounts two memory chips: a primary non-volatile memory and a backup non-volatile memory. The BMC system chip supports two SPI (Serial Peripheral) interfaces, ensuring that both memory chips can be powered on and mounted to the system simultaneously. The BMC system uses both SPI buses to guarantee that the two memory chips are powered on simultaneously and that both memory chip areas are visible within the BMC system. During system operation, software is relied upon to distinguish and access different flash areas.
[0063] In some embodiments of this application, the primary non-volatile memory includes a first boot region and a first shared region; the backup non-volatile memory includes a second boot region and a second shared region; the shared region includes a first shared region and a second shared region; and the synchronization region includes a first boot region and a second boot region.
[0064] In the above embodiments, by dividing the main non-volatile memory into the aforementioned regions, the functional program data and application program data at BMC startup can be stored reasonably.
[0065] Optionally, the first and second startup areas can form a first-level synchronization area, which can be used to start the BMC system. Alternatively, a separate storage area can be allocated as a second-level synchronization area to store some of the BMC system's configuration programs and program execution data; the specific configuration programs can be configured according to requirements.
[0066] The first-level synchronization area is the boot area for the BMC system's primary and backup flash memory (primary non-volatile memory and backup non-volatile memory). This area cannot be modified and serves as the initial program area for booting from the primary and backup flash memory. The second-level synchronization area stores all critical function programs and data, ensuring that even if one flash memory fails, a complete backup remains on the other, guaranteeing that the system's core functions are not lost. The separate boot area design for the primary and backup flash memory ensures that the system can still boot and run its core functions normally even if one flash memory fails. The design of the synchronization area ensures the security of critical data; even if one flash memory fails, a complete backup remains on the other.
[0067] Optionally, BMC system space usage can be controlled via... Figure 2 The specific principle diagram shown is described in detail.
[0068] Please refer to Figure 2 , Figure 2 This application provides a schematic diagram of the space usage principle of a BMC system. The system space usage principle shown in the figure includes:
[0069] The BMC system and its internal dual flash spaces (primary non-volatile memory flash0 and backup non-volatile memory flash1).
[0070] flash0 includes a first boot area, a first synchronization area, and a shared area.
[0071] flash1 includes a second boot area, a second synchronization area, and the shared area.
[0072] Both flash memory modules have a fixed, identical read-only area. This area serves as the BMC system boot area and data synchronization area. If the currently running BMC system malfunctions, it boots from the backup flash memory without affecting the other system. The newly booted BMC reads data from the BMC data synchronization area, synchronizing some state data from the previously malfunctioning BMC or data from the main flash synchronization area, ensuring that some BMC services can continue operating. The first and second boot areas contain the bootloader, the BMC kernel, and the root file system.
[0073] The BMC system running program shared area is a shared area between two flash running programs, which includes all areas except the startup area and the data synchronization area. This area is actually divided into two parts, such as 0 and 1. When the program runs, it can choose to save data in area 0 or area 1. Either area can store data of some commonly used applications, cache data, or log data, etc. If the data is lost, it will not affect the re-collection of the relevant data.
[0074] also, Figure 2 The specific space usage principle of the BMC system shown can be understood through... Figure 1 The specific methods and steps shown will not be elaborated further here.
[0075] Step 120: Synchronize the core functional data of the primary non-volatile memory and the backup non-volatile memory through the synchronization area of the storage area.
[0076] The BMC system simultaneously mounts two memory chips: a primary non-volatile memory and a backup non-volatile memory. The core functional data stored in both the primary and backup non-volatile memories includes the operational data of the BMC system's core functions. The core functions can be determined based on the specific functions of the BMC system.
[0077] In some embodiments of this application, the core functional data of the primary non-volatile memory and the backup non-volatile memory are synchronized through the synchronization area of the storage area, including: when the primary non-volatile memory is damaged, synchronizing the core functional data in the first startup area of the primary non-volatile memory to the second startup area of the backup non-volatile memory.
[0078] In the above process, by synchronizing the core functional data, this application can ensure that the BMC system can start normally and enable the main core functions when the main non-volatile memory is damaged.
[0079] Specifically, the core functional data in the first boot area of the primary non-volatile memory can be directly copied to the second boot area of the backup non-volatile memory using a replication backup method, or the core functional data can be backed up to the cloud and then downloaded from the cloud storage to the second boot area of the backup non-volatile memory.
[0080] In some embodiments of this application, the core functional data of the primary non-volatile memory and the backup non-volatile memory are synchronized through the synchronization area of the storage area, including: synchronizing the core functional data stored in the synchronization area when the BMC system was last started to the primary non-volatile memory and the backup non-volatile memory of the current BMC system.
[0081] In the above process, this application can also synchronize the core function data used when the BMC system was last started to the main non-volatile memory and backup non-volatile memory of the current BMC system, so as to quickly obtain the core function data of BMC and start the relevant functions.
[0082] Synchronization can be achieved through copying and backup.
[0083] Step 130: Share application data and runtime data in the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area.
[0084] Among them, application data and runtime data refer to multiple applications in the BMC system and the runtime data corresponding to multiple applications.
[0085] In some embodiments of this application, application data and runtime data of the primary non-volatile memory and the backup non-volatile memory are shared through a shared area of the storage area, including: when the primary non-volatile memory is damaged, sharing the application data and runtime data of the primary non-volatile memory to a second shared area of the backup non-volatile memory.
[0086] In the above process, by sharing application data and runtime data, this application ensures that the BMC system can operate normally and start the main application when the main non-volatile memory is damaged.
[0087] The second shared region and the first shared region can be combined into one shared region, which can be stored in the shared region when application data and runtime data are stored in the main non-volatile memory.
[0088] In some embodiments of this application, after sharing application data and runtime data between the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area, the method further includes: when the primary non-volatile memory is damaged, starting the BMC system through the backup non-volatile memory and sharing the application data and runtime data to the backup non-volatile memory; detecting whether the primary non-volatile memory can be recognized; when the primary non-volatile memory can be recognized, detecting and initializing the first boot area of the primary non-volatile memory and detecting whether the shared area is readable; when the primary non-volatile memory cannot be recognized, issuing a warning of damage to the primary non-volatile memory.
[0089] In the above process, when the main non-volatile memory is damaged, the BMC system can be started through the boot area of the backup non-volatile memory by synchronizing and sharing data, which can prevent the BMC system from failing to boot. When the main non-volatile memory cannot be identified, a warning will be issued in time to achieve the effect of timely maintenance.
[0090] The early warning process includes information such as the time and location of the damage.
[0091] In some embodiments of this application, after sharing application data and runtime data between the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area, the method further includes: when the shared area of the primary non-volatile memory is full, storing the remaining application data and runtime data to the end area of the shared area of the backup non-volatile memory.
[0092] In the above process, this application can store excess data from the main non-volatile memory to the end area of the shared region of the backup non-volatile memory, ensuring the normal storage of subsequent data in the backup non-volatile memory while achieving the effect of making reasonable use of storage space.
[0093] The BMC system includes various applications and their corresponding application data. Prioritizing the storage of these applications and their data in the shared area of the primary non-volatile memory, data is then transferred to the shared area of the backup non-volatile memory when the primary non-volatile memory's shared area is full. Larger log files are consistently stored at the end of the backup non-volatile memory's shared area to ensure real-time storage of large files. This method of storing applications and data significantly improves the utilization of storage resources.
[0094] In the above Figure 1 In the process illustrated, this application divides the storage area of the Management Controller (BMC) system, including a synchronization area and a shared area. Through the synchronization area, core functional data of the primary non-volatile memory and the backup non-volatile memory are synchronized. The BMC system simultaneously mounts two memory chips for the primary and backup non-volatile memories. The core functional data includes the operational data of the BMC system's core functions. Through the shared area, application data and operational data of the primary and backup non-volatile memories are shared. This application data and operational data comprises multiple applications within the BMC system and their corresponding operational data. By dividing the BMC system's storage area, the core functional data of the two non-volatile memories can be synchronized, while application data and operational data can be shared in the shared area. Through the memory chip hardware design and the aforementioned area division method, the security of data in the shared area can be ensured, and different areas can rationally store corresponding data, thus mitigating resource waste during the sharing of dual non-volatile memories in the BMC system.
[0095] The following is combined with Figure 3 The implementation method of sharing dual non-volatile memory in the BMC system according to the embodiments of this application will be described in detail.
[0096] Please refer to Figure 3 , Figure 3 A flowchart illustrating an implementation method for sharing dual non-volatile memory in a BMC system, as provided in this application embodiment, is shown below. Figure 3 The implementation method of sharing dual non-volatile memory in the BMC system shown includes:
[0097] The BMC system includes two flash spaces (primary non-volatile memory flash0 and backup non-volatile memory flash1).
[0098] When flash0 is damaged, BMC boots from flash1 and checks whether flash0 can be recognized. If it cannot, it means that the flash0 chip is damaged and cannot be loaded. It skips loading part of the program from flash0 and starts BMC normally.
[0099] When flash0 can be recognized, it indicates that the flash0 indicator boot area of BMC is damaged. Load flash0 to start, initialize BMC flash0. When BMC finishes booting and the application runs normally, check whether the data in the flash0 shared area is readable and writable.
[0100] When the data in the flash0 shared area can be read and written normally, the BMC system is running normally and will alarm that the BMC flash0 boot area is damaged and needs to be repaired.
[0101] When the shared area data of flash0 cannot be read or written normally, unload flash0.
[0102] also, Figure 3 The specific methods and steps shown can be found in [reference]. Figure 1 The method shown will not be elaborated further here.
[0103] The previous text passed Figure 1 , Figure 3 The method for sharing dual non-volatile memory in a BMC system is described below. Figures 4-5 Describes a device for sharing dual nonvolatile memories in a BMC system.
[0104] Please refer to Figure 4 This is a schematic block diagram of a device 400 for sharing dual non-volatile memory in a BMC system, provided in an embodiment of this application. The device 400 can be a module, program segment, or code on an electronic device. This device 400 is related to the above... Figure 1 The method implementation corresponds to this and can be executed. Figure 1 The various steps involved in the method embodiment, and the specific functions of the device 400, can be found in the following description. To avoid repetition, detailed descriptions are omitted here.
[0105] Optionally, the device 400 includes:
[0106] The region partitioning module 410 is used to partition the storage regions of the management controller (BMC) system, wherein the storage regions include a synchronization region and a shared region.
[0107] Synchronization module 420 is used to synchronize the core functional data of the primary non-volatile memory and the backup non-volatile memory through the synchronization area of the storage area. The BMC system simultaneously mounts two storage chips, the primary non-volatile memory and the backup non-volatile memory. The core functional data includes the operating data of the core functions of the BMC system.
[0108] The sharing module 430 is used to share application data and runtime data of the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area. The application data and runtime data are multiple applications in the BMC system and the runtime data corresponding to the multiple applications.
[0109] Optionally, the device further includes:
[0110] The early warning module is used by the sharing module to, after sharing application data and runtime data between the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area, start the BMC system through the backup non-volatile memory when the primary non-volatile memory is damaged, and share the application data and runtime data to the backup non-volatile memory; detect whether the primary non-volatile memory can be recognized; when the primary non-volatile memory can be recognized, detect and initialize the first boot area of the primary non-volatile memory, and detect whether the shared area is readable; when the primary non-volatile memory cannot be recognized, issue an early warning of damage to the primary non-volatile memory.
[0111] Optionally, the primary non-volatile memory includes a first boot region and a first shared region;
[0112] The backup non-volatile memory includes a second boot region and a second shared region; the shared region includes a first shared region and a second shared region; the synchronization region includes a first boot region and a second boot region.
[0113] Optionally, the synchronization module is specifically used for:
[0114] In the event of failure of the primary non-volatile memory, the core functional data in the first boot area of the primary non-volatile memory is synchronized to the second boot area of the backup non-volatile memory.
[0115] Optionally, the shared module is specifically used for:
[0116] In the event of primary non-volatile memory failure, application data and runtime data shared with the primary non-volatile memory are transferred to a second shared area of the backup non-volatile memory.
[0117] Optionally, the synchronization module is specifically used for:
[0118] The core functional data stored in the synchronization area during the last BMC system startup will be synchronized to the main non-volatile memory and backup non-volatile memory of the current BMC system.
[0119] Optionally, the device further includes:
[0120] A storage module is provided for the shared module to store the remaining application data and runtime data in the end area of the shared area of the backup non-volatile memory after sharing application data and runtime data in the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area.
[0121] Please refer to Figure 5 This is a schematic block diagram of a device for sharing dual non-volatile memories in a BMC system, as provided in an embodiment of this application. The device may include a memory 510 and a processor 520. Optionally, the device may further include a communication interface 530 and a communication bus 540. This device is similar to the one described above. Figure 1 The method implementation corresponds to this and can be executed. Figure 1 The specific functions of the device involved in the method embodiments can be found in the following description.
[0122] Specifically, memory 510 is used to store computer-readable instructions.
[0123] Processor 520 is used to process readable instructions stored in memory and is capable of executing... Figure 1 Each step in the method.
[0124] The communication interface 530 is used for signaling or data communication with other node devices. For example, it is used for communication with a server or terminal, or for communication with other device nodes, but the embodiments of this application are not limited thereto.
[0125] Communication bus 540 is used to enable direct communication between the above components.
[0126] In this embodiment, the communication interface 530 of the device is used for signaling or data communication with other node devices. The memory 510 can be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 510 can also be at least one storage device located remotely from the aforementioned processor. The memory 510 stores computer-readable instructions, which, when executed by the processor 520, enable the electronic device to perform the aforementioned... Figure 1The method process is shown. The processor 520 can be used on the device 400 and is used to perform the functions in this application. Exemplarily, the processor 520 described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, and the embodiments of this application are not limited thereto.
[0127] This application embodiment also provides a readable storage medium, wherein when the computer program is executed by a processor, it performs the following... Figure 1 The method process executed by the electronic device in the illustrated method embodiment.
[0128] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0129] In summary, this application provides a method, apparatus, device, and storage medium for sharing dual non-volatile memories in a BMC system. The method includes dividing the storage areas of the BMC system, synchronizing core functional data between the primary and backup non-volatile memories, and sharing application and runtime data between the primary and backup non-volatile memories through a shared area of the storage areas. This method can alleviate resource waste during the sharing of dual non-volatile memories in a BMC system.
[0130] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0131] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0132] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0133] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0135] It should be noted that, in this document, 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. Without further limitations, 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 said element.
Claims
1. A method for sharing dual non-volatile memories in a BMC system, characterized in that, Devices used in BMC systems with shared dual non-volatile memory include: The storage area of the BMC system is divided into a synchronization area and a shared area. The shared area is a shared area between two dual non-volatile flash memories for running programs. It includes all areas except the startup area and the data synchronization area. It is divided into two parts. When the program runs, it can choose to save the data in area 0 or area 1. Through the synchronization area of the storage area, the core functional data of the primary non-volatile memory and the backup non-volatile memory are synchronized. The BMC system simultaneously connects two memory chips of the primary non-volatile memory and the backup non-volatile memory. The BMC system chip supports two serial peripheral interfaces to ensure that the two memory chips can be powered on and connected to the system at the same time. The core functional data includes the operating data of the core functions of the BMC system. Through the shared area of the storage area, application data and runtime data of the main non-volatile memory and the backup non-volatile memory are shared, wherein the application data and runtime data are multiple applications in the BMC system and the runtime data corresponding to the multiple applications; The main non-volatile memory includes a first boot region, a first synchronization region, and a first shared region; The backup non-volatile memory includes a second boot region, a second synchronization region, and a second shared region; The shared area includes the first shared area and the second shared area; The synchronization region includes the first startup region and the second startup region; The first startup region and the second startup region constitute a first-level synchronization region for starting the BMC system.
2. The method according to claim 1, characterized in that, After sharing application data and runtime data of the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area, the method further includes: When the primary non-volatile memory fails, the BMC system is started through the backup non-volatile memory, and the application data and the runtime data are shared to the backup non-volatile memory. Detect whether the primary non-volatile memory can be recognized; When the primary non-volatile memory is recognizable, the first boot region of the primary non-volatile memory is detected and initialized, and the shared region is detected as readable. When the primary non-volatile memory cannot be recognized, a warning of damage to the primary non-volatile memory is issued.
3. The method according to claim 2, characterized in that, The synchronization of core functional data between the primary non-volatile memory and the backup non-volatile memory through the synchronization area of the storage area includes: When the primary non-volatile memory fails, the core function data in the first boot area of the primary non-volatile memory is synchronized to the second boot area of the backup non-volatile memory.
4. The method according to claim 3, characterized in that, The sharing of application data and runtime data between the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area includes: In the event of failure of the primary non-volatile memory, the application data and runtime data of the primary non-volatile memory are shared to a second shared area of the backup non-volatile memory.
5. The method according to any one of claims 1-4, characterized in that, The synchronization of core functional data between the primary non-volatile memory and the backup non-volatile memory through the synchronization area of the storage area includes: The core functional data stored in the synchronization area during the last startup of the BMC system will be synchronized to the main non-volatile memory and the backup non-volatile memory of the current BMC system.
6. The method according to any one of claims 1-4, characterized in that, After sharing application data and runtime data of the primary non-volatile memory and the backup non-volatile memory through the shared area of the storage area, the method further includes: When the shared area of the primary non-volatile memory is full, the remaining application data and runtime data are stored in the end area of the shared area of the backup non-volatile memory.
7. A device for sharing dual non-volatile memories in a BMC system, characterized in that, Devices used in BMC systems with shared dual non-volatile memory include: The area partitioning module is used to partition the storage area of the management controller (BMC) system. The storage area includes a synchronization area and a shared area. The shared area is a shared area between two dual non-volatile flash memories for running programs. It includes all areas except the startup area and the data synchronization area. It is divided into two parts. When the program runs, it can choose to save the data in area 0 or area 1. The synchronization module is used to synchronize the core functional data of the primary non-volatile memory and the backup non-volatile memory through the synchronization area of the storage area. The BMC system simultaneously connects two memory chips of the primary non-volatile memory and the backup non-volatile memory. The BMC system chip supports two serial peripheral interfaces to ensure that the two memory chips can be powered on and connected to the system at the same time. The core functional data includes the operating data of the core functions of the BMC system. A sharing module is used to share application data and runtime data of the main non-volatile memory and the backup non-volatile memory through the shared area of the storage area, wherein the application data and runtime data are multiple applications in the BMC system and runtime data corresponding to the multiple applications; The main non-volatile memory includes a first boot region, a first synchronization region, and a first shared region; The backup non-volatile memory includes a second boot region, a second synchronization region, and a second shared region; The shared area includes the first shared area and the second shared area; The synchronization region includes the first startup region and the second startup region; The first startup region and the second startup region constitute a first-level synchronization region for starting the BMC system.
8. An electronic device, characterized in that, include: A memory and a processor, the memory storing computer-readable instructions that, when executed by the processor, perform the steps of the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, include: A computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-6.