WO2014082250A1 - System, partition method and device based on flash memory - Google Patents
System, partition method and device based on flash memory Download PDFInfo
- Publication number
- WO2014082250A1 WO2014082250A1 PCT/CN2012/085538 CN2012085538W WO2014082250A1 WO 2014082250 A1 WO2014082250 A1 WO 2014082250A1 CN 2012085538 W CN2012085538 W CN 2012085538W WO 2014082250 A1 WO2014082250 A1 WO 2014082250A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- partition
- partition information
- flash
- information
- storage medium
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
Definitions
- the present invention relates to a flash memory based system, a partition adjustment method and apparatus.
- Flash is an important resource for storing code and data (such as programs, logs, configuration files, patch information, etc.).
- code and data such as programs, logs, configuration files, patch information, etc.
- the efficient use of Flash resources is related to the stability and cost of the system.
- Flash is usually divided into different partitions.
- One of the partition structures is shown in Figure 1.
- BIOS basic input/output system
- OS operating system
- the generated logs need to be recorded to the corresponding partitions and need to be read by the OS; or during the running of the BIOS, the functions need to be flexibly configured according to the configuration information, and need to be configured by the OS;
- the program can be updated and needs to be updated by the OS.
- Flash partitioning usually adopts a static partitioning scheme.
- static partitioning scheme if a function storage area has free storage space, the Flash partition resource cannot be utilized, and the system function expansion is limited.
- the technical problem to be solved by the present application is to provide a system and a partitioning method and a device based on flash memory, which can unify the partition information of the BIOS and the OS, realize the sharing of the partition information, and flexibly adjust the size of the Flash partition to improve the scalability of the system. .
- a partitioning method based on a flash storage system including: acquiring first partition information obtained after a basic input/output system initializes a flash partition for the first time, and saving the first partition information to a partition information storage medium.
- the partition information storage medium is a storage medium independent of the basic input/output system and the operating system; and the flash memory partition is initialized for the second time during operation of the operating system according to the first partition information. And secondizing the second partition information obtained after the flash partition is initialized; and saving the second partition information to the partition information storage medium.
- the first implementation manner of the present aspect before the step of acquiring the first partition information obtained after the basic input/output system first initializes the flash partition, the method includes: determining whether there is flash partition information in the partition information storage medium; And having the flash partition information in the partition information storage medium, acquiring the flash partition information, and initializing the flash partition for the first time in the process of running the basic input/output system according to the flash partition information, to obtain the first partition information. If there is no flash partition information in the partition information storage medium, the flash partition is initialized for the first time in the process of running the basic input/output system according to the basic configuration information to obtain the first partition information.
- the second implementation manner of the present aspect after the step of saving the first partition information and the second partition information to a storage medium independent of the basic input output system and the operating system, the method further includes: acquiring The partition information in the partition information storage medium is modified within a range supported by the partition, and the partition information of the partition to be adjusted is modified; the flash partition is initialized with new partition information, where the new partition information includes the modified partition to be adjusted. Partition information and partition information for other partitions that have not been modified.
- a third implementation manner of the present aspect after the step of initializing the flash partition with the new partition information, the method further includes: saving the new partition information to the partition information storage medium.
- the partition information includes at least a partition name, a partition start address, a partition size, or information about whether the partition supports adjustment.
- a partitioning device based on a flash storage system, including an obtaining module, a saving module, and an initialization module, wherein: the obtaining module is configured to obtain a first obtained by the basic input/output system after initializing the flash partition. a partition information, and the first partition information is sent to the save module; the initialization module is configured to receive the first partition information from the acquisition module and use the first partition information a second time Initializing the flash partition, obtaining the second partition information, and sending the second partition information to the save module; the save module, configured to save the first partition information and the second partition information to the partition information storage medium
- the partition information storage medium is a storage medium independent of the basic input output system and the operating system.
- the initialization module is further configured to initialize the flash partition for the first time to obtain the first partition information, including the determining unit and the initializing unit, in the process of running the basic input/output system, wherein: The determining unit is configured to determine whether there is flash partition information in the partition information storage medium, and send the determination result to the initialization unit; the initializing unit is configured to acquire when the partition information storage medium has flash partition information The flash partition information, according to the flash partition information, initializing a flash partition for the first time in the process of running the basic input/output system to obtain the first partition information; or for not having flash memory in the partition information storage medium When partitioning information, the flash partition is initialized for the first time in the process of running the basic input/output system according to the basic configuration information to obtain the first partition information.
- the device further includes a modification module and an initialization module, where: the modification module is configured to acquire partition information in the partition information storage medium, and to adjust the partition in a range supported by the partition The partition information is modified, and the modified partition information is sent to the initialization module; the initialization module is configured to initialize the flash partition with new partition information, where the new partition information includes the modified partition of the partition to be adjusted. Information and partition information for other partitions that have not been modified.
- the saving module is further configured to save the new partition information to the partition information storage medium.
- the partition information includes at least a partition name, a partition start address, a partition size, or information about whether the partition supports adjustment.
- a flash memory-based system including a processor and a flash memory electrically coupled to the processor, wherein: the processor is configured to initialize the flash partition for the first time while the basic input/output system is in operation Obtaining the first partition information after the first initialization of the flash partition, obtaining the first partition information during operation of the operating system, and initializing the flash partition by using the first partition information for the second time Secondaryizing the second partition information after the flash partition, and transmitting the first partition information and the second partition information to the flash memory for saving; the flash memory is independent of the basic input output system and the operating system The area stores data within the system and partition information of the flash.
- the utility model has the beneficial effects that the present application is based on the implementation of the partitioning method of the flash storage system.
- the Flash partition is initialized for the first time, and the first initialization is obtained.
- the first partition information is transmitted to the OS, and the Flash partition is initialized a second time by using the first partition information during the running of the OS, so that the BIOS and the OS initialize the Flash partition by using unified partition information. Eliminate the BIOS and OS version matching issues, thus reducing the risk of the partition being unusable due to the upgrade failure.
- the first partition information and the second partition information are all saved to the same partition information storage medium independent of the BIOS and the OS, and the BIOS and the OS partition information are the same.
- the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted within the scope of the partition support, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
- FIG. 1 is a schematic diagram of a flash memory partition structure of the prior art
- FIG. 2 is a flow chart of an embodiment of a partitioning method based on a flash storage system according to the present application
- FIG. 3 is a flow chart of first initializing a flash partition in an embodiment of a partitioning method based on a flash storage system of the present application
- FIG. 4 is a flow chart of adjusting a flash memory partition in an embodiment of a partitioning method based on a flash memory storage system according to the present application;
- FIG. 5 is a flow chart of initializing a flash partition with new partition information in another embodiment of the partitioning method based on the flash storage system of the present application;
- FIG. 6 is a schematic structural diagram of an embodiment of a partitioning device based on a flash memory storage system according to the present application.
- FIG. 7 is a schematic structural diagram of an initialization module in an implementation manner of a partitioning device based on a flash memory storage system according to the present application;
- FIG. 8 is a schematic structural diagram of another embodiment of a partitioning device based on a flash memory storage system of the present application.
- FIG. 9 is a schematic structural diagram of an embodiment of a flash memory storage system according to the present application.
- the current flash (Flash) partitioning usually adopts a static partitioning scheme.
- Flash When the Flash is initialized, a fixed-size storage space is allocated for each functional storage area, and the partitioned partition information is respectively solidified into the BIOS and the OS program, so that the BIOS and the BIOS are The partition information of the OS is compiled along with the attached BIOS or OS.
- the application provides an embodiment of a system, a partitioning method and a device based on a flash memory, which can unify the partition information of the BIOS and the OS, realize the sharing of the partition information and the flexibility of the size of the Flash partition, and improve the scalability of the system.
- the present application is further elaborated by the following specific embodiments:
- the Flash storage-based system may pre-define a storage medium separate from the BIOS and the OS for separately storing the partition information when the system is designed.
- the medium may be a Flash partition.
- a fixed partition can also be other independent storage media, such as EEPROM (Electrically Erasable Programmable Read Only Memory).
- an embodiment of a partitioning method based on a flash storage system of the present application includes:
- Step S101 Acquire first partition information obtained after the basic input/output system initializes the flash partition for the first time, and save the first partition information to the partition information storage medium;
- the partition information mentioned in the embodiment of the present application refers to information describing a situation of a Flash partition, and the partition information includes at least a partition name, a partition start address, a partition size, and whether the partition supports adjustment.
- the Flash driver After the system is powered on, the Flash driver initializes the Flash partition for the first time in the process of running the basic input/output system (BIOS), and obtains the first partition information after the first initialization of the Flash partition.
- the first partition information obtained by the BIOS is stored in the BIOS fixed memory in the form of a parameter table.
- the Flash driver is a tool or software that makes Flash run.
- the Flash driver reads the first partition information from the BIOS fixed memory through the standard Extensible Firmware Interface (EFI) while the OS is running. And saving the first partition information to the partition information storage medium.
- the partition information storage medium is a storage medium independent of the BIOS and the operating system (OS), and may be a partition of the Flash itself, or may be another storage medium. .
- the partition information is saved by using a storage medium independent of the BIOS and the OS, so that the Flash partition information is compiled separately from the attached BIOS or OS, and the adjustment of the Flash partition is facilitated, and the partition information of the BIOS and the OS can be homologous.
- Step S102 Initially initialize the flash partition according to the first partition information during operation of the operating system, and obtain second partition information obtained after initializing the flash partition for the second time;
- the Flash driver initializes the Flash partition a second time according to the first partition information, and obtains the second partition information after the second initialization of the Flash partition.
- Step S103 saving the second partition information to the partition information storage medium
- the second partition information obtained by initializing the Flash partition for the second time is stored in the partition information storage medium.
- the partition information storage medium here is the same storage medium as the storage medium storing the first partition information, so that the partition information is homologous.
- the first partition information and the second partition information mentioned in the present application respectively refer to partition information obtained by the BIOS and the OS using the same partition information to initialize the flash. Therefore, the first partition information and the second partition information are actually The same partition information to ensure the unified partition information of the BIOS and OS.
- the present application is based on the partitioning method of the flash storage system.
- the Flash partition is initialized for the first time, and the first partition information obtained after the first initialization is transmitted to the OS.
- the Flash partition is initialized a second time by using the first partition information during the running of the OS, so that the BIOS and the OS initialize the Flash partition with unified partition information. Eliminate the BIOS and OS version matching issues, thus reducing the risk of the partition being unusable due to the upgrade failure.
- the first partition information and the second partition information are all saved to the same partition information storage medium independent of the BIOS and the OS, and the BIOS and the OS partition information are the same.
- the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted within the scope of the partition support, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
- the first initialization of the Flash partition includes the following sub-steps:
- Sub-step S201 determining whether there is flash partition information in the partition information storage medium
- the Flash driver first determines whether there is Flash partition information in the partition information storage medium other than the BIOS and OS. Normally, the system identifies the Flash driver by returning status to indicate whether there is Flash partition information. For example, the Flash driver sends a request for acquiring partition information to the system. The system returns 0 to indicate that there is no Flash partition information in the partition information storage medium, and returns 1 to indicate that the partition information storage medium has Flash partition information.
- sub-step S202 If there is Flash partition information in the partition information storage medium, sub-step S202 is performed, and if there is no flash partition information in the partition information storage medium, sub-step S203 is performed.
- Sub-step S202 Acquiring the flash partition information, and initializing the flash partition for the first time in the process of running the basic input/output system according to the flash partition information, to obtain the first partition information;
- the Flash driver first initializes the Flash partition according to the Flash partition information in the medium to obtain the first partition information, and the first partition information is The form of the parameter table is stored in the fixed memory of the BIOS.
- Sub-step S203 Initializing the flash partition for the first time in the process of running the basic input/output system according to the basic configuration information, to obtain the first partition information;
- the Flash driver obtains the basic configuration information of the BIOS, and initializes the Flash partition for the first time according to the basic configuration information to obtain the first partition information.
- the first partition information obtained after initializing the Flash partition for the first time is stored in the fixed memory of the BIOS in the form of a parameter table.
- the basic configuration information here is the initial partition information when designing the system, and is solidified in the BIOS.
- the BIOS and the OS partition information are unified and homologous.
- the Flash partition can be adjusted within the scope supported by the partition.
- adjusting the Flash partition includes the following steps:
- Step S301 Acquire partition information in the partition information storage medium, and modify the partition information of the partition to be adjusted within a range supported by the partition;
- the partition information here is that the BIOS and the OS use the same partition information to initialize the Flash partition respectively, thereby obtaining partition information saved in the partition information storage medium other than the BIOS and the OS.
- the Flash driver obtains the partition information saved in the partition information storage medium independent of the BIOS and the OS through the EFI, and determines whether the partition satisfies the adjustment condition according to the partition information, such as the to be adjusted. Whether the partition supports adjustment, whether the partition to be adjusted supports large or small, etc. At the same time, the adjustment of the current partition will inevitably lead to the adjustment of the next partition. Therefore, it is also necessary to determine whether the partition next to the partition needs to be adjusted. The scope. For example, a certain partition A needs to be enlarged, but there is not enough space in the next partition to support the range of A to adjust, and the adjustment conditions are not satisfied. If the adjustment condition is not met, the partition adjustment is directly exited.
- the Flash driver can modify the partition information of the adjusted partition by using coding or a certain tool. Of course, it is also possible to modify the partition information of the adjusted partition by the user.
- the Flash driver receives the modified partition information of the partition to be adjusted, and determines whether the modified partition information of the partition to be adjusted is legal and valid, that is, according to the modified partition information of the partition to be adjusted, whether the partition to be adjusted and its partition partition support are supported.
- the scope of the modification For example, if the partition size supported by the partition A is 1G and supports small adjustment, then it is judged whether the modified partition size of A is within the 1G range, whether it is adjusted to a small size, and at the same time, the partition partition of the partition A such as B and C is determined. Whether the partition supports the adjustment range of A. If the partition information of the modified A partition is greater than 1G or the large adjustment or the partition partition cannot support the adjusted partition size, the modified partition information is considered invalid. Only the modified partition information satisfies all the adjustment conditions and is considered to be modified. The partition information is legal and valid.
- step S302 If the modified partition information is valid, the partition information of the modified partition to be modified and the partition information of the other partitions that are not modified constitute new partition information, and step S302 is performed; otherwise, the partition adjustment is exited.
- the data in all the Flash partitions can be backed up into the memory or the temporary storage medium, and then modified. Adjust the partition information of the partition.
- Step S302 Initialize the flash partition with new partition information
- the Flash driver uses the new partition information (that is, the modified partition information of the partition to be adjusted and the partition information of other partitions that have not been modified), initializes the Flash partition, obtains the partition information after the partition is adjusted, and will back up all the Flash partitions. The data is restored to the Flash partition (ie, the adjusted Flash partition) initialized with the new partition information.
- the new partition information that is, the modified partition information of the partition to be adjusted and the partition information of other partitions that have not been modified
- the data in the backup Flash partition to be restored can be restored to the adjusted corresponding Flash partition to avoid data loss.
- the partition information after the partition is adjusted is saved to the partition information storage medium independent of the BIOS and the OS, and the partition adjustment is completed.
- the Flash partition can be expanded, reduced, and deleted, added, merged, and the like.
- the present application initializes the Flash partition by modifying the partition information of the partition to be adjusted, and modifying the partition of the partition to be adjusted and other unmodified partition information, thereby implementing adjustment of the Flash partition. Since the partition information is obtained by using the same partition information for the BIOS and the OS, respectively, the initialization of the Flash partition is obtained, and the partition information saved outside the basic input/output system and the operating system is independent, thereby ensuring uniformity of the partition information of the BIOS and the OS. . On the basis of the unified BIOS and OS partition information, the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
- backing up the data in the Flash partition during the adjustment process can prevent data loss or inaccessibility due to partition adjustment, and enhance the reliability of the data in the Flash partition.
- the partition information after the partition is re-saved to the independent media for storing the partition information, which not only ensures that the partition information is not lost, but also avoids the error of accessing the data after the partition adjustment, and also facilitates adjustment of the Flash partition again in the future.
- the step of initializing the Flash partition with the partition information of the modified partition to be adjusted and the partition information of the other partitions that are not modified may refer to FIG. 5, and includes the following sub-steps:
- Sub-step S401 updating the partition information in the fixed memory of the basic input/output system with the new partition information through the standard extensible firmware interface;
- the new partition information (that is, the modified partition information of the partition to be adjusted and the partition information of other partitions that have not been modified) are saved in the fixed memory of the BIOS, and the original partition information is replaced with the new partition information. Implement the update of the partition information.
- Sub-step S402 uninstalling the flash drive
- Sub-step S403 Reload the flash drive, obtain new partition information through the standard extensible firmware interface, and initialize the flash partition with new partition information.
- Reload the Flash driver When loading the Flash driver, obtain new partition information from the BIOS's fixed memory through EFI, and initialize the Flash partition with the new partition information. The initialization of the Flash partition with the new partition information is performed by re-initializing the Flash partition with new partition information during the running of the OS to complete the partition adjustment.
- an embodiment of a partitioning device based on a flash memory storage system of the present application includes an obtaining module 11, an initializing module 12, and a saving module 13, wherein:
- the obtaining module 11 is configured to obtain first partition information obtained after the basic input/output system initializes the flash partition for the first time, and send the first partition information to the initialization module 12 and the saving module 13;
- the partition information mentioned in the embodiment of the present application refers to information describing a situation of a Flash partition, and the partition information includes at least a partition name, a partition start address, a partition size, and whether the partition supports adjustment.
- the Flash partition is initialized for the first time, and the first partition information after the first initialization of the Flash partition is obtained.
- the first partition information obtained by the BIOS is stored in the BIOS fixed memory in the form of a parameter table.
- the acquisition module 11 reads the first partition information from the BIOS fixed memory through the standard Extensible Firmware Interface (EFI).
- EFI Extensible Firmware Interface
- the initialization module 12 is configured to receive the first partition information from the obtaining module 11 and initialize the Flash partition a second time by using the first partition information, obtain the second partition information, and send the second partition information to the saving module 13;
- the initialization module 12 initializes the Flash partition a second time according to the first partition information, obtains the second partition information after the second initialization of the Flash partition, and sends the second partition information to the saving module 13.
- a saving module 13 for saving the first partition information and the second partition information to the same partition information storage medium, wherein the partition information storage medium is a storage medium independent of the BIOS and the OS;
- the saving module 13 saves the first partition information and the second partition information to the same partition information storage medium other than the BIOS and the OS, thereby realizing the partition information homologous.
- the first partition information and the second partition information mentioned in the present application respectively refer to partition information obtained by the BIOS and the OS using the same partition information to initialize the flash. Therefore, the first partition information and the second partition information are actually The same partition information to ensure the unified partition information of the BIOS and OS.
- the initialization module 12 is further configured to initialize the Flash partition for the first time to obtain the first partition information during the operation of the basic input/output system.
- the initialization module 12 includes a determining unit 111 and an initializing unit 112, where:
- the determining unit 111 is configured to determine whether there is Flash partition information in the partition information storage medium, and send the determination result to the initialization unit 112;
- the judging unit 111 first judges whether there is Flash partition information in the partition information storage medium other than the BIOS and the OS. Normally, the system returns a status identifier to indicate whether there is Flash partition information. For example, the Flash driver sends a request for acquiring partition information to the system. The system returns 0 to indicate that there is no Flash partition information in the partition information storage medium, and returns 1 to indicate that the partition information storage medium has Flash partition information. The judgment unit 111 transmits the judgment result to the initialization unit 112.
- the initialization unit 112 is configured to: when the partition information storage medium has Flash partition information, acquire Flash partition information, and first initialize the Flash partition according to the Flash partition information in the process of running the basic input/output system to obtain the first partition information; or When the flash partition information is not in the partition information storage medium, the flash partition is initialized for the first time in the process of running the basic input/output system according to the basic configuration information, to obtain the first partition information.
- the initializing unit 112 initializes the Flash partition for the first time according to the Flash partition information in the medium, and obtains the first partition information, and the first partition information is The form of the parameter table is stored in the fixed memory of the BIOS.
- the initialization unit 112 acquires the basic configuration information of the BIOS, and initializes the Flash partition for the first time according to the basic configuration information to obtain the first partition information.
- the first partition information obtained after initializing the Flash partition for the first time is stored in the fixed memory of the BIOS in the form of a parameter table.
- another embodiment of the partitioning device based on the flash memory storage system of the present application includes an obtaining module 11, an initializing module 12, a saving module 13, and a modifying module 14, wherein:
- the obtaining module 11 is configured to obtain first partition information obtained after the basic input/output system initializes the flash partition for the first time, and send the first partition information to the initialization module 12 and the saving module 13;
- the initialization module 12 is configured to receive the first partition information from the obtaining module 11 and initialize the Flash partition a second time by using the first partition information, obtain the second partition information, and send the second partition information to the saving module 13;
- a saving module 13 for saving the first partition information and the second partition information to the same partition information storage medium, wherein the partition information storage medium is a storage medium independent of the BIOS and the OS;
- the modifying module 14 is configured to obtain the partition information in the partition information storage medium, modify the partition information of the partition to be adjusted, and send the modified partition information to the initialization module 12;
- the partition information here is that the BIOS and the OS use the same partition information to initialize the Flash partition respectively, thereby obtaining partition information saved in the partition information storage medium other than the BIOS and the OS.
- the Flash driver obtains the partition information saved in the partition information storage medium independent of the BIOS and the OS through the EFI, and determines whether the partition satisfies the adjustment condition according to the partition information. For example, whether the partition to be adjusted supports adjustment, whether the partition to be adjusted supports large or small, and so on. At the same time, the adjustment of the current partition will inevitably lead to the adjustment of the partition next to it. Therefore, it is also necessary to determine whether the partition partition of the partition to be adjusted also satisfies the range that needs to be adjusted. For example, a certain partition A needs to be enlarged, but there is not enough space in the next partition to support the range of A to adjust, and the adjustment conditions are not satisfied.
- the modification module 14 may modify the partition information of the adjusted partition by using coding or a certain tool.
- the Flash driver receives the modified partition information of the partition to be adjusted, and determines whether the modified partition information of the partition to be adjusted is legal and valid, that is, according to the modified partition information of the partition to be adjusted, whether the partition to be adjusted and its partition partition support are supported.
- the scope of the modification For example, if the partition size supported by the partition A is 1G and supports small adjustment, then it is judged whether the modified partition size of A is within the 1G range, whether it is adjusted to a small size, and at the same time, the partition partition of the partition A such as B and C is determined. Whether the partition supports the adjustment range of A. If the partition information of the modified A partition is greater than 1G or the large adjustment or the partition partition cannot support the adjusted partition size, the modified partition information is considered invalid. Only the modified partition information satisfies all the adjustment conditions and is considered to be modified. The partition information is legal and valid.
- the modified partition information of the partition to be adjusted is sent to the initialization module 12.
- the data in all the Flash partitions can be backed up into the memory or the temporary storage medium, and then the module 14 is modified. Then modify the partition information of the partition to be adjusted.
- the initialization module 12 is configured to initialize the Flash partition with the new partition information, where the new partition information includes the partition information of the modified partition to be adjusted and the partition information of the other partitions that are not modified.
- the initialization module 12 initializes the Flash partition by using the new partition information (ie, the modified partition information of the partition to be adjusted and the partition information of other partitions that are not modified), obtains the partition information after the partition is adjusted, and will back up all the Flash partitions. The data is restored to the Flash partition (ie, the adjusted Flash partition) initialized with the new partition information.
- the new partition information ie, the modified partition information of the partition to be adjusted and the partition information of other partitions that are not modified
- the data in the backup Flash partition to be restored can be restored to the adjusted corresponding Flash partition to avoid data loss.
- the saving module 13 further saves the partition information after the adjustment of the partition to the partition information storage medium independent of the BIOS and the OS, and completes the partition adjustment.
- the initialization module 12 initializes the Flash partition with new partition information by:
- the initialization module 12 saves the new partition information (that is, the modified partition information of the partition to be adjusted and the partition information of the other partitions that have not been modified) to the fixed memory of the BIOS through EFI, and replaces the original with the new partition information. Partition information to update the partition information.
- the initialization module 12 unloads the existing Flash driver to reload the Flash driver to obtain new partition information.
- the initialization module 12 reloads the Flash driver.
- the new partition information is obtained from the fixed memory of the BIOS through EFI, and the Flash partition is initialized with the new partition information.
- the initialization of the Flash partition with the new partition information is performed by re-initializing the Flash partition with new partition information during the running of the OS to complete the partition adjustment.
- one embodiment of a system based on flash memory storage of the present application includes a processor 21 coupled to a power source (VCC) 23 and a flash memory 22 electrically coupled to a power source (VCC) 23 and a processor 21, respectively, wherein:
- the processor 21 is configured to initialize the Flash partition for the first time during the running of the BIOS, obtain the first partition information after the first initialization of the Flash partition, and obtain the first partition information from the BIOS during the running of the OS, and utilize the first partition information.
- the first partition information initializes the Flash partition for the second time, obtains the second partition information after the second initialization of the Flash partition, and sends the first partition information and the second partition information to the flash memory 22 for storage;
- the processor 21 is electrically connected to the power supply (VCC) 23, and supplies power to the processor 21 through the power supply (VCC) 23.
- the other end of the processor 21 is electrically connected to the flash memory 22 to control the adjustment of the Flash partition and the Flash partition of the system.
- the processor 21 After the system is powered on, the processor 21 first initializes the Flash partition during the running of the BIOS, and obtains the first partition information obtained by initializing the Flash partition for the first time in the running process of the OS, and uses the first partition information to perform the first
- the second partition is initialized by the Flash partition to obtain the second partition information.
- the first partition information and the second partition information are transmitted to the memory 22 independent of the BIOS and the OS for storage. Therefore, the BIOS and OS partition information can be unified, and the problems of different sources of BIOS and OS partition information can be solved.
- One end of the flash memory 22 is connected to a power supply (VCC) 23, and the flash memory 22 is powered by a power supply (VCC) 23.
- VCC power supply
- the other end of the flash memory 22 is electrically connected to the processor 21 for storing data in the system independently of the BIOS and the OS. And the partition information of the flash memory.
- the partition information of the flash memory can be stored by using another memory such as an EEPROM.
- the Flash partition can be adjusted by the processor 21.
- the processor 21 obtains the partition information of the to-be-adjusted partition saved by the BIOS and the OS through the EFI, and receives the modified partition information of the partition to be adjusted, and initializes the Flash partition with the modified partition information of the to-be-adjusted partition to implement the pair. Adjustment of the Flash partition.
- the description of the foregoing embodiment is different from the prior art.
- the advantage of the present application is that the present application initializes the Flash partition for the first time during the BIOS operation, and transmits the first partition information obtained after the first initialization to the OS.
- the first partition information is used to initialize the Flash partition for the second time, so that the BIOS and the OS use the unified partition information to initialize the Flash partition, and solve the problem of different sources of BIOS and OS partition information. Eliminate the BIOS and OS version matching issues, thus reducing the risk of the partition being unusable due to the upgrade failure.
- the first partition information and the second partition information are all saved to the same partition information storage medium independent of the BIOS and the OS, and the BIOS and the OS partition information are the same.
- the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted within the scope of the partition support, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
- backing up the data in the Flash partition during the adjustment process can prevent data loss or inaccessibility due to partition adjustment, and enhance the reliability of the data in the Flash partition.
- the partition information after the partition is re-saved to the independent media for storing the partition information, which not only ensures that the partition information is not lost, but also avoids the error of accessing the data after the partition adjustment, and also facilitates adjustment of the Flash partition again in the future.
- the disclosed apparatus and method may be implemented in other manners.
- the device implementations described above are merely illustrative.
- the division of the modules or units is only a logical function division.
- there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the functional modules described as separate components may or may not be physically separated.
- the components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
- each functional module in each embodiment of the present application may be integrated into one processing unit, or each functional module may exist physically separately, or two or more functional modules may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
- a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Provided are a partition regulation method and device based on flash memory. The partition regulation method based on flash memory comprises: acquiring partition information about a partition to be regulated, the partition information being partition information which is obtained by initializing flash partitioning through a BIOS and an OS adopting the same partition information and is independent from partition information stored outside the BIOS and OS; stopping accessing all flash partitionings, and receiving modified partition information about the partition to be regulated; and initializing flash partitioning with new partition information, the new partition information comprising the modified partition information about the partition to be regulated and unmodified partition information about other partitions. In this way, the sharing of partition information and flexible scaling and regulation of the size of a flash partitioning can be realized, improving the extensibility of the system.
Description
【技术领域】[Technical Field]
本发明涉及基于闪存存储的系统、分区调整方法和装置。 The present invention relates to a flash memory based system, a partition adjustment method and apparatus.
【背景技术】 【Background technique】
在嵌入式系统中,Flash(闪存)是存储代码和数据(如程序、日志、配置文件、补丁信息等)的重要资源,Flash资源的有效利用,关系到该系统产品的稳定性和成本。In embedded systems, Flash (flash) is an important resource for storing code and data (such as programs, logs, configuration files, patch information, etc.). The efficient use of Flash resources is related to the stability and cost of the system.
目前,为了提高不同类型数据访问的可靠性,通常将Flash划分为不同的分区使用。其中的一种分区结构如图1所示,系统启动的过程中,基本输入输出系统(BIOS)和操作系统(OS)会访问相同分区的数据。比如在BIOS运行的过程中,产生的日志需要被记录到相应的分区,同时需要被OS读取;或BIOS运行的过程中,需要根据配置信息实现功能的灵活配置,同时需要能够被OS配置;又或者BIOS运行的过程中,可以对程序(program)进行更新,同时需要能够被OS更新。Currently, in order to improve the reliability of different types of data access, Flash is usually divided into different partitions. One of the partition structures is shown in Figure 1. During the system startup process, the basic input/output system (BIOS) and operating system (OS) access the data of the same partition. For example, during the running of the BIOS, the generated logs need to be recorded to the corresponding partitions and need to be read by the OS; or during the running of the BIOS, the functions need to be flexibly configured according to the configuration information, and need to be configured by the OS; Alternatively, during the running of the BIOS, the program can be updated and needs to be updated by the OS.
现有技术中Flash进行分区通常采用静态分区方案。采用这种静态分区方案,若某个功能存储区有空闲的存储空间时,无法利用该Flash分区资源,使系统功能扩展受限。In the prior art, Flash partitioning usually adopts a static partitioning scheme. With this static partitioning scheme, if a function storage area has free storage space, the Flash partition resource cannot be utilized, and the system function expansion is limited.
【发明内容】 [Summary of the Invention]
本申请主要解决的技术问题是提供一种基于闪存存储的系统、分区方法和装置,能够统一BIOS及OS的分区信息,实现分区信息的共享和Flash分区大小的灵活伸缩调整,提高系统的扩展性。The technical problem to be solved by the present application is to provide a system and a partitioning method and a device based on flash memory, which can unify the partition information of the BIOS and the OS, realize the sharing of the partition information, and flexibly adjust the size of the Flash partition to improve the scalability of the system. .
一方面,提供了一种基于闪存存储系统的分区方法,包括:获取基本输入输出系统第一次初始化闪存分区后得到的第一分区信息,将所述第一分区信息保存至分区信息存储介质中,所述分区信息存储介质是独立于所述基本输入输出系统和所述操作系统之外的存储介质;根据所述第一分区信息在操作系统运行过程中第二次初始化所述闪存分区,获取所述第二次初始化闪存分区后得到的第二分区信息;将所述第二分区信息,保存至所述分区信息存储介质中。In one aspect, a partitioning method based on a flash storage system is provided, including: acquiring first partition information obtained after a basic input/output system initializes a flash partition for the first time, and saving the first partition information to a partition information storage medium. The partition information storage medium is a storage medium independent of the basic input/output system and the operating system; and the flash memory partition is initialized for the second time during operation of the operating system according to the first partition information. And secondizing the second partition information obtained after the flash partition is initialized; and saving the second partition information to the partition information storage medium.
本方面的第一种实现方式:所述获取基本输入输出系统第一次初始化闪存分区后得到的第一分区信息的步骤之前,包括:判断所述分区信息存储介质中是否有闪存分区信息;若所述分区信息存储介质中有闪存分区信息,则获取所述闪存分区信息,根据所述闪存分区信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息;若所述分区信息存储介质中没有闪存分区信息,则根据基础配置信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息。The first implementation manner of the present aspect: before the step of acquiring the first partition information obtained after the basic input/output system first initializes the flash partition, the method includes: determining whether there is flash partition information in the partition information storage medium; And having the flash partition information in the partition information storage medium, acquiring the flash partition information, and initializing the flash partition for the first time in the process of running the basic input/output system according to the flash partition information, to obtain the first partition information. If there is no flash partition information in the partition information storage medium, the flash partition is initialized for the first time in the process of running the basic input/output system according to the basic configuration information to obtain the first partition information.
本方面的第二种实现方式:所述将所述第一分区信息和第二分区信息,分别保存至独立于基本输入输出系统和操作系统之外的存储介质中的步骤之后,还包括:获取所述分区信息存储介质中的分区信息,在分区支持的范围内,对待调整分区的分区信息进行修改;以新的分区信息初始化闪存分区,所述新的分区信息包括修改后的待调整分区的分区信息和未修改的其他分区的分区信息。The second implementation manner of the present aspect: after the step of saving the first partition information and the second partition information to a storage medium independent of the basic input output system and the operating system, the method further includes: acquiring The partition information in the partition information storage medium is modified within a range supported by the partition, and the partition information of the partition to be adjusted is modified; the flash partition is initialized with new partition information, where the new partition information includes the modified partition to be adjusted. Partition information and partition information for other partitions that have not been modified.
本方面的第三种实现方式:所述以新的分区信息初始化闪存分区的步骤之后,还包括:将所述新的分区信息,保存至所述分区信息存储介质中。A third implementation manner of the present aspect: after the step of initializing the flash partition with the new partition information, the method further includes: saving the new partition information to the partition information storage medium.
本方面的第四种实现方式:所述分区信息至少包括分区名称、分区起始地址、分区大小或分区是否支持调整的信息。A fourth implementation manner of the aspect: the partition information includes at least a partition name, a partition start address, a partition size, or information about whether the partition supports adjustment.
另一方面,提供了一种基于闪存存储系统的分区装置,包括获取模块、保存模块以及初始化模块,其中:所述获取模块,用于获取基本输入输出系统第一次初始化闪存分区后得到的第一分区信息,并将所述第一分区信息发送给所述保存模块;所述初始化模块,用于接收来自所述获取模块的所述第一分区信息并利用所述第一分区信息第二次初始化闪存分区,获得第二分区信息,并将所述第二分区信息发送给所述保存模块;所述保存模块,用于将所述第一分区信息和第二分区信息保存至分区信息存储介质中,所述分区信息存储介质是独立于所述基本输入输出系统和所述操作系统之外的存储介质。On the other hand, a partitioning device based on a flash storage system is provided, including an obtaining module, a saving module, and an initialization module, wherein: the obtaining module is configured to obtain a first obtained by the basic input/output system after initializing the flash partition. a partition information, and the first partition information is sent to the save module; the initialization module is configured to receive the first partition information from the acquisition module and use the first partition information a second time Initializing the flash partition, obtaining the second partition information, and sending the second partition information to the save module; the save module, configured to save the first partition information and the second partition information to the partition information storage medium The partition information storage medium is a storage medium independent of the basic input output system and the operating system.
本方面的第一种实现方式:所述初始化模块还用于在基本输入输出系统运行的过程中,第一次初始化闪存分区以得到第一分区信息,包括判断单元和初始化单元,其中:所述判断单元用于判断所述分区信息存储介质中是否有闪存分区信息,并将判断结果发送给所述初始化单元;所述初始化单元用于当所述分区信息存储介质中有闪存分区信息时,获取所述闪存分区信息,根据所述闪存分区信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息;或用于当所述分区信息存储介质中没有闪存分区信息时,根据基础配置信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息。The first implementation manner of the aspect: the initialization module is further configured to initialize the flash partition for the first time to obtain the first partition information, including the determining unit and the initializing unit, in the process of running the basic input/output system, wherein: The determining unit is configured to determine whether there is flash partition information in the partition information storage medium, and send the determination result to the initialization unit; the initializing unit is configured to acquire when the partition information storage medium has flash partition information The flash partition information, according to the flash partition information, initializing a flash partition for the first time in the process of running the basic input/output system to obtain the first partition information; or for not having flash memory in the partition information storage medium When partitioning information, the flash partition is initialized for the first time in the process of running the basic input/output system according to the basic configuration information to obtain the first partition information.
本方面的第二种实现方式:所述装置还包括修改模块以及初始化模块,其中:所述修改模块用于获取所述分区信息存储介质中的分区信息,在分区支持的范围内,对待调整分区的分区信息进行修改,并将修改后的分区信息发送给所述初始化模块;所述初始化模块用于以新的分区信息初始化闪存分区,所述新的分区信息包括修改后的待调整分区的分区信息和未修改的其他分区的分区信息。A second implementation manner of the present aspect: the device further includes a modification module and an initialization module, where: the modification module is configured to acquire partition information in the partition information storage medium, and to adjust the partition in a range supported by the partition The partition information is modified, and the modified partition information is sent to the initialization module; the initialization module is configured to initialize the flash partition with new partition information, where the new partition information includes the modified partition of the partition to be adjusted. Information and partition information for other partitions that have not been modified.
本方面的第三种实现方式:所述保存模块还用于将所述新的分区信息,保存至所述分区信息存储介质中。A third implementation manner of the aspect: the saving module is further configured to save the new partition information to the partition information storage medium.
本方面的第四种实现方式:所述分区信息至少包括分区名称、分区起始地址、分区大小或分区是否支持调整的信息。A fourth implementation manner of the aspect: the partition information includes at least a partition name, a partition start address, a partition size, or information about whether the partition supports adjustment.
还有一方面,提供了一种基于闪存存储的系统,包括处理器以及与处理器电连接的闪存,其中:所述处理器用于在基本输入输出系统在运行过程中,第一次初始化闪存分区,获得所述第一次初始化闪存分区后的第一分区信息,在操作系统在运行过程中,获取所述第一分区信息,并利用所述第一分区信息第二次初始化闪存分区,获得第二次初始化闪存分区后的第二分区信息,并将所述第一分区信息和第二分区信息发送给所述闪存进行保存;所述闪存在独立于所述基本输入输出系统和操作系统之外的区域存储所述系统内的数据以及闪存的分区信息。In still another aspect, a flash memory-based system is provided, including a processor and a flash memory electrically coupled to the processor, wherein: the processor is configured to initialize the flash partition for the first time while the basic input/output system is in operation Obtaining the first partition information after the first initialization of the flash partition, obtaining the first partition information during operation of the operating system, and initializing the flash partition by using the first partition information for the second time Secondaryizing the second partition information after the flash partition, and transmitting the first partition information and the second partition information to the flash memory for saving; the flash memory is independent of the basic input output system and the operating system The area stores data within the system and partition information of the flash.
本申请的有益效果是:区别于现有技术的情况,本申请基于闪存存储系统的分区方法的实施方式,在BIOS运行过程中,第一次初始化Flash分区,并将第一次初始化后得到的第一分区信息传送给OS,在OS运行过程中利用第一分区信息第二次初始化Flash分区,以实现BIOS和OS采用统一的分区信息初始化Flash分区。消除BIOS及OS版本配套问题,从而降低升级不配套导致分区无法使用的风险。并将第一分区信息以及第二分区信息都保存至同一独立于BIOS和OS之外的分区信息存储介质中,实现BIOS和OS分区信息同源。The utility model has the beneficial effects that the present application is based on the implementation of the partitioning method of the flash storage system. During the running of the BIOS, the Flash partition is initialized for the first time, and the first initialization is obtained. The first partition information is transmitted to the OS, and the Flash partition is initialized a second time by using the first partition information during the running of the OS, so that the BIOS and the OS initialize the Flash partition by using unified partition information. Eliminate the BIOS and OS version matching issues, thus reducing the risk of the partition being unusable due to the upgrade failure. The first partition information and the second partition information are all saved to the same partition information storage medium independent of the BIOS and the OS, and the BIOS and the OS partition information are the same.
在BIOS和OS分区信息统一的基础上,在分区支持的范围内,通过修改需要调整的Flash分区的分区信息来对Flash分区进行调整,使在调整分区时,BIOS和OS无版本配套关系。能够实现分区信息的共享和Flash分区大小的灵活伸缩调整,提高系统的扩展性。On the basis of the unified BIOS and OS partition information, the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted within the scope of the partition support, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
【附图说明】 [Description of the Drawings]
图1是现有技术的一种闪存分区结构示意图;1 is a schematic diagram of a flash memory partition structure of the prior art;
图2是本申请基于基于闪存存储系统的分区方法一个实施方式的流程图;2 is a flow chart of an embodiment of a partitioning method based on a flash storage system according to the present application;
图3是本申请基于闪存存储系统的分区方法一个实施方式中第一次初始化闪存分区的流程图;3 is a flow chart of first initializing a flash partition in an embodiment of a partitioning method based on a flash storage system of the present application;
图4是本申请基于闪存存储系统的分区方法一个实施方式中对闪存分区进行调整的流程图;4 is a flow chart of adjusting a flash memory partition in an embodiment of a partitioning method based on a flash memory storage system according to the present application;
图5是本申请基于闪存存储系统的分区方法另一个实施方式中,以新的分区信息初始化闪存分区的流程图;5 is a flow chart of initializing a flash partition with new partition information in another embodiment of the partitioning method based on the flash storage system of the present application;
图6是本申请基于闪存存储系统的分区装置一个实施方式的结构示意图;6 is a schematic structural diagram of an embodiment of a partitioning device based on a flash memory storage system according to the present application;
图7是本申请基于闪存存储系统的分区装置一个实施方式中初始化模块的结构示意图;7 is a schematic structural diagram of an initialization module in an implementation manner of a partitioning device based on a flash memory storage system according to the present application;
图8是本申请基于闪存存储系统的分区装置另一个实施方式的结构示意图;8 is a schematic structural diagram of another embodiment of a partitioning device based on a flash memory storage system of the present application;
图9是本申请基于闪存存储的系统一个实施方式的结构示意图。FIG. 9 is a schematic structural diagram of an embodiment of a flash memory storage system according to the present application.
【具体实施方式】 【detailed description】
目前的闪存(Flash)进行分区通常采用静态分区方案,在Flash初始化的时候,为各个功能存储区分配固定大小的存储空间,并且分区后的分区信息分别固化到BIOS和OS程序中,使BIOS及OS的分区信息随同所附属的BIOS或OS一起编译。The current flash (Flash) partitioning usually adopts a static partitioning scheme. When the Flash is initialized, a fixed-size storage space is allocated for each functional storage area, and the partitioned partition information is respectively solidified into the BIOS and the OS program, so that the BIOS and the BIOS are The partition information of the OS is compiled along with the attached BIOS or OS.
本申请提供一种基于闪存存储的系统、分区方法和装置的实施方式,能够统一BIOS及OS的分区信息,实现分区信息的共享和Flash分区大小的灵活伸缩调整,提高系统的扩展性。以下通过具体实施方式对本申请做进一步地阐述:The application provides an embodiment of a system, a partitioning method and a device based on a flash memory, which can unify the partition information of the BIOS and the OS, realize the sharing of the partition information and the flexibility of the size of the Flash partition, and improve the scalability of the system. The present application is further elaborated by the following specific embodiments:
本申请实施方式所涉及的基于Flash存储的系统,在系统设计的时候,可以预先划分出一个独立于BIOS和OS之外的介质用于单独存放分区信息的存储介质,这个介质可以是Flash分区的某个固定分区也可以是其他独立的存储介质,比如EEPROM(电可擦可编程只读存储器)。The Flash storage-based system according to the embodiment of the present application may pre-define a storage medium separate from the BIOS and the OS for separately storing the partition information when the system is designed. The medium may be a Flash partition. A fixed partition can also be other independent storage media, such as EEPROM (Electrically Erasable Programmable Read Only Memory).
请参阅图2,本申请基于闪存存储系统的分区方法的一个实施方式包括:Referring to FIG. 2, an embodiment of a partitioning method based on a flash storage system of the present application includes:
步骤S101:获取基本输入输出系统第一次初始化闪存分区后得到的第一分区信息,将第一分区信息保存至分区信息存储介质中;Step S101: Acquire first partition information obtained after the basic input/output system initializes the flash partition for the first time, and save the first partition information to the partition information storage medium;
其中,本申请实施方式所提到的分区信息是指描述Flash分区情况的信息,分区信息至少包括分区名称、分区起始地址、分区大小、分区是否支持调整等信息。The partition information mentioned in the embodiment of the present application refers to information describing a situation of a Flash partition, and the partition information includes at least a partition name, a partition start address, a partition size, and whether the partition supports adjustment.
系统上电启动后,Flash驱动在基本输入输出系统(BIOS)运行的过程中,第一次初始化Flash分区,得到第一次初始化Flash分区后的第一分区信息。BIOS将得到的第一分区信息以参数表的形式存放在BIOS固定的内存中。其中,Flash驱动是指使Flash运行的一种工具或软件。After the system is powered on, the Flash driver initializes the Flash partition for the first time in the process of running the basic input/output system (BIOS), and obtains the first partition information after the first initialization of the Flash partition. The first partition information obtained by the BIOS is stored in the BIOS fixed memory in the form of a parameter table. Among them, the Flash driver is a tool or software that makes Flash run.
Flash驱动在OS运行的过程中,通过标准可扩展固件接口(EFI)从BIOS固定的内存中读取第一分区信息。并将第一分区信息保存至分区信息存储介质中,分区信息存储介质是独立于BIOS和操作系统(OS)之外的存储介质,可以是Flash本身的一个分区,当然也可以是别的存储介质。采用独立于BIOS和OS之外的存储介质保存分区信息,使Flash分区信息与其附属的BIOS或OS分开编译,方便对Flash分区的调整,而且可以实现BIOS和OS的分区信息同源。The Flash driver reads the first partition information from the BIOS fixed memory through the standard Extensible Firmware Interface (EFI) while the OS is running. And saving the first partition information to the partition information storage medium. The partition information storage medium is a storage medium independent of the BIOS and the operating system (OS), and may be a partition of the Flash itself, or may be another storage medium. . The partition information is saved by using a storage medium independent of the BIOS and the OS, so that the Flash partition information is compiled separately from the attached BIOS or OS, and the adjustment of the Flash partition is facilitated, and the partition information of the BIOS and the OS can be homologous.
步骤S102:根据第一分区信息在操作系统运行过程中第二次初始化所述闪存分区,获取第二次初始化闪存分区后得到的第二分区信息;Step S102: Initially initialize the flash partition according to the first partition information during operation of the operating system, and obtain second partition information obtained after initializing the flash partition for the second time;
在OS运行的过程中,Flash驱动根据第一分区信息第二次初始化Flash分区,获得第二次初始化Flash分区后的第二分区信息。During the running of the OS, the Flash driver initializes the Flash partition a second time according to the first partition information, and obtains the second partition information after the second initialization of the Flash partition.
步骤S103:将第二分区信息保存至所述分区信息存储介质中;Step S103: saving the second partition information to the partition information storage medium;
当完成OS运行过程中的第二次初始化Flash分区之后,将第二次初始化Flash分区得到的第二分区信息存放至所述分区信息存储介质中。这里的分区信息存储介质跟存放第一分区信息的存储介质是同一个存储介质,以此实现分区信息同源。本申请所提到的第一分区信息和第二分区信息分别是指经BIOS和OS利用相同的分区信息进行初始化Flash后得到的分区信息,因此,实际上第一分区信息跟第二分区信息是相同的分区信息,以保证BIOS和OS的分区信息统一。After the second initialization of the Flash partition in the OS running process, the second partition information obtained by initializing the Flash partition for the second time is stored in the partition information storage medium. The partition information storage medium here is the same storage medium as the storage medium storing the first partition information, so that the partition information is homologous. The first partition information and the second partition information mentioned in the present application respectively refer to partition information obtained by the BIOS and the OS using the same partition information to initialize the flash. Therefore, the first partition information and the second partition information are actually The same partition information to ensure the unified partition information of the BIOS and OS.
通过上述实施方式的阐述,可以理解,本申请基于闪存存储系统的分区方法,在BIOS运行过程中,第一次初始化Flash分区,并将第一次初始化后得到的第一分区信息传送给OS,在OS运行过程中利用第一分区信息第二次初始化Flash分区,以实现BIOS和OS采用统一的分区信息初始化Flash分区。消除BIOS及OS版本配套问题,从而降低升级不配套导致分区无法使用的风险。并将第一分区信息以及第二分区信息都保存至同一独立于BIOS和OS之外的分区信息存储介质中,实现BIOS和OS分区信息同源。Through the foregoing description of the embodiments, it can be understood that the present application is based on the partitioning method of the flash storage system. During the BIOS operation, the Flash partition is initialized for the first time, and the first partition information obtained after the first initialization is transmitted to the OS. The Flash partition is initialized a second time by using the first partition information during the running of the OS, so that the BIOS and the OS initialize the Flash partition with unified partition information. Eliminate the BIOS and OS version matching issues, thus reducing the risk of the partition being unusable due to the upgrade failure. The first partition information and the second partition information are all saved to the same partition information storage medium independent of the BIOS and the OS, and the BIOS and the OS partition information are the same.
在BIOS和OS分区信息统一的基础上,在分区支持的范围内,通过修改需要调整的Flash分区的分区信息来对Flash分区进行调整,使在调整分区时,BIOS和OS无版本配套关系。能够实现分区信息的共享和Flash分区大小的灵活伸缩调整,提高系统的扩展性。On the basis of the unified BIOS and OS partition information, the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted within the scope of the partition support, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
其中,请参阅图3,在另一个实施方式中,第一次初始化Flash分区的包括以下子步骤:Referring to FIG. 3, in another embodiment, the first initialization of the Flash partition includes the following sub-steps:
子步骤S201:判断分区信息存储介质中是否有闪存分区信息;Sub-step S201: determining whether there is flash partition information in the partition information storage medium;
在BIOS运行的过程中,Flash驱动首先要判断独立于BIOS和OS之外的分区信息存储介质中是否有Flash分区信息。通常情况下,系统通过返回状态标识给Flash驱动,以指示是否有Flash分区信息。比如Flash驱动向系统发送获取分区信息的请求,系统返回0表示分区信息存储介质中没有Flash分区信息,返回1表示分区信息存储介质中有Flash分区信息。During the running of the BIOS, the Flash driver first determines whether there is Flash partition information in the partition information storage medium other than the BIOS and OS. Normally, the system identifies the Flash driver by returning status to indicate whether there is Flash partition information. For example, the Flash driver sends a request for acquiring partition information to the system. The system returns 0 to indicate that there is no Flash partition information in the partition information storage medium, and returns 1 to indicate that the partition information storage medium has Flash partition information.
如果分区信息存储介质中有Flash分区信息,则执行子步骤S202,如果分区信息存储介质中没有Flash分区信息,则执行子步骤S203。If there is Flash partition information in the partition information storage medium, sub-step S202 is performed, and if there is no flash partition information in the partition information storage medium, sub-step S203 is performed.
子步骤S202:获取闪存分区信息,根据闪存分区信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到第一分区信息;Sub-step S202: Acquiring the flash partition information, and initializing the flash partition for the first time in the process of running the basic input/output system according to the flash partition information, to obtain the first partition information;
如果独立于BIOS和OS之外的分区信息存储介质中有Flash分区信息,则Flash驱动根据该介质中的Flash分区信息第一次初始化Flash分区,得到第一分区信息,并将第一分区信息以参数表的形式存放在BIOS固定的内存中。If there is Flash partition information in the partition information storage medium independent of the BIOS and the OS, the Flash driver first initializes the Flash partition according to the Flash partition information in the medium to obtain the first partition information, and the first partition information is The form of the parameter table is stored in the fixed memory of the BIOS.
子步骤S203:根据基础配置信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到第一分区信息;Sub-step S203: Initializing the flash partition for the first time in the process of running the basic input/output system according to the basic configuration information, to obtain the first partition information;
如果独立于BIOS和OS之外的分区信息存储介质中没有Flash分区信息,则Flash驱动获取BIOS的基础配置信息,并根据该基础配置信息第一次初始化Flash分区,以得到第一分区信息。并将第一次初始化Flash分区后得到的第一分区信息以参数表的形式存放在BIOS的固定的内存中。这里的基础配置信息是设计系统时的初始分区信息,是固化在BIOS中的。If there is no Flash partition information in the partition information storage medium other than the BIOS and the OS, the Flash driver obtains the basic configuration information of the BIOS, and initializes the Flash partition for the first time according to the basic configuration information to obtain the first partition information. The first partition information obtained after initializing the Flash partition for the first time is stored in the fixed memory of the BIOS in the form of a parameter table. The basic configuration information here is the initial partition information when designing the system, and is solidified in the BIOS.
通过上述实施方式,实现BIOS和OS分区信息统一并同源,在此基础上,可以实现在分区支持的范围内,对Flash分区进行调整。Through the foregoing implementation manner, the BIOS and the OS partition information are unified and homologous. On this basis, the Flash partition can be adjusted within the scope supported by the partition.
请参阅图4,本申请基于闪存存储系统的分区方法另一个实施方式中,对Flash分区进行调整包括以下步骤:Referring to FIG. 4, the present application is based on a partitioning method of a flash storage system. In another implementation manner, adjusting the Flash partition includes the following steps:
步骤S301:获取分区信息存储介质中的分区信息,在分区支持的范围内,对待调整分区的分区信息进行修改;Step S301: Acquire partition information in the partition information storage medium, and modify the partition information of the partition to be adjusted within a range supported by the partition;
这里的分区信息是BIOS和OS采用相同的分区信息,分别进行初始化Flash分区,从而得到的独立于BIOS和OS之外的分区信息存储介质中保存的分区信息。The partition information here is that the BIOS and the OS use the same partition information to initialize the Flash partition respectively, thereby obtaining partition information saved in the partition information storage medium other than the BIOS and the OS.
因此,当需要对Flash分区进行调整时,Flash驱动通过EFI获取独立于BIOS和OS之外的分区信息存储介质中保存的分区信息,并根据这个分区信息判断分区是否满足调整条件,比如待调整的分区是否支持调整,待调整的分区支持调大还是调小等等,同时,当前分区的调整必然会导致其隔壁分区也跟随调整,因此,还要判断待调整分区的隔壁分区是否也满足需要调整的范围。比如某分区A需要调大,但是其隔壁分区没有足够的空间支持A调大的范围,也不满足调整条件。如果不满足调整条件则直接退出分区调整,如果满足调整条件,停止对所有Flash分区的访问,在分区支持的范围内,Flash驱动可以通过编码或一定的工具对待调整分区的分区信息进行修改。当然,也可以通过用户来对待调整分区的分区信息进行修改。Therefore, when the Flash partition needs to be adjusted, the Flash driver obtains the partition information saved in the partition information storage medium independent of the BIOS and the OS through the EFI, and determines whether the partition satisfies the adjustment condition according to the partition information, such as the to be adjusted. Whether the partition supports adjustment, whether the partition to be adjusted supports large or small, etc. At the same time, the adjustment of the current partition will inevitably lead to the adjustment of the next partition. Therefore, it is also necessary to determine whether the partition next to the partition needs to be adjusted. The scope. For example, a certain partition A needs to be enlarged, but there is not enough space in the next partition to support the range of A to adjust, and the adjustment conditions are not satisfied. If the adjustment condition is not met, the partition adjustment is directly exited. If the adjustment condition is met, the access to all Flash partitions is stopped. Within the scope supported by the partition, the Flash driver can modify the partition information of the adjusted partition by using coding or a certain tool. Of course, it is also possible to modify the partition information of the adjusted partition by the user.
Flash驱动接收修改后的待调整分区的分区信息,判断修改后的待调整分区的分区信息是否合法和有效,即根据修改后的待调整分区的分区信息,判断待调整分区以及其隔壁分区是否支持修改的范围。比如待调整分区A支持的分区大小为1G,并支持往小调整,那么判断修改后的A的分区大小是否在1G范围内,是否是往小调整,同时判断分区A的隔壁分区比如B、C分区是否支持A的调整范围。如果修改后的A分区的分区信息大于1G或是往大调整或者隔壁分区无法支持调整后的分区大小,则认为修改的分区信息不合法,只有修改的分区信息同时满足所有的调整条件才认为修改的分区信息合法有效。The Flash driver receives the modified partition information of the partition to be adjusted, and determines whether the modified partition information of the partition to be adjusted is legal and valid, that is, according to the modified partition information of the partition to be adjusted, whether the partition to be adjusted and its partition partition support are supported. The scope of the modification. For example, if the partition size supported by the partition A is 1G and supports small adjustment, then it is judged whether the modified partition size of A is within the 1G range, whether it is adjusted to a small size, and at the same time, the partition partition of the partition A such as B and C is determined. Whether the partition supports the adjustment range of A. If the partition information of the modified A partition is greater than 1G or the large adjustment or the partition partition cannot support the adjusted partition size, the modified partition information is considered invalid. Only the modified partition information satisfies all the adjustment conditions and is considered to be modified. The partition information is legal and valid.
如果修改的分区信息合法有效,以修改后的待调整分区的分区信息和未修改的其他分区的分区信息组成新的分区信息,进行步骤S302,否则,退出分区调整。If the modified partition information is valid, the partition information of the modified partition to be modified and the partition information of the other partitions that are not modified constitute new partition information, and step S302 is performed; otherwise, the partition adjustment is exited.
在实际应用过程中,为了防止分区调整导致分区内的数据丢失,在停止对所有Flash分区的访问后,可以将所有Flash分区内的数据备份至内存中或者临时的存储介质中,然后再修改待调整分区的分区信息。In the actual application process, in order to prevent the data loss in the partition caused by the partition adjustment, after stopping the access to all the Flash partitions, the data in all the Flash partitions can be backed up into the memory or the temporary storage medium, and then modified. Adjust the partition information of the partition.
步骤S302:以新的分区信息初始化闪存分区;Step S302: Initialize the flash partition with new partition information;
Flash驱动利用新的分区信息(即修改后的待调整分区的分区信息和未修改的其他分区的分区信息),初始化Flash分区,获得调整分区后的分区信息,并将备份的所有Flash分区中的数据还原至以新的分区信息初始化后的Flash分区(即调整后的Flash分区)中。The Flash driver uses the new partition information (that is, the modified partition information of the partition to be adjusted and the partition information of other partitions that have not been modified), initializes the Flash partition, obtains the partition information after the partition is adjusted, and will back up all the Flash partitions. The data is restored to the Flash partition (ie, the adjusted Flash partition) initialized with the new partition information.
完成Flash分区的调整之后,可以将备份的待调整Flash分区中的数据还原至调整后的相应的Flash分区中,避免数据丢失。After the adjustment of the Flash partition is completed, the data in the backup Flash partition to be restored can be restored to the adjusted corresponding Flash partition to avoid data loss.
为了保证调整后的分区信息不丢失以及防止分区调整后访问数据出错,将调整分区后的分区信息保存至独立于BIOS和OS之外的分区信息存放介质中,完成分区调整。In order to ensure that the adjusted partition information is not lost and the access data is prevented from being adjusted after the partition is adjusted, the partition information after the partition is adjusted is saved to the partition information storage medium independent of the BIOS and the OS, and the partition adjustment is completed.
通过以上方式,可以对Flash分区进行扩大、缩减,以及删除、增加、合并分区等操作。Through the above methods, the Flash partition can be expanded, reduced, and deleted, added, merged, and the like.
通过上述实施方式的阐述,本申请通过修改待调整分区的分区信息,并以修改后的待调整分区的分区信息和其他未修改的分区信息来初始化Flash分区,从而实现对Flash分区的调整。由于分区信息是使BIOS和OS采用相同的分区信息,分别进行初始化Flash分区而得到,并独立于基本输入输出系统和操作系统之外保存的分区信息,因此,保证了BIOS和OS的分区信息统一。在BIOS和OS分区信息统一的基础上,通过修改需要调整的Flash分区的分区信息来对Flash分区进行调整,使在调整分区时,BIOS和OS无版本配套关系。能够实现分区信息的共享和Flash分区大小的灵活伸缩调整,提高系统的扩展性。Through the above description of the embodiment, the present application initializes the Flash partition by modifying the partition information of the partition to be adjusted, and modifying the partition of the partition to be adjusted and other unmodified partition information, thereby implementing adjustment of the Flash partition. Since the partition information is obtained by using the same partition information for the BIOS and the OS, respectively, the initialization of the Flash partition is obtained, and the partition information saved outside the basic input/output system and the operating system is independent, thereby ensuring uniformity of the partition information of the BIOS and the OS. . On the basis of the unified BIOS and OS partition information, the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
另一方面,在调整的过程中对Flash分区内的数据进行备份能够防止因分区调整导致数据丢失或无法访问的情况,增强Flash分区内数据的可靠性。将调整分区后的分区信息重新保存至独立的存放分区信息的介质中,既保证分区信息不丢失,也避免了分区调整后访问数据出错,同时也便于以后再次对Flash分区进行调整。On the other hand, backing up the data in the Flash partition during the adjustment process can prevent data loss or inaccessibility due to partition adjustment, and enhance the reliability of the data in the Flash partition. The partition information after the partition is re-saved to the independent media for storing the partition information, which not only ensures that the partition information is not lost, but also avoids the error of accessing the data after the partition adjustment, and also facilitates adjustment of the Flash partition again in the future.
在另一个实施方式中,以修改后的待调整分区的分区信息和未修改的其他分区的分区信息初始化Flash分区的步骤可参阅图5,包括以下子步骤:In another embodiment, the step of initializing the Flash partition with the partition information of the modified partition to be adjusted and the partition information of the other partitions that are not modified may refer to FIG. 5, and includes the following sub-steps:
子步骤S401:通过标准可扩展固件接口,以新的分区信息更新基本输入输出系统的固定的内存中的分区信息;Sub-step S401: updating the partition information in the fixed memory of the basic input/output system with the new partition information through the standard extensible firmware interface;
通过EFI,将新的分区信息(即修改后的待调整分区的分区信息和未修改的其他分区的分区信息)保存到BIOS的固定的内存中,以新的分区信息替换原有的分区信息,实现分区信息的更新。Through EFI, the new partition information (that is, the modified partition information of the partition to be adjusted and the partition information of other partitions that have not been modified) are saved in the fixed memory of the BIOS, and the original partition information is replaced with the new partition information. Implement the update of the partition information.
子步骤S402:卸载闪存驱动;Sub-step S402: uninstalling the flash drive;
将现有的Flash驱动卸载,以便于重新加载Flash驱动来获取新的分区信息。Uninstall the existing Flash driver to reload the Flash driver to get new partition information.
子步骤S403:重新加载闪存驱动,通过标准可扩展固件接口获取新的分区信息,以新的分区信息初始化闪存分区。Sub-step S403: Reload the flash drive, obtain new partition information through the standard extensible firmware interface, and initialize the flash partition with new partition information.
重新加载Flash驱动,在加载Flash驱动时,通过EFI从BIOS的固定的内存中获取新的分区信息,以新的分区信息初始化Flash分区。其中,以新的分区信息初始化Flash分区是通过在OS运行的过程中,以新的分区信息重新初始化Flash分区,以完成分区调整。Reload the Flash driver. When loading the Flash driver, obtain new partition information from the BIOS's fixed memory through EFI, and initialize the Flash partition with the new partition information. The initialization of the Flash partition with the new partition information is performed by re-initializing the Flash partition with new partition information during the running of the OS to complete the partition adjustment.
请参阅图6,本申请基于闪存存储系统的分区装置的一个实施方式包括获取模块11、初始化模块12以及保存模块13,其中:Referring to FIG. 6, an embodiment of a partitioning device based on a flash memory storage system of the present application includes an obtaining module 11, an initializing module 12, and a saving module 13, wherein:
获取模块11,用于获取基本输入输出系统第一次初始化Flash分区后得到的第一分区信息,并将第一分区信息发送给初始化模块12以及保存模块13;The obtaining module 11 is configured to obtain first partition information obtained after the basic input/output system initializes the flash partition for the first time, and send the first partition information to the initialization module 12 and the saving module 13;
其中,本申请实施方式所提到的分区信息是指描述Flash分区情况的信息,分区信息至少包括分区名称、分区起始地址、分区大小、分区是否支持调整等信息。The partition information mentioned in the embodiment of the present application refers to information describing a situation of a Flash partition, and the partition information includes at least a partition name, a partition start address, a partition size, and whether the partition supports adjustment.
系统上电启动后,在基本输入输出系统(BIOS)运行的过程中,第一次初始化Flash分区,得到第一次初始化Flash分区后的第一分区信息。BIOS将得到的第一分区信息以参数表的形式存放在BIOS固定的内存中。After the system is powered on, during the operation of the basic input/output system (BIOS), the Flash partition is initialized for the first time, and the first partition information after the first initialization of the Flash partition is obtained. The first partition information obtained by the BIOS is stored in the BIOS fixed memory in the form of a parameter table.
在OS运行的过程中,获取模块11通过标准可扩展固件接口(EFI)从BIOS固定的内存中读取第一分区信息。并将第一分区信息发送给保存模块13以及初始化模块12。During the operation of the OS, the acquisition module 11 reads the first partition information from the BIOS fixed memory through the standard Extensible Firmware Interface (EFI). The first partition information is sent to the save module 13 and the initialization module 12.
初始化模块12,用于接收来自获取模块11的第一分区信息并利用第一分区信息第二次初始化Flash分区,获得第二分区信息,并将第二分区信息发送给保存模块13;The initialization module 12 is configured to receive the first partition information from the obtaining module 11 and initialize the Flash partition a second time by using the first partition information, obtain the second partition information, and send the second partition information to the saving module 13;
在OS运行的过程中,初始化模块12根据第一分区信息第二次初始化Flash分区,获得第二次初始化Flash分区后的第二分区信息,将第二分区信息发送给保存模块13。During the running of the OS, the initialization module 12 initializes the Flash partition a second time according to the first partition information, obtains the second partition information after the second initialization of the Flash partition, and sends the second partition information to the saving module 13.
保存模块13,用于将第一分区信息和第二分区信息保存至同一分区信息存储介质中,其中,分区信息存储介质是独立于BIOS和OS之外的存储介质;a saving module 13 for saving the first partition information and the second partition information to the same partition information storage medium, wherein the partition information storage medium is a storage medium independent of the BIOS and the OS;
保存模块13将第一分区信息和第二分区信息保存至独立于BIOS和OS之外的同一分区信息存储介质中,以此实现分区信息同源。本申请所提到的第一分区信息和第二分区信息分别是指经BIOS和OS利用相同的分区信息进行初始化Flash后得到的分区信息,因此,实际上第一分区信息跟第二分区信息是相同的分区信息,以保证BIOS和OS的分区信息统一。The saving module 13 saves the first partition information and the second partition information to the same partition information storage medium other than the BIOS and the OS, thereby realizing the partition information homologous. The first partition information and the second partition information mentioned in the present application respectively refer to partition information obtained by the BIOS and the OS using the same partition information to initialize the flash. Therefore, the first partition information and the second partition information are actually The same partition information to ensure the unified partition information of the BIOS and OS.
其中,初始化模块12还用于在基本输入输出系统运行的过程中,第一次初始化Flash分区以得到第一分区信息。The initialization module 12 is further configured to initialize the Flash partition for the first time to obtain the first partition information during the operation of the basic input/output system.
请继续参阅参阅图7,在另一实施方式中,初始化模块12包括判断单元111以及初始化单元112,其中:Please refer to FIG. 7. In another embodiment, the initialization module 12 includes a determining unit 111 and an initializing unit 112, where:
判断单元111,用于判断分区信息存储介质中是否有Flash分区信息,并将判断结果发送给初始化单元112;The determining unit 111 is configured to determine whether there is Flash partition information in the partition information storage medium, and send the determination result to the initialization unit 112;
在BIOS运行的过程中,判断单元111首先要判断独立于BIOS和OS之外的分区信息存储介质中是否有Flash分区信息。通常情况下,系统通过返回状态标识以指示是否有Flash分区信息。比如Flash驱动向系统发送获取分区信息的请求,系统返回0表示分区信息存储介质中没有Flash分区信息,返回1表示分区信息存储介质中有Flash分区信息。判断单元111将判断结果发送给初始化单元112。During the running of the BIOS, the judging unit 111 first judges whether there is Flash partition information in the partition information storage medium other than the BIOS and the OS. Normally, the system returns a status identifier to indicate whether there is Flash partition information. For example, the Flash driver sends a request for acquiring partition information to the system. The system returns 0 to indicate that there is no Flash partition information in the partition information storage medium, and returns 1 to indicate that the partition information storage medium has Flash partition information. The judgment unit 111 transmits the judgment result to the initialization unit 112.
初始化单元112用于当分区信息存储介质中有Flash分区信息时,获取Flash分区信息,根据Flash分区信息在基本输入输出系统运行的过程中第一次初始化Flash分区,以得到第一分区信息;或用于当分区信息存储介质中没有Flash分区信息时,根据基础配置信息在基本输入输出系统运行的过程中第一次初始化Flash分区,以得到第一分区信息。The initialization unit 112 is configured to: when the partition information storage medium has Flash partition information, acquire Flash partition information, and first initialize the Flash partition according to the Flash partition information in the process of running the basic input/output system to obtain the first partition information; or When the flash partition information is not in the partition information storage medium, the flash partition is initialized for the first time in the process of running the basic input/output system according to the basic configuration information, to obtain the first partition information.
如果独立于BIOS和OS之外的分区信息存储介质中有Flash分区信息,初始化单元112根据该介质中的Flash分区信息第一次初始化Flash分区,得到第一分区信息,并将第一分区信息以参数表的形式存放在BIOS固定的内存中。If there is Flash partition information in the partition information storage medium other than the BIOS and the OS, the initializing unit 112 initializes the Flash partition for the first time according to the Flash partition information in the medium, and obtains the first partition information, and the first partition information is The form of the parameter table is stored in the fixed memory of the BIOS.
如果独立于BIOS和OS之外的分区信息存储介质中没有Flash分区信息,初始化单元112获取BIOS的基础配置信息,并根据该基础配置信息第一次初始化Flash分区,以得到第一分区信息。并将第一次初始化Flash分区后得到的第一分区信息以参数表的形式存放在BIOS的固定的内存中。If there is no Flash partition information in the partition information storage medium other than the BIOS and the OS, the initialization unit 112 acquires the basic configuration information of the BIOS, and initializes the Flash partition for the first time according to the basic configuration information to obtain the first partition information. The first partition information obtained after initializing the Flash partition for the first time is stored in the fixed memory of the BIOS in the form of a parameter table.
请参阅图8,本申请基于闪存存储系统的分区装置的另一个实施方式包括获取模块11、初始化模块12、保存模块13以及修改模块14,其中:Referring to FIG. 8, another embodiment of the partitioning device based on the flash memory storage system of the present application includes an obtaining module 11, an initializing module 12, a saving module 13, and a modifying module 14, wherein:
获取模块11,用于获取基本输入输出系统第一次初始化Flash分区后得到的第一分区信息,并将第一分区信息发送给初始化模块12以及保存模块13;The obtaining module 11 is configured to obtain first partition information obtained after the basic input/output system initializes the flash partition for the first time, and send the first partition information to the initialization module 12 and the saving module 13;
初始化模块12,用于接收来自获取模块11的第一分区信息并利用第一分区信息第二次初始化Flash分区,获得第二分区信息,并将第二分区信息发送给保存模块13;The initialization module 12 is configured to receive the first partition information from the obtaining module 11 and initialize the Flash partition a second time by using the first partition information, obtain the second partition information, and send the second partition information to the saving module 13;
保存模块13,用于将第一分区信息和第二分区信息保存至同一分区信息存储介质中,其中,分区信息存储介质是独立于BIOS和OS之外的存储介质;a saving module 13 for saving the first partition information and the second partition information to the same partition information storage medium, wherein the partition information storage medium is a storage medium independent of the BIOS and the OS;
修改模块14,用于获取分区信息存储介质中的分区信息,在分区支持的范围内,对待调整分区的分区信息进行修改,并将修改后的分区信息发送给初始化模块12;The modifying module 14 is configured to obtain the partition information in the partition information storage medium, modify the partition information of the partition to be adjusted, and send the modified partition information to the initialization module 12;
这里的分区信息是BIOS和OS采用相同的分区信息,分别进行初始化Flash分区,从而得到的独立于BIOS和OS之外的分区信息存储介质中保存的分区信息。The partition information here is that the BIOS and the OS use the same partition information to initialize the Flash partition respectively, thereby obtaining partition information saved in the partition information storage medium other than the BIOS and the OS.
因此,当需要对Flash分区进行调整时,Flash驱动通过EFI获取独立于BIOS和OS之外的分区信息存储介质中保存的分区信息,并根据这个分区信息判断分区是否满足调整条件。比如待调整的分区是否支持调整,待调整的分区支持调大还是调小等等。同时,当前分区的调整必然会导致其隔壁分区也跟随调整,因此,还要判断待调整分区的隔壁分区是否也满足需要调整的范围。比如某分区A需要调大,但是其隔壁分区没有足够的空间支持A调大的范围,也不满足调整条件。如果不满足调整条件则直接退出分区调整,如果满足调整条件,停止对所有Flash分区的访问,在分区支持的范围内,修改模块14可以通过编码或一定的工具对待调整分区的分区信息进行修改。Therefore, when the Flash partition needs to be adjusted, the Flash driver obtains the partition information saved in the partition information storage medium independent of the BIOS and the OS through the EFI, and determines whether the partition satisfies the adjustment condition according to the partition information. For example, whether the partition to be adjusted supports adjustment, whether the partition to be adjusted supports large or small, and so on. At the same time, the adjustment of the current partition will inevitably lead to the adjustment of the partition next to it. Therefore, it is also necessary to determine whether the partition partition of the partition to be adjusted also satisfies the range that needs to be adjusted. For example, a certain partition A needs to be enlarged, but there is not enough space in the next partition to support the range of A to adjust, and the adjustment conditions are not satisfied. If the adjustment condition is not met, the partition adjustment is directly exited. If the adjustment condition is met, the access to all the Flash partitions is stopped. Within the scope of the partition support, the modification module 14 may modify the partition information of the adjusted partition by using coding or a certain tool.
Flash驱动接收修改后的待调整分区的分区信息,判断修改后的待调整分区的分区信息是否合法和有效,即根据修改后的待调整分区的分区信息,判断待调整分区以及其隔壁分区是否支持修改的范围。比如待调整分区A支持的分区大小为1G,并支持往小调整,那么判断修改后的A的分区大小是否在1G范围内,是否是往小调整,同时判断分区A的隔壁分区比如B、C分区是否支持A的调整范围。如果修改后的A分区的分区信息大于1G或是往大调整或者隔壁分区无法支持调整后的分区大小,则认为修改的分区信息不合法,只有修改的分区信息同时满足所有的调整条件才认为修改的分区信息合法有效。The Flash driver receives the modified partition information of the partition to be adjusted, and determines whether the modified partition information of the partition to be adjusted is legal and valid, that is, according to the modified partition information of the partition to be adjusted, whether the partition to be adjusted and its partition partition support are supported. The scope of the modification. For example, if the partition size supported by the partition A is 1G and supports small adjustment, then it is judged whether the modified partition size of A is within the 1G range, whether it is adjusted to a small size, and at the same time, the partition partition of the partition A such as B and C is determined. Whether the partition supports the adjustment range of A. If the partition information of the modified A partition is greater than 1G or the large adjustment or the partition partition cannot support the adjusted partition size, the modified partition information is considered invalid. Only the modified partition information satisfies all the adjustment conditions and is considered to be modified. The partition information is legal and valid.
如果修改的分区信息合法有效,将修改后的待调整分区的分区信息发送给初始化模块12。If the modified partition information is valid, the modified partition information of the partition to be adjusted is sent to the initialization module 12.
在实际应用过程中,为了防止分区调整导致分区内的数据丢失,在停止对所有Flash分区的访问后,可以将所有Flash分区内的数据备份至内存中或者临时的存储介质中,然后修改模块14再修改待调整分区的分区信息。In the actual application process, in order to prevent the data loss in the partition caused by the partition adjustment, after stopping the access to all the Flash partitions, the data in all the Flash partitions can be backed up into the memory or the temporary storage medium, and then the module 14 is modified. Then modify the partition information of the partition to be adjusted.
初始化模块12,用于以新的分区信息初始化Flash分区,其中,新的分区信息包括修改后的待调整分区的分区信息和未修改的其他分区的分区信息。The initialization module 12 is configured to initialize the Flash partition with the new partition information, where the new partition information includes the partition information of the modified partition to be adjusted and the partition information of the other partitions that are not modified.
初始化模块12利用新的分区信息(即修改后的待调整分区的分区信息和未修改的其他分区的分区信息),初始化Flash分区,获得调整分区后的分区信息,并将备份的所有Flash分区中的数据还原至以新的分区信息初始化后的Flash分区(即调整后的Flash分区)中。The initialization module 12 initializes the Flash partition by using the new partition information (ie, the modified partition information of the partition to be adjusted and the partition information of other partitions that are not modified), obtains the partition information after the partition is adjusted, and will back up all the Flash partitions. The data is restored to the Flash partition (ie, the adjusted Flash partition) initialized with the new partition information.
完成Flash分区的调整之后,可以将备份的待调整Flash分区中的数据还原至调整后的相应的Flash分区中,避免数据丢失。After the adjustment of the Flash partition is completed, the data in the backup Flash partition to be restored can be restored to the adjusted corresponding Flash partition to avoid data loss.
为了保证调整后的分区信息不丢失以及防止分区调整后访问数据出错,保存模块13进一步将调整分区后的分区信息保存至独立于BIOS和OS之外的分区信息存放介质中,完成分区调整。In order to ensure that the adjusted partition information is not lost and the access data is prevented from being changed after the partition is adjusted, the saving module 13 further saves the partition information after the adjustment of the partition to the partition information storage medium independent of the BIOS and the OS, and completes the partition adjustment.
在实际应用过程中,初始化模块12通过以下方式以新的分区信息初始化Flash分区:In the actual application process, the initialization module 12 initializes the Flash partition with new partition information by:
初始化模块12通过EFI,将新的分区信息(即修改后的待调整分区的分区信息和未修改的其他分区的分区信息)保存到BIOS的固定的内存中,以新的分区信息替换原有的分区信息,实现分区信息的更新。The initialization module 12 saves the new partition information (that is, the modified partition information of the partition to be adjusted and the partition information of the other partitions that have not been modified) to the fixed memory of the BIOS through EFI, and replaces the original with the new partition information. Partition information to update the partition information.
初始化模块12将现有的Flash驱动卸载,以便于重新加载Flash驱动来获取新的分区信息。The initialization module 12 unloads the existing Flash driver to reload the Flash driver to obtain new partition information.
初始化模块12重新加载Flash驱动,在加载Flash驱动时,通过EFI从BIOS的固定的内存中获取新的分区信息,以新的分区信息初始化Flash分区。其中,以新的分区信息初始化Flash分区是通过在OS运行的过程中,以新的分区信息重新初始化Flash分区,以完成分区调整。The initialization module 12 reloads the Flash driver. When the Flash driver is loaded, the new partition information is obtained from the fixed memory of the BIOS through EFI, and the Flash partition is initialized with the new partition information. The initialization of the Flash partition with the new partition information is performed by re-initializing the Flash partition with new partition information during the running of the OS to complete the partition adjustment.
请参阅图9,本申请基于闪存存储的系统的一个实施方式包括与电源(VCC)23连接的处理器21以及分别与电源(VCC)23和处理器21电连接的闪存22,其中:Referring to FIG. 9, one embodiment of a system based on flash memory storage of the present application includes a processor 21 coupled to a power source (VCC) 23 and a flash memory 22 electrically coupled to a power source (VCC) 23 and a processor 21, respectively, wherein:
处理器21用于在BIOS在运行过程中,第一次初始化Flash分区,获得第一次初始化Flash分区后的第一分区信息,在OS在运行过程中,从BIOS获取第一分区信息,并利用第一分区信息第二次初始化Flash分区,获得第二次初始化Flash分区后的第二分区信息,并将第一分区信息和第二分区信息发送给闪存22进行保存;The processor 21 is configured to initialize the Flash partition for the first time during the running of the BIOS, obtain the first partition information after the first initialization of the Flash partition, and obtain the first partition information from the BIOS during the running of the OS, and utilize the first partition information. The first partition information initializes the Flash partition for the second time, obtains the second partition information after the second initialization of the Flash partition, and sends the first partition information and the second partition information to the flash memory 22 for storage;
处理器21与电源(VCC)23电连接,通过电源(VCC)23给处理器21供电,同时处理器21另一端与闪存22电连接,控制对系统的Flash分区以及Flash分区的调整。The processor 21 is electrically connected to the power supply (VCC) 23, and supplies power to the processor 21 through the power supply (VCC) 23. The other end of the processor 21 is electrically connected to the flash memory 22 to control the adjustment of the Flash partition and the Flash partition of the system.
处理器21在系统电启动后,分别在BIOS运行的过程中进行第一次初始化Flash分区,在OS运行的过程获取第一次初始化Flash分区得到的第一分区信息,利用第一分区信息进行第二次初始化Flash分区得到第二分区信息。将第一分区信息和第二分区信息发送给独立于BIOS和OS之外的存储器22进行保存。从而可以实现BIOS和OS分区信息统一,解决BIOS和OS分区信息不同源的问题。After the system is powered on, the processor 21 first initializes the Flash partition during the running of the BIOS, and obtains the first partition information obtained by initializing the Flash partition for the first time in the running process of the OS, and uses the first partition information to perform the first The second partition is initialized by the Flash partition to obtain the second partition information. The first partition information and the second partition information are transmitted to the memory 22 independent of the BIOS and the OS for storage. Therefore, the BIOS and OS partition information can be unified, and the problems of different sources of BIOS and OS partition information can be solved.
闪存22的一端与电源(VCC)23连接,通过电源(VCC)23给闪存22供电,闪存22的另一端与处理器21电连接,用于独立于BIOS和OS之外,存储系统内的数据以及闪存的分区信息。One end of the flash memory 22 is connected to a power supply (VCC) 23, and the flash memory 22 is powered by a power supply (VCC) 23. The other end of the flash memory 22 is electrically connected to the processor 21 for storing data in the system independently of the BIOS and the OS. And the partition information of the flash memory.
当然,在实际应用过程中,闪存的分区信息可以采用别的存储器比如EEPROM来进行存储。Of course, in the actual application process, the partition information of the flash memory can be stored by using another memory such as an EEPROM.
另一方面,在基于BIOS和OS分区信息统一的基础上,如果需要对Flash分区进行扩大、缩减,以及删除、增加、合并分区等,可以通过处理器21对Flash分区的进行调整。处理器21通过EFI获取独立于BIOS和OS之外保存的待调整分区的分区信息,并接收修改后的待调整分区的分区信息,以修改后的待调整分区的分区信息初始化Flash分区来实现对Flash分区的调整。On the other hand, based on the unified BIOS and OS partition information, if the Flash partition needs to be expanded, reduced, deleted, added, merged, etc., the Flash partition can be adjusted by the processor 21. The processor 21 obtains the partition information of the to-be-adjusted partition saved by the BIOS and the OS through the EFI, and receives the modified partition information of the partition to be adjusted, and initializes the Flash partition with the modified partition information of the to-be-adjusted partition to implement the pair. Adjustment of the Flash partition.
通过上述实施方式的描述,区别于现有技术,本申请的优点在于:本申请在BIOS运行过程中,第一次初始化Flash分区,并将第一次初始化后得到的第一分区信息传送给OS,在OS运行过程中利用第一分区信息第二次初始化Flash分区,以实现BIOS和OS采用统一的分区信息初始化Flash分区,解决BIOS和OS分区信息不同源的问题。消除BIOS及OS版本配套问题,从而降低升级不配套导致分区无法使用的风险。并将第一分区信息以及第二分区信息都保存至同一独立于BIOS和OS之外的分区信息存储介质中,实现BIOS和OS分区信息同源。The description of the foregoing embodiment is different from the prior art. The advantage of the present application is that the present application initializes the Flash partition for the first time during the BIOS operation, and transmits the first partition information obtained after the first initialization to the OS. In the OS running process, the first partition information is used to initialize the Flash partition for the second time, so that the BIOS and the OS use the unified partition information to initialize the Flash partition, and solve the problem of different sources of BIOS and OS partition information. Eliminate the BIOS and OS version matching issues, thus reducing the risk of the partition being unusable due to the upgrade failure. The first partition information and the second partition information are all saved to the same partition information storage medium independent of the BIOS and the OS, and the BIOS and the OS partition information are the same.
在BIOS和OS分区信息统一的基础上,在分区支持的范围内,通过修改需要调整的Flash分区的分区信息来对Flash分区进行调整,使在调整分区时,BIOS和OS无版本配套关系。能够实现分区信息的共享和Flash分区大小的灵活伸缩调整,提高系统的扩展性。On the basis of the unified BIOS and OS partition information, the Flash partition is adjusted by modifying the partition information of the Flash partition to be adjusted within the scope of the partition support, so that the BIOS and the OS have no version matching relationship when the partition is adjusted. It can realize the sharing of partition information and the flexible scaling of the size of the Flash partition to improve the scalability of the system.
另一方面,在调整的过程中对Flash分区内的数据进行备份能够防止因分区调整导致数据丢失或无法访问的情况,增强Flash分区内数据的可靠性。将调整分区后的分区信息重新保存至独立的存放分区信息的介质中,既保证分区信息不丢失,也避免了分区调整后访问数据出错,同时也便于以后再次对Flash分区进行调整。On the other hand, backing up the data in the Flash partition during the adjustment process can prevent data loss or inaccessibility due to partition adjustment, and enhance the reliability of the data in the Flash partition. The partition information after the partition is re-saved to the independent media for storing the partition information, which not only ensures that the partition information is not lost, but also avoids the error of accessing the data after the partition adjustment, and also facilitates adjustment of the Flash partition again in the future.
在本申请所提供的几个实施方式中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device implementations described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的功能模块可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。The functional modules described as separate components may or may not be physically separated. The components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
另外,在本申请各个实施方式中的各功能模块可以集成在一个处理单元中,也可以是各个功能模块单独物理存在,也可以两个或两个以上功能模块集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each functional module may exist physically separately, or two or more functional modules may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only
Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only)
Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.
以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above description is only the embodiment of the present application, and thus does not limit the scope of the patent application, and the equivalent structure or equivalent process transformation of the specification and the drawings of the present application, or directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of this application.
Claims (11)
- 一种基于闪存存储系统的分区方法,其特征在于,包括:A partitioning method based on a flash storage system, comprising:获取基本输入输出系统第一次初始化闪存分区后得到的第一分区信息,将所述第一分区信息保存至分区信息存储介质中,所述分区信息存储介质是独立于所述基本输入输出系统和所述操作系统之外的存储介质;Acquiring first partition information obtained after the basic input/output system first initializes the flash partition, and saving the first partition information to the partition information storage medium, the partition information storage medium is independent of the basic input output system and a storage medium other than the operating system;根据所述第一分区信息在操作系统运行过程中第二次初始化所述闪存分区,获取所述第二次初始化闪存分区后得到的第二分区信息;And initializing the flash partition for the second time according to the first partition information, and acquiring the second partition information obtained after the second initialization of the flash partition.将所述第二分区信息,保存至所述分区信息存储介质中。 And saving the second partition information to the partition information storage medium.
- 根据权利要求1所述的方法,其特征在于,所述获取基本输入输出系统第一次初始化闪存分区后得到的第一分区信息的步骤之前,包括:The method according to claim 1, wherein the step of obtaining the first partition information obtained after the basic input/output system first initializes the flash partition is:判断所述分区信息存储介质中是否有闪存分区信息; Determining whether there is flash partition information in the partition information storage medium;若所述分区信息存储介质中有闪存分区信息,则获取所述闪存分区信息,根据所述闪存分区信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息;若所述分区信息存储介质中没有闪存分区信息,则根据基础配置信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息。And if the partition information storage medium has flash partition information, acquiring the flash partition information, and initializing the flash partition for the first time in the process of running the basic input/output system according to the flash partition information, to obtain the first partition. If the flash partition information is not in the partition information storage medium, the flash partition is initialized for the first time in the process of running the basic input/output system according to the basic configuration information to obtain the first partition information.
- 根据权利要求1或2所述的方法,其特征在于,所述将第二分区信息,保存至所述分区信息存储介质中的步骤之后,还包括:The method according to claim 1 or 2, wherein after the step of saving the second partition information to the partition information storage medium, the method further comprises:获取所述分区信息存储介质中的分区信息,在分区支持的范围内,对待调整分区的分区信息进行修改;Obtaining the partition information in the partition information storage medium, and modifying the partition information of the partition to be adjusted within a range supported by the partition;以新的分区信息初始化闪存分区,所述新的分区信息包括修改后的待调整分区的分区信息和未修改的其他分区的分区信息。The flash partition is initialized with new partition information, and the new partition information includes partition information of the modified partition to be adjusted and partition information of other partitions that are not modified.
- 根据权利要求1-3任一项所述的方法,其特征在于,所述以新的分区信息初始化闪存分区的步骤之后,还包括:将所述新的分区信息,保存至所述分区信息存储介质中。The method according to any one of claims 1 to 3, wherein after the step of initializing the flash partition with the new partition information, the method further comprises: saving the new partition information to the partition information storage In the medium.
- 根据权利要求1-4任一项所述的方法,其特征在于,所述分区信息至少包括分区名称、分区起始地址、分区大小或分区是否支持调整的信息。The method according to any one of claims 1 to 4, wherein the partition information includes at least a partition name, a partition start address, a partition size, or information on whether the partition supports adjustment.
- 一种基于闪存存储系统的分区装置,其特征在于,包括获取模块、保存模块以及初始化模块,其中: A partitioning device based on a flash storage system, comprising: an obtaining module, a saving module, and an initialization module, wherein:所述获取模块,用于获取基本输入输出系统第一次初始化闪存分区后得到的第一分区信息,并将所述第一分区信息发送给所述保存模块;The obtaining module is configured to obtain first partition information obtained after the basic input/output system initializes the flash partition for the first time, and send the first partition information to the saving module;所述初始化模块,用于接收来自所述获取模块的所述第一分区信息并利用所述第一分区信息第二次初始化闪存分区,获得第二分区信息,并将所述第二分区信息发送给所述保存模块;The initialization module is configured to receive the first partition information from the acquiring module, and initialize the flash partition by using the first partition information for a second time, obtain second partition information, and send the second partition information Giving the save module;所述保存模块,用于将所述第一分区信息和第二分区信息保存至同一分区信息存储介质中,所述分区信息存储介质是独立于所述基本输入输出系统和所述操作系统之外的存储介质。The saving module is configured to save the first partition information and the second partition information into a same partition information storage medium, the partition information storage medium being independent of the basic input output system and the operating system Storage medium.
- 根据权利要求6所述的装置,其特征在于,所述初始化模块还用于在基本输入输出系统运行的过程中,第一次初始化闪存分区以得到第一分区信息,包括判断单元和初始化单元,其中:The device according to claim 6, wherein the initialization module is further configured to initialize the flash partition for the first time to obtain the first partition information, including the determining unit and the initializing unit, during the operation of the basic input/output system. among them:所述判断单元用于判断所述分区信息存储介质中是否有闪存分区信息,并将判断结果发送给所述初始化单元;The determining unit is configured to determine whether there is flash partition information in the partition information storage medium, and send the determination result to the initialization unit;所述初始化单元用于当所述分区信息存储介质中有闪存分区信息时,获取所述闪存分区信息,根据所述闪存分区信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息;或用于当所述分区信息存储介质中没有闪存分区信息时,根据基础配置信息在基本输入输出系统运行的过程中第一次初始化闪存分区,以得到所述第一分区信息。The initialization unit is configured to acquire the flash partition information when the partition information storage medium has flash partition information, and initialize the flash partition for the first time in the process of running the basic input/output system according to the flash partition information, Obtaining the first partition information; or when the flash partition information is not in the partition information storage medium, initializing the flash partition for the first time in the process of running the basic input/output system according to the basic configuration information, to obtain the first One partition information.
- 根据权利要求6或7所述的装置,其特征在于,所述装置还包括修改模块,其中:The apparatus according to claim 6 or 7, wherein said apparatus further comprises a modification module, wherein:所述修改模块用于获取所述分区信息存储介质中的分区信息,在分区支持的范围内,对待调整分区的分区信息进行修改,并将修改后的分区信息发送给所述初始化模块;The modifying module is configured to obtain the partition information in the partition information storage medium, modify the partition information of the partition to be adjusted, and send the modified partition information to the initialization module.所述初始化模块用于以新的分区信息初始化闪存分区,所述新的分区信息包括修改后的待调整分区的分区信息和未修改的其他分区的分区信息。The initialization module is configured to initialize a flash partition with new partition information, where the new partition information includes partition information of the modified partition to be adjusted and partition information of other partitions that are not modified.
- 根据权利要求6-8任一项所述的装置,其特征在于,所述保存模块还用于将所述新的分区信息,保存至所述分区信息存储介质中。The device according to any one of claims 6-8, wherein the saving module is further configured to save the new partition information to the partition information storage medium.
- 根据权利要求6-9任一项所述的装置,其特征在于,所述分区信息至少包括分区名称、分区起始地址、分区大小或分区是否支持调整的信息。The apparatus according to any one of claims 6-9, wherein the partition information includes at least a partition name, a partition start address, a partition size, or information whether the partition supports adjustment.
- 一种基于闪存存储的系统,其特征在于,包括处理器以及与处理器电连接的闪存,其中:A flash memory based system, comprising: a processor and a flash memory electrically coupled to the processor, wherein:所述处理器用于在基本输入输出系统在运行过程中,第一次初始化闪存分区,获得所述第一次初始化闪存分区后的第一分区信息,在操作系统在运行过程中,获取所述第一分区信息,并利用所述第一分区信息第二次初始化闪存分区,获得第二次初始化闪存分区后的第二分区信息,并将所述第一分区信息和第二分区信息发送给所述闪存进行保存;The processor is configured to initialize the flash partition for the first time during the running of the basic input/output system, obtain the first partition information after the first initialization of the flash partition, and obtain the first part during the running process of the operating system. a partition information, and using the first partition information to initialize the flash partition a second time, obtaining the second partition information after the second initialization of the flash partition, and transmitting the first partition information and the second partition information to the Flash memory is saved;所述闪存在独立于所述基本输入输出系统和操作系统之外的区域存储所述系统内的数据以及闪存的分区信息。The flash memory stores data within the system and partition information of the flash memory in an area other than the basic input output system and the operating system.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201280002993.5A CN103392174B (en) | 2012-11-29 | 2012-11-29 | System, partitioning method and device based on flash storage |
PCT/CN2012/085538 WO2014082250A1 (en) | 2012-11-29 | 2012-11-29 | System, partition method and device based on flash memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2012/085538 WO2014082250A1 (en) | 2012-11-29 | 2012-11-29 | System, partition method and device based on flash memory |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2014082250A1 true WO2014082250A1 (en) | 2014-06-05 |
Family
ID=49535838
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/085538 WO2014082250A1 (en) | 2012-11-29 | 2012-11-29 | System, partition method and device based on flash memory |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103392174B (en) |
WO (1) | WO2014082250A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104021022B (en) * | 2014-06-23 | 2017-12-29 | 联想(北京)有限公司 | A kind of subarea adjustment and electronic equipment |
CN107733674B (en) * | 2016-08-12 | 2021-03-09 | 北京小米移动软件有限公司 | Component upgrading method and terminal |
CN113064604B (en) * | 2021-03-18 | 2022-06-21 | 瑞芯微电子股份有限公司 | Firmware upgrading method and device |
CN113032290B (en) * | 2021-03-19 | 2024-01-19 | 维沃移动通信有限公司 | Flash memory configuration method, flash memory configuration device, electronic equipment and storage medium |
CN114241535B (en) * | 2021-12-01 | 2022-09-27 | 佛山市红狐物联网科技有限公司 | Rapid palm vein feature extraction method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030172228A1 (en) * | 2002-03-07 | 2003-09-11 | International Business Machines Corporation | Method and system for extending a hardfile partition table |
US7065627B2 (en) * | 2002-03-25 | 2006-06-20 | International Business Machines Corporation | Method and system for providing an event driven image for a boot record |
CN102439565A (en) * | 2011-10-28 | 2012-05-02 | 华为技术有限公司 | Method and device for starting recovery |
CN102591691A (en) * | 2011-12-31 | 2012-07-18 | 曙光信息产业股份有限公司 | Hard disc starting method and operation system starting and loading method based on basic input/output system (BIOS) |
-
2012
- 2012-11-29 WO PCT/CN2012/085538 patent/WO2014082250A1/en active Application Filing
- 2012-11-29 CN CN201280002993.5A patent/CN103392174B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030172228A1 (en) * | 2002-03-07 | 2003-09-11 | International Business Machines Corporation | Method and system for extending a hardfile partition table |
US7065627B2 (en) * | 2002-03-25 | 2006-06-20 | International Business Machines Corporation | Method and system for providing an event driven image for a boot record |
CN102439565A (en) * | 2011-10-28 | 2012-05-02 | 华为技术有限公司 | Method and device for starting recovery |
CN102591691A (en) * | 2011-12-31 | 2012-07-18 | 曙光信息产业股份有限公司 | Hard disc starting method and operation system starting and loading method based on basic input/output system (BIOS) |
Also Published As
Publication number | Publication date |
---|---|
CN103392174B (en) | 2015-11-25 |
CN103392174A (en) | 2013-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2014082250A1 (en) | System, partition method and device based on flash memory | |
US8015396B2 (en) | Method for changing booting configuration and computer system capable of booting OS | |
WO2011105860A2 (en) | Method and apparatus for generating minimum boot image | |
WO2018076889A1 (en) | Data backup method, device, system, storage medium and server | |
US20140129819A1 (en) | Cloud cluster system and boot deployment method for the same | |
WO2013149460A1 (en) | Over the air upgrade method for continuous increment of android handheld device | |
WO2018076841A1 (en) | Data sharing method, apparatus, storage medium and server | |
WO2013133530A1 (en) | Electronic device to restore mbr, method thereof, and computer-readable medium | |
WO2018076867A1 (en) | Data backup deleting method, device and system, storage medium and server | |
US20140122860A1 (en) | Cloud system and boot deployment method for the cloud system | |
WO2017185954A1 (en) | Method, host, and system for implementing usb device management | |
WO2014106997A1 (en) | Processor module, micro-server, and method of using processor module | |
WO2015180434A1 (en) | Data management method, node and system for database cluster | |
CN103049295A (en) | Network installation method for Linux operating systems with godson platforms | |
WO2018120680A1 (en) | Virtual disk backup system, method, apparatus, service host and storage medium | |
WO2014089781A1 (en) | Hard disk system operating method, storage system, and processor | |
CN113157046B (en) | Method, device and system for managing server BMC time | |
WO2019062098A1 (en) | Method of mounting disk array, android device and storage medium | |
WO2022080539A1 (en) | Software update gateway and method for updating software of iot device | |
WO2021040168A1 (en) | Data structuring method for difference between old and new data, and device therefor | |
WO2012159436A1 (en) | Method and device for adjusting disk partitions in windows | |
KR20030036857A (en) | Method and apparatus for booting the operating environment of an autonomous subsystem in a computer based system without involvement of the main operating system | |
WO2020244156A1 (en) | Partition recognition method, apparatus, device for network block device, and storage medium | |
WO2017067285A1 (en) | Method and device for signing phone-flashing system image and terminal | |
WO2019019341A1 (en) | File storage method, terminal and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12889347 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 12889347 Country of ref document: EP Kind code of ref document: A1 |