A dynamic data area sharing system and method for Flash chips

By dividing the SPI Flash into a dynamic shared memory area and adopting the BIOS core framework and shared memory components, the problem of limited BIOS storage space is solved, and unified management of BIOS backup and log recording is achieved, ensuring the stability and reliability of the system.

CN114510375BActive Publication Date: 2026-03-06KUNLUN TECH (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

The existing BIOS is stored in the SPI Flash chip, which has limited space, resulting in scattered and disorganized data storage areas. After the upgrade, the system cannot boot, and there is a lack of effective backup and logging mechanisms, making it difficult to quickly locate the defect.

Method used

By dividing the SPI Flash into a dynamic shared memory area, and using the BIOS core framework to load the shared memory components, including the policy module, the logging module, and the backup and recovery module, dynamic management of BIOS backup and logging is achieved, and data is stored in the shared memory area using the flashing module.

Benefits of technology

It enables BIOS backup and logging within limited storage space, solves the problem of scattered storage areas, ensures normal boot after upgrade, and provides a mechanism for rapid BIOS defect location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510375B_ABST
    Figure CN114510375B_ABST
Patent Text Reader

Abstract

This invention discloses a dynamic data area sharing system and method for Flash chips, belonging to the field of computer firmware technology. The system includes a BIOS core framework, a shared storage component, and a dynamic shared storage area. The BIOS loads and runs the shared storage component through the BIOS core framework. The shared storage component can dynamically use the shared storage area according to the needs of the current computer boot, performing BIOS upgrade backups and BIOS log recording. This invention solves the problem of BIOS backup and BIOS log storage by dynamically dividing the SPI Flash memory into a storage area when the BIOS space on the computer motherboard is limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer firmware technology, specifically relating to a unified management and sharing system and method for Flash chip data areas. Background Technology

[0002] The BIOS is used to initialize the computer's processor platform and load the operating system. Its basic functions include: after the hardware platform is powered on, it gains control of the system, initializes key components such as the processor, memory, and chipset, enumerates peripherals and allocates resources to them, initializes necessary peripherals such as graphics cards, hard drives, and network cards, establishes the operating environment for the operating system, and then hands over control to the operating system.

[0003] Existing BIOSes are typically stored in SPI Flash chips, with a storage space ranging from 1 to 32 megabytes. This extremely limited data storage leads to the following three problems:

[0004] 1. The data storage area is scattered and disorganized. Taking the Phytium platform as an example: the file size of the Phytium header file is not fixed, which leads to the SMBIOS information being not fixed in the Flash layout map. At the same time, there is a discontinuity in the layout between the variable area and SMBIOS, which makes it impossible to adopt a unified Flash Map layout design. The manifestation is that the overall Flash Map layout is scattered and disorganized.

[0005] 2. In designs where there is no backup BIOS firmware, there is a problem where the device cannot boot after an upgrade, affecting user experience.

[0006] 3. When there are design flaws in the firmware, they may not be detected during the testing phase due to incomplete testing environment coverage. When customers trigger exceptions, they cannot accurately provide feedback on what they did, making it difficult for developers to quickly locate and resolve the issues. Summary of the Invention

[0007] In view of this, the present invention provides a dynamic sharing system and method for Flash chip data areas, which can solve the problem of BIOS storage of BIOS backup and BIOS log by dividing the SPI Flash into dynamic storage areas when the space of the computer motherboard BIOS is limited.

[0008] A dynamic data area sharing system for a Flash chip is disclosed. The system includes a BIOS core framework, a shared storage component, and a dynamic shared storage area. The BIOS loads and runs the shared storage component through the BIOS core framework. The shared storage component can dynamically use the shared storage area according to the needs of the current computer boot, and perform BIOS upgrade backup and BIOS log recording.

[0009] Furthermore, the shared storage component includes a policy module, a log recording module, a backup and recovery module, and a flashing module; the policy module, log recording module, backup and recovery module, and flashing module are loaded and run through the BIOS core framework; during BIOS operation, the BIOS will back up the BIOS or record BIOS logs according to the current policy in the policy module; the backup and recovery module can call the flashing module to store the BIOS backup image in the dynamic storage area; the log recording module can call the flashing module to store the BIOS logs in the dynamic shared storage area.

[0010] Furthermore, the strategy module is used to customize the write operation type for data in the dynamic shared storage area. For example, it determines whether to perform log storage or backup operations.

[0011] Furthermore, the log module is used to perform log storage operations, writing log information into the dynamic shared storage area in a certain format through the flush module.

[0012] Furthermore, the backup and recovery module is used to perform the operation of storing the current BIOS image, which will write the current BIOS image to the dynamic shared storage area.

[0013] Furthermore, the write module is used to write data to the dynamic shared storage area.

[0014] Furthermore, the dynamic shared memory area is a dedicated area allocated from the SPI Flash to dynamically store BIOS-related information, such as BIOS logs and BIOS backup data. The type of information stored is controlled by the policy module.

[0015] A method for dynamically sharing data areas in a Flash chip, the implementation of which includes the following steps:

[0016] Step 1: The computer is powered on and the BIOS starts. The BIOS starts and loads the policy module in the Dynamic Shared Memory component.

[0017] Step 2: Determine whether to perform a BIOS upgrade backup operation. If yes, proceed to the next step; otherwise, proceed to Step 4.

[0018] Step 3: The BIOS will invoke the backup and recovery module to perform a BIOS upgrade backup operation, and the process will end.

[0019] Step 4: Determine whether to perform a BIOS recovery backup operation. If yes, proceed to the next step; otherwise, proceed to step 6.

[0020] Step 5: The BIOS will invoke the backup and recovery module to perform a BIOS backup and recovery operation, then restart the computer. The process is now complete.

[0021] Step Six: Determine whether to perform BIOS log recording. If yes, proceed to the next step; otherwise, proceed to Step Eight.

[0022] Step 7: The BIOS will invoke the logging module to perform BIOS logging operations;

[0023] Step eight, process complete.

[0024] Furthermore, the BIOS upgrade backup operation in step three includes the following steps:

[0025] Step 1: Write the status variables of this upgrade backup operation into the BIOS variable area;

[0026] Step 2: Identify the file system of the BIOS dynamic shared storage area and confirm the available space size;

[0027] Step 3: Read the BIOS area to be backed up and check the backup data size;

[0028] Step 4: Check if the size of the BIOS dynamic shared memory area is sufficient. If yes, proceed to the next step; otherwise, display an error message and end the process.

[0029] Step 5: Clear the BIOS dynamic shared memory area;

[0030] Step 6: Write the BIOS backup image to the dynamic shared storage area.

[0031] Furthermore, the BIOS backup and recovery operation in step five includes the following steps:

[0032] Step 1: The BIOS calls the backup and recovery module to check if the BIOS backup in the dynamic shared storage area is complete. If it is, proceed to the next step; otherwise, prompt that the backup reading failed and end the process.

[0033] Step 2: The BIOS reads the BIOS backup from the dynamic shared area;

[0034] Step 3: Write the BIOS backup to the specified area of ​​the SPI Flash to complete the BIOS backup and recovery.

[0035] Furthermore, the BIOS log recording operation in the aforementioned steps includes the following steps:

[0036] Step 1: Determine if the last operation was a log recording operation. If yes, proceed to the next step; otherwise, clear the dynamic shared area and proceed to the next step.

[0037] Step 2: Write the status variables of this BIOS log recording operation into the BIOS variable area;

[0038] Step 3: Determine if the dynamic shared storage space is sufficient. If so, write the BIOS log sequentially in the dynamic shared area. If not, write the BIOS log in a cyclic manner.

[0039] Furthermore, the strategy module defines variables for the types of dynamic shared area operations that can be performed and the type of the last operation. For example, operation types include BIOS backup operations and BIOS log writing. The variable for the last operation type is used in subsequent operations to determine whether the dynamic shared area needs to be cleared.

[0040] Beneficial effects:

[0041] 1. This invention can solve the problem of limited space in BIOS memory chips. This method, by dividing a dynamically shared memory area within the SPI Flash, allows BIOS backup and recovery, and BIOS log recording to be performed at different times and according to different needs within the same limited memory area. This reuses the dynamically shared memory area and meets the storage requirements of various BIOS applications.

[0042] 2. This invention can back up the BIOS image before the BIOS upgrade even when the BIOS storage chip space is small. It can also actively restore to the previous version and achieve normal boot when the user experiences a boot failure for the first time after the upgrade.

[0043] 3. This invention can provide BIOS log storage to prevent the inability to locate BIOS defects due to the lack of BIOS logs. Attached Figure Description

[0044] Figure 1 This is a framework diagram of a dynamic data area sharing system for Flash chips.

[0045] Figure 2 Flowchart of the method for dynamic sharing of data areas in Flash chips. Detailed Implementation

[0046] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0047] This invention provides a dynamic data area sharing system for Flash chips, as shown in the attached figure. Figure 1As shown, the system includes a BIOS core framework, a shared storage component, and a dynamic shared storage area. The shared storage component includes a policy module, a log recording module, a backup and recovery module, and a flashing module. The dynamic shared storage area is a specially allocated area from the SPI Flash, used to dynamically store BIOS-related information, such as BIOS logs and BIOS backup data. The type of information stored is controlled by the policy module.

[0048] The policy module, logging module, backup and recovery module, and flashing module are loaded and run through the BIOS core framework. During BIOS operation, the BIOS will back up the BIOS or record BIOS logs according to the current policy in the policy module. The backup and recovery module can call the flashing module to store the BIOS backup image in the dynamic storage area. The logging module can call the flashing module to store the BIOS logs in the dynamic shared storage area.

[0049] The strategy module is used to customize the write operation type for data in the dynamic shared memory area. For example, it determines whether to perform log storage or backup operations. The log module performs log storage operations, writing log information to the dynamic shared memory area according to a specific format via the flash module. The backup and recovery module performs the current BIOS image storage operation, writing the current BIOS image to the dynamic shared memory area. The flash module performs the data flashing operation to the dynamic shared memory area.

[0050] As attached Figure 2 As shown, the main steps of dynamic sharing of Flash chip data areas are explained in detail through the BIOS backup and recovery process of the Loongson platform:

[0051] Step 1: The computer powers on and boots into the BIOS. The BIOS loads the policy module from the Loongson platform's dynamic shared storage component. This policy module defines the types of dynamic shared area operations and the previous operation type. For example, operation types include BIOS backup and BIOS log writing. The variable for the previous operation type is used in subsequent operations to determine whether the dynamic shared area needs to be cleared.

[0052] Step 2: Determine whether to perform a BIOS upgrade and backup operation on the Loongson platform. If yes, proceed to the next step; otherwise, proceed to step 9.

[0053] Step 3: Write the status variables of this upgrade backup operation into the BIOS variable area.

[0054] Step 4: Identify the file system of the Loongson platform BIOS dynamic shared storage area and confirm the available space size.

[0055] Step 5: Read the Loongson platform BIOS area to be backed up and check the backup data size.

[0056] Step Six: Is the size of the dynamic shared memory area in the Loongson platform BIOS sufficient? If yes, proceed to the next step; if not, display an error message and end the process.

[0057] Step 7: Clear the dynamic shared storage area of ​​the Loongson platform BIOS.

[0058] Step 8: Write the Loongson platform BIOS backup image to the dynamic shared storage area. After completing the operation, proceed to step 19.

[0059] Step 9: Determine if the Loongson platform BIOS needs to be restored from the backup. If yes, proceed to the next step; otherwise, proceed to step 15.

[0060] Step 10: Determine if there was a previous BIOS upgrade backup operation for the Loongson platform. If yes, proceed to the next step; otherwise, indicate that the backup read failed and end the process.

[0061] Step 11: Is the Loongson platform BIOS backup complete? If yes, proceed to the next step; otherwise, indicate that the backup read failed and end the process.

[0062] Step 12: The Loongson platform BIOS reads the BIOS backup from the dynamic shared area.

[0063] Step 13: Write the Loongson platform BIOS backup to the specified area of ​​the SPI Flash to complete the BIOS backup and recovery.

[0064] Step 14: Restart your computer to end the process.

[0065] Step 15: Does the Loongson platform BIOS log data?

[0066] Step 16: Determine if the previous operation was a log recording operation. If yes, proceed to the next step; otherwise, clear the dynamic shared area and proceed to the next step.

[0067] Step 17: Write the status variables of this BIOS log recording operation into the BIOS variable area.

[0068] Step 18: Determine if the dynamically shared storage space is sufficient. If so, write the BIOS log sequentially in the dynamically shared area. If not, write the BIOS log in a cyclic manner.

[0069] Step 19: Process complete.

[0070] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A Flash chip data region dynamic sharing system, characterized in that, The system comprises a BIOS core framework, a shared storage component and a dynamic shared storage area, the BIOS loads the shared storage component to run through the BIOS core framework, the shared storage component can dynamically use the dynamic shared storage area according to the requirement of the current computer startup, and perform BIOS upgrade backup and BIOS log recording; the shared storage component comprises a strategy module, a log recording module, a backup recovery module and a flashing module; the strategy module, the log recording module, the backup recovery module and the flashing module are loaded and run through the BIOS core framework; in the BIOS running process, the BIOS will perform a backup operation on the BIOS or record the BIOS log according to the current strategy in the strategy module; The backup recovery module can call the flashing module to store the BIOS backup image in the dynamic shared storage area; the log recording module can call the flashing module to store the BIOS log in the dynamic shared storage area; The strategy module customizes the variable of the operation type of the dynamic shared storage area and the last operation type which can be performed, and the operation type comprises a BIOS backup operation and BIOS log writing; the variable of the last operation type is used in subsequent operations to judge whether the dynamic shared storage area needs to be emptied.

2. The Flash chip data region dynamic sharing system of claim 1, wherein, The dynamic shared storage area is a special area divided from the SPI Flash, and is used for dynamically saving the BIOS related information; the type of the saved information is operated through the strategy module.

Citation Information

Patent Citations

  • Dynamic non-volatile memory update in a computer system

    US5579522A