CN103392174B - Based on the system of flash memory storage, partition method and device - Google Patents

Based on the system of flash memory storage, partition method and device Download PDF

Info

Publication number
CN103392174B
CN103392174B CN201280002993.5A CN201280002993A CN103392174B CN 103392174 B CN103392174 B CN 103392174B CN 201280002993 A CN201280002993 A CN 201280002993A CN 103392174 B CN103392174 B CN 103392174B
Authority
CN
China
Prior art keywords
partition information
partition
flash
information
subregion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201280002993.5A
Other languages
Chinese (zh)
Other versions
CN103392174A (en
Inventor
杜开田
方峰
魏志军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN103392174A publication Critical patent/CN103392174A/en
Application granted granted Critical
Publication of CN103392174B publication Critical patent/CN103392174B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory

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

This application discloses the subarea adjustment based on flash memory storage and device.Subarea adjustment wherein based on flash memory storage comprises: the partition information obtaining subregion to be adjusted, this partition information adopts identical partition information to carry out initialization flash partition by BIOS and OS and obtains, and independent of the partition information preserved outside BIOS and OS; Stop the access to all flash partitions, receive the partition information of amended subregion to be adjusted; With new partition information initialization flash partition, new partition information comprises the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions.By the way, the application can realize the flexible flexibly adjustment of sharing of partition information and Flash partition size, improves the extendability of system.

Description

Based on the system of flash memory storage, partition method and device
Technical field
The present invention relates to based on the system of flash memory storage, partition method and device.
Background technology
In embedded systems, Flash (flash memory) is the valuable source of storage code and data (as program, daily record, configuration file, patch information etc.), and effective utilization of Flash resource, is related to stability and the cost of this system product.
At present, in order to improve the reliability of different types of data access, usually Flash being divided into different subregions and using.As shown in Figure 1, in the process that system starts, Basic Input or Output System (BIOS) (BIOS) and operating system (OS) can access the data of identical partitions to a kind of partitioned organization wherein.Such as in the process of BIOS operation, the daily record of generation needs to be recorded to corresponding subregion, needs to be read by OS simultaneously; Or in the process of BIOS operation, need the flexible configuration according to configuration information practical function, need to be configured by OS simultaneously; Or in the process of BIOS operation, can upgrade program (program), need to be upgraded by OS simultaneously.
In prior art, Flash carries out subregion and usually adopts static partition scheme.Adopt this static partition scheme, if during the available free storage space in certain function memory block, this Flash partition resource cannot be utilized, makes expanding of system function limited.
Summary of the invention
The technical matters that the application mainly solves is to provide a kind of system based on flash memory storage, partition method and device, the partition information of BIOS and OS can be unified, realize the flexible flexibly adjustment with Flash partition size of sharing of partition information, improve the extendability of system.
First aspect, provide a kind of partition method based on flash-memory storage system, comprise: the first partition information obtained after obtaining Basic Input or Output System (BIOS) first time initialization flash partition, described first partition information is saved in partition information storage medium, described partition information storage medium be independent of described Basic Input or Output System (BIOS) and described operating system outside storage medium; According to described first partition information flash partition described in second time initialization in operating system process, the second partition information obtained after obtaining described second time initialization flash partition; By described second partition information, be saved in described partition information storage medium.
In conjunction with first aspect, in the implementation that the first is possible: before the step of the first partition information obtained after described acquisition Basic Input or Output System (BIOS) first time initialization flash partition, comprising: judge whether have flash partition information in described partition information storage medium; If have flash partition information in described partition information storage medium, then obtain described flash partition information, first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to described flash partition information, to obtain described first partition information; If do not have flash partition information in described partition information storage medium, then first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to configurations information, to obtain described first partition information.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second is possible: described by described first partition information and the second partition information, after being saved to the step in the storage medium outside independent of Basic Input or Output System (BIOS) and operating system respectively, also comprise: obtain the partition information in described partition information storage medium, in the scope that subregion is supported, the partition information of subregion to be adjusted is modified; With new partition information initialization flash partition, described new partition information comprises the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions.
In conjunction with first aspect, in the implementation that the third is possible: described with after the step of new partition information initialization flash partition, also comprise: by described new partition information, be saved in described partition information storage medium.
In conjunction with first aspect, in the 4th kind of possible implementation: described partition information at least comprises the information whether partition name, subregion start address, partition size or subregion are supported to adjust.
Second aspect, provide a kind of partitioning device based on flash-memory storage system, comprise acquisition module, preserve module and initialization module, wherein: described acquisition module, for the first partition information obtained after obtaining Basic Input or Output System (BIOS) first time initialization flash partition, and described first partition information is sent to described preservation module; Described initialization module, utilizes described first partition information second time initialization flash partition for described first partition information that receives from described acquisition module, obtains the second partition information, and described second partition information is sent to described preservation module; Described preservation module, for described first partition information and the second partition information are saved in partition information storage medium, described partition information storage medium be independent of described Basic Input or Output System (BIOS) and described operating system outside storage medium.
In conjunction with second aspect, in the implementation that the first is possible: described initialization module is also in the process run in Basic Input or Output System (BIOS), first time initialization flash partition is to obtain the first partition information, comprise judging unit and initialization unit, wherein: judged result for judging whether have flash partition information in described partition information storage medium, and is sent to described initialization unit by described judging unit; Described initialization unit is used for when there being flash partition information in described partition information storage medium, obtain described flash partition information, first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to described flash partition information, to obtain described first partition information; Or for when not having flash partition information in described partition information storage medium, first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to configurations information, to obtain described first partition information.
In conjunction with the first possible implementation of second aspect or second aspect, in the implementation that the second is possible: described device also comprises modified module and initialization module, wherein: described modified module is for obtaining the partition information in described partition information storage medium, in the scope that subregion is supported, the partition information of subregion to be adjusted is modified, and amended partition information is sent to described initialization module; Described initialization module is used for new partition information initialization flash partition, and described new partition information comprises the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions.
In conjunction with second aspect, in the implementation that the third is possible: described preservation module also for by described new partition information, is saved in described partition information storage medium.
In conjunction with second aspect, in the 4th kind of possible implementation: described partition information at least comprises the information whether partition name, subregion start address, partition size or subregion are supported to adjust.
The third aspect, provide a kind of system based on flash memory storage, the flash memory comprising processor and be electrically connected with processor, wherein: described processor is used in Basic Input or Output System (BIOS) in operational process, first time initialization flash partition, obtain the first partition information after described first time initialization flash partition, in operating system in operational process, obtain described first partition information, and utilize described first partition information second time initialization flash partition, obtain the second partition information after second time initialization flash partition, and send to described flash memory to preserve described first partition information and the second partition information, described flash memory is at the partition information independent of intrasystem data described in the area stores outside described Basic Input or Output System (BIOS) and operating system and flash memory.
The beneficial effect of the application is: the situation being different from prior art, the application is based on the embodiment of the partition method of flash-memory storage system, in BIOS operational process, first time initialization Flash partition, and send the first partition information obtained after first time initialization to OS, in OS operational process, utilize the first partition information second time initialization Flash partition, adopt unified partition information initialization Flash partition to realize BIOS and OS.Eliminate BIOS and os release corresponding problem, thus reduction upgrading does not match the risk causing subregion to use.And the first partition information and the second partition information are all saved to same as in the partition information storage medium outside BIOS and OS, realize BIOS and OS partition information homology.
On the basis that BIOS and OS partition information is unified, in the scope that subregion is supported, needed the partition information of the Flash partition of adjustment to adjust Flash partition by amendment, make when adjusting subregion, BIOS and OS is without version Matching Relationship.The flexible flexibly adjustment with Flash partition size of sharing of partition information can be realized, improve the extendability of system.
Accompanying drawing explanation
Fig. 1 is a kind of flash partition structural representation of prior art;
Fig. 2 is the process flow diagram of the application based on the partition method embodiment based on flash-memory storage system;
Fig. 3 is the process flow diagram of the application based on first time initialization flash partition in partition method embodiment of flash-memory storage system;
Fig. 4 is that the application is based on the process flow diagram adjusted flash partition in partition method embodiment of flash-memory storage system;
Fig. 5 be the application based in another embodiment of partition method of flash-memory storage system, with the process flow diagram of new partition information initialization flash partition;
Fig. 6 is the structural representation of the application based on a partitioning device embodiment of flash-memory storage system;
Fig. 7 is the structural representation of the application based on initialization module in partitioning device embodiment of flash-memory storage system;
Fig. 8 is the structural representation of the application based on another embodiment of partitioning device of flash-memory storage system;
Fig. 9 is the structural representation of the application based on a system embodiment of flash memory storage.
Embodiment
Current flash memory (Flash) carries out subregion and usually adopts static partition scheme, when Flash is initialized, for the storage space of fixed size is distributed in each function memory block, and the partition information after subregion is cured in BIOS and OS program respectively, the partition information of BIOS and OS is compiled together in company with affiliated BIOS or OS.
The application provides the embodiment of a kind of system based on flash memory storage, partition method and device, can unify the partition information of BIOS and OS, realizes the flexible flexibly adjustment with Flash partition size of sharing of partition information, improves the extendability of system.Below by way of embodiment, elaboration is further done to the application:
The system stored based on Flash involved by the application's embodiment, when system, one can be marked off in advance independent of the medium outside BIOS and OS for depositing separately the storage medium of partition information, this medium can be certain fixed partition of Flash partition also can be other independently storage mediums, such as EEPROM (EEPROM (Electrically Erasable Programmable Read Only Memo)).
Refer to Fig. 2, the application comprises based on an embodiment of the partition method of flash-memory storage system:
Step S101: the first partition information obtained after obtaining Basic Input or Output System (BIOS) first time initialization flash partition, is saved to the first partition information in partition information storage medium;
Wherein, the partition information that the application's embodiment is mentioned refers to the information describing Flash partition situation, and partition information at least comprises partition name, whether subregion start address, partition size, subregion support the information such as adjustment.
After system electrification starts, Flash drives in the process run in Basic Input or Output System (BIOS) (BIOS), and first time initialization Flash partition obtains the first partition information after first time initialization Flash partition.The first partition information obtained leaves in the fixing internal memory of BIOS with the form of parameter list by BIOS.Wherein, Flash drives is a kind of instrument or software of instigating Flash to run.
Flash drives in the process run at OS, reads the first partition information by standard Extensible firmware interface (EFI) from the internal memory that BIOS fixes.And the first partition information is saved in partition information storage medium, partition information storage medium be independent of BIOS and operating system (OS) outside storage medium, can be a subregion of Flash itself, can certainly be other storage medium.Adopt and preserve partition information independent of the storage medium outside BIOS and OS, make Flash partition information BIOS or OS attached with it divide out compiling, the convenient adjustment to Flash partition, and the partition information homology of BIOS and OS can be realized.
Step S102: according to the first partition information flash partition described in second time initialization in operating system process, the second partition information obtained after obtaining second time initialization flash partition;
In the process that OS runs, Flash drives according to the first partition information second time initialization Flash partition, obtains the second partition information after second time initialization Flash partition.
Step S103: the second partition information is saved in described partition information storage medium;
After completing the second time initialization Flash partition in OS operational process, the second partition information that second time initialization Flash partition obtains is deposited in described partition information storage medium.Here partition information storage medium is same storage medium with the storage medium depositing the first partition information, realizes partition information homology with this.The first partition information that the application mentions and the second partition information refer to the partition information obtained after BIOS and OS utilizes identical partition information to carry out initialization Flash respectively, therefore, in fact the first partition information is identical partition information with the second partition information, unified to ensure the partition information of BIOS and OS.
By the elaboration of above-mentioned embodiment, be appreciated that, the application is based on the partition method of flash-memory storage system, in BIOS operational process, first time initialization Flash partition, and send the first partition information obtained after first time initialization to OS, in OS operational process, utilize the first partition information second time initialization Flash partition, adopt unified partition information initialization Flash partition to realize BIOS and OS.Eliminate BIOS and os release corresponding problem, thus reduction upgrading does not match the risk causing subregion to use.And the first partition information and the second partition information are all saved to same as in the partition information storage medium outside BIOS and OS, realize BIOS and OS partition information homology.
On the basis that BIOS and OS partition information is unified, in the scope that subregion is supported, needed the partition information of the Flash partition of adjustment to adjust Flash partition by amendment, make when adjusting subregion, BIOS and OS is without version Matching Relationship.The flexible flexibly adjustment with Flash partition size of sharing of partition information can be realized, improve the extendability of system.
Wherein, refer to Fig. 3, in another embodiment, first time initialization Flash partition comprise following sub-step:
Sub-step S201: judge whether have flash partition information in partition information storage medium;
In the process that BIOS runs, Flash drives in the partition information storage medium that first will judge outside independent of BIOS and OS whether have Flash partition information.Under normal circumstances, system is identified by return state and drives, to indicate whether having Flash partition information to Flash.Such as Flash drives and sends to system the request obtaining partition information, and system returns in 0 expression partition information storage medium does not have Flash partition information, returns in 1 expression partition information storage medium and has Flash partition information.
If there is Flash partition information in partition information storage medium, then perform sub-step S202, if there is no Flash partition information in partition information storage medium, then perform sub-step S203.
Sub-step S202: obtain flash partition information, the flash partition of initialization for the first time in the process run in Basic Input or Output System (BIOS) according to flash partition information, to obtain the first partition information;
If have Flash partition information independent of in the partition information storage medium outside BIOS and OS, then Flash drives according to the Flash partition information first time initialization Flash partition in this medium, obtain the first partition information, and the first partition information is left in the fixing internal memory of BIOS with the form of parameter list.
Sub-step S203: first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to configurations information, to obtain the first partition information;
If do not have Flash partition information independent of in the partition information storage medium outside BIOS and OS, then Flash drives the configurations information obtaining BIOS, and according to this configurations information first time initialization Flash partition, to obtain the first partition information.And the first partition information obtained after first time initialization Flash partition is left in the fixing internal memory of BIOS with the form of parameter list.Here primary partition information when configurations information is design system, is solidificated in BIOS.
By above-mentioned embodiment, realize the unified also homology of BIOS and OS partition information, on this basis, can be implemented in the scope of subregion support, Flash partition is adjusted.
Refer to Fig. 4, the application, based in another embodiment of partition method of flash-memory storage system, carries out adjustment to Flash partition and comprises the following steps:
Step S301: obtain the partition information in partition information storage medium, in the scope that subregion is supported, modifies to the partition information of subregion to be adjusted;
Here partition information is that BIOS and OS adopts identical partition information, carries out initialization Flash partition respectively, thus obtain independent of the partition information preserved in the partition information storage medium outside BIOS and OS.
Therefore, when needs adjust Flash partition, Flash is driven through EFI and obtains independent of the partition information preserved in the partition information storage medium outside BIOS and OS, and judge whether subregion meets regularization condition according to this partition information, whether subregion such as to be adjusted supports adjustment, subregion support to be adjusted tunes up or turns down etc., simultaneously, the adjustment of current bay will inevitably cause its next door subregion also to follow adjustment, therefore, also to judge the next door subregion of subregion to be adjusted whether also satisfy the demand adjustment scope.Such as certain subregion A needs to tune up, but its next door subregion does not have enough spaces to support the scope that A tunes up not meet regularization condition yet.If do not meet regularization condition, directly exit subregion adjustment, if meet regularization condition, stop the access to all Flash partition, in the scope that subregion is supported, Flash is driven and can be modified by coding or the certain partition information of instrument to subregion to be adjusted.Certainly, also can be modified to the partition information of subregion to be adjusted by user.
Flash drives the partition information receiving amended subregion to be adjusted, judge that whether the partition information of amended subregion to be adjusted is legal and effective, namely according to the partition information of amended subregion to be adjusted, judge whether subregion to be adjusted and its next door subregion support the scope revised.The partition size that such as subregion A to be adjusted supports is 1G, and support toward little adjustment, so judge that the partition size of amended A is whether within the scope of 1G, whether be toward little adjustment, judge whether next door subregion such as B, C subregion of subregion A supports the setting range of A simultaneously.If the partition information of amended A subregion is greater than 1G or cannot supports the partition size after adjusting toward large adjustment or next door subregion, then think that the partition information of amendment is illegal, only have the partition information of amendment to meet all regularization conditions simultaneously and just think that the partition information of amendment is effectively legal.
If the partition information of amendment is effectively legal, forms new partition information with the partition information of the partition information of amended subregion to be adjusted and other unmodified subregions, carry out step S302, otherwise, exit subregion adjustment.
In actual application, in order to the loss of data preventing subregion adjustment from causing in subregion, after stopping the access to all Flash partition, by the data backup in all Flash partition to internal memory or in interim storage medium, and then the partition information of subregion to be adjusted can be revised.
Step S302: with new partition information initialization flash partition;
Flash drives and utilizes new partition information (i.e. the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions), initialization Flash partition, obtain the partition information after adjustment subregion, and by the data convert in all Flash partition of backup extremely with in the Flash partition (Flash partition namely after adjustment) after new partition information initialization.
After completing the adjustment of Flash partition, by the corresponding Flash partition after the data convert in the Flash partition to be adjusted of backup to adjustment, loss of data can be avoided.
Makeing mistakes to ensure that the partition information after adjusting is not lost and prevented subregion from adjusting rear visit data, the partition information partition information be saved to outside independent of BIOS and OS after adjustment subregion being deposited in medium, completes subregion adjustment.
By with upper type, can expand Flash partition, reduce, and delete, increase, merge the operation such as subregion.
By the elaboration of above-mentioned embodiment, the application by the partition information of amendment subregion to be adjusted, and carrys out initialization Flash partition with the partition information of amended subregion to be adjusted and other unmodified partition informations, thus realizes the adjustment to Flash partition.Because partition information makes BIOS and OS adopt identical partition information, carry out initialization Flash partition respectively and obtain, and independent of the partition information preserved outside Basic Input or Output System (BIOS) and operating system, therefore, ensure that the partition information of BIOS and OS is unified.On the basis that BIOS and OS partition information is unified, needed the partition information of the Flash partition of adjustment to adjust Flash partition by amendment, make when adjusting subregion, BIOS and OS is without version Matching Relationship.The flexible flexibly adjustment with Flash partition size of sharing of partition information can be realized, improve the extendability of system.
On the other hand, carry out backing up the situation that can prevent because subregion adjustment causes loss of data maybe cannot access to the data in Flash partition in the process of adjustment, strengthen the reliability of data in Flash partition.Again be saved to by partition information after adjustment subregion and independently deposit in the medium of partition information, both ensured that partition information is not lost, after it also avoid subregion adjustment, visit data is made mistakes, and again adjusts Flash partition after being also convenient to simultaneously.
In another embodiment, can Fig. 5 be consulted with the step of the partition information initialization Flash partition of the partition information of amended subregion to be adjusted and other unmodified subregions, comprise following sub-step:
Sub-step S401: by standard Extensible firmware interface, upgrades the partition information in the fixing internal memory of Basic Input or Output System (BIOS) with new partition information;
Pass through EFI, new partition information (i.e. the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions) is saved in the fixing internal memory of BIOS, replace original partition information with new partition information, realize the renewal of partition information.
Sub-step S402: unloading flash drive;
Existing Flash is driven unloading, so that reload Flash driving to obtain new partition information.
Sub-step S403: reload flash drive, obtains new partition information by standard Extensible firmware interface, with new partition information initialization flash partition.
Reload Flash to drive, when loading Flash and driving, from the fixing internal memory of BIOS, obtain new partition information, with new partition information initialization Flash partition by EFI.Wherein, being in the process by running at OS with new partition information initialization Flash partition, reinitializing Flash partition with new partition information, to complete subregion adjustment.
Refer to Fig. 6, the application comprises acquisition module 11, initialization module 12 based on an embodiment of the partitioning device of flash-memory storage system and preserves module 13, wherein:
Acquisition module 11, for the first partition information obtained after obtaining Basic Input or Output System (BIOS) first time initialization Flash partition, and sends to initialization module 12 and preserves module 13 by the first partition information;
Wherein, the partition information that the application's embodiment is mentioned refers to the information describing Flash partition situation, and partition information at least comprises partition name, whether subregion start address, partition size, subregion support the information such as adjustment.
After system electrification starts, in the process that Basic Input or Output System (BIOS) (BIOS) is run, first time initialization Flash partition, obtains the first partition information after first time initialization Flash partition.The first partition information obtained leaves in the fixing internal memory of BIOS with the form of parameter list by BIOS.
In the process that OS runs, acquisition module 11 reads the first partition information by standard Extensible firmware interface (EFI) from the internal memory that BIOS fixes.And the first partition information is sent to preservation module 13 and initialization module 12.
Initialization module 12, utilizes the first partition information second time initialization Flash partition for the first partition information of receiving from acquisition module 11, obtains the second partition information, and is sent to by the second partition information and preserve module 13;
In the process that OS runs, initialization module 12, according to the first partition information second time initialization Flash partition, obtains the second partition information after second time initialization Flash partition, is sent to by the second partition information and preserve module 13.
Preserve module 13, for the first partition information and the second partition information are saved in same partition information storage medium, wherein, partition information storage medium be independent of BIOS and OS outside storage medium;
Preserve module 13 first partition information and the second partition information to be saved in the same partition information storage medium outside independent of BIOS and OS, realize partition information homology with this.The first partition information that the application mentions and the second partition information refer to the partition information obtained after BIOS and OS utilizes identical partition information to carry out initialization Flash respectively, therefore, in fact the first partition information is identical partition information with the second partition information, unified to ensure the partition information of BIOS and OS.
Wherein, initialization module 12 is also in the process run in Basic Input or Output System (BIOS), and first time initialization Flash partition is to obtain the first partition information.
Please continue to refer to consulting Fig. 7, in another embodiment, initialization module 12 comprises judging unit 111 and initialization unit 112, wherein:
Judging unit 111, for judging whether there is Flash partition information in partition information storage medium, and sends to initialization unit 112 by judged result;
In the process that BIOS runs, first judging unit 111 will judge whether there is Flash partition information in the partition information storage medium outside independent of BIOS and OS.Under normal circumstances, system identifies to indicate whether there is Flash partition information by return state.Such as Flash drives and sends to system the request obtaining partition information, and system returns in 0 expression partition information storage medium does not have Flash partition information, returns in 1 expression partition information storage medium and has Flash partition information.Judged result is sent to initialization unit 112 by judging unit 111.
Initialization unit 112 is for when there being Flash partition information in partition information storage medium, obtain Flash partition information, first time initialization Flash partition in the process run in Basic Input or Output System (BIOS) according to Flash partition information, to obtain the first partition information; Or for when not having Flash partition information in partition information storage medium, first time initialization Flash partition in the process run in Basic Input or Output System (BIOS) according to configurations information, to obtain the first partition information.
If have Flash partition information independent of in the partition information storage medium outside BIOS and OS, initialization unit 112 is according to the Flash partition information first time initialization Flash partition in this medium, obtain the first partition information, and the first partition information is left in the fixing internal memory of BIOS with the form of parameter list.
If do not have Flash partition information independent of in the partition information storage medium outside BIOS and OS, initialization unit 112 obtains the configurations information of BIOS, and according to this configurations information first time initialization Flash partition, to obtain the first partition information.And the first partition information obtained after first time initialization Flash partition is left in the fixing internal memory of BIOS with the form of parameter list.
Refer to Fig. 8, the application comprises acquisition module 11, initialization module 12 based on another embodiment of the partitioning device of flash-memory storage system, preserves module 13 and modified module 14, wherein:
Acquisition module 11, for the first partition information obtained after obtaining Basic Input or Output System (BIOS) first time initialization Flash partition, and sends to initialization module 12 and preserves module 13 by the first partition information;
Initialization module 12, utilizes the first partition information second time initialization Flash partition for the first partition information of receiving from acquisition module 11, obtains the second partition information, and is sent to by the second partition information and preserve module 13;
Preserve module 13, for the first partition information and the second partition information are saved in same partition information storage medium, wherein, partition information storage medium be independent of BIOS and OS outside storage medium;
Modified module 14, for obtaining the partition information in partition information storage medium, in the scope that subregion is supported, modifying to the partition information of subregion to be adjusted, and amended partition information is sent to initialization module 12;
Here partition information is that BIOS and OS adopts identical partition information, carries out initialization Flash partition respectively, thus obtain independent of the partition information preserved in the partition information storage medium outside BIOS and OS.
Therefore, when needs adjust Flash partition, Flash is driven through EFI and obtains independent of the partition information preserved in the partition information storage medium outside BIOS and OS, and judges whether subregion meets regularization condition according to this partition information.Whether subregion such as to be adjusted supports adjustment, and subregion support to be adjusted tunes up or turns down etc.Meanwhile, the adjustment of current bay will inevitably cause its next door subregion also to follow adjustment, therefore, also to judge the next door subregion of subregion to be adjusted whether also satisfy the demand adjustment scope.Such as certain subregion A needs to tune up, but its next door subregion does not have enough spaces to support the scope that A tunes up not meet regularization condition yet.If do not meet regularization condition, directly exit subregion adjustment, if meet regularization condition, stop the access to all Flash partition, in the scope that subregion is supported, modified module 14 can be modified by coding or the certain partition information of instrument to subregion to be adjusted.
Flash drives the partition information receiving amended subregion to be adjusted, judge that whether the partition information of amended subregion to be adjusted is legal and effective, namely according to the partition information of amended subregion to be adjusted, judge whether subregion to be adjusted and its next door subregion support the scope revised.The partition size that such as subregion A to be adjusted supports is 1G, and support toward little adjustment, so judge that the partition size of amended A is whether within the scope of 1G, whether be toward little adjustment, judge whether next door subregion such as B, C subregion of subregion A supports the setting range of A simultaneously.If the partition information of amended A subregion is greater than 1G or cannot supports the partition size after adjusting toward large adjustment or next door subregion, then think that the partition information of amendment is illegal, only have the partition information of amendment to meet all regularization conditions simultaneously and just think that the partition information of amendment is effectively legal.
If the partition information of amendment is effectively legal, the partition information of amended subregion to be adjusted is sent to initialization module 12.
In actual application, in order to the loss of data preventing subregion adjustment from causing in subregion, after stopping the access to all Flash partition, can by the data backup in all Flash partition to internal memory or in interim storage medium, then modified module 14 revises the partition information of subregion to be adjusted again.
Initialization module 12, for new partition information initialization Flash partition, wherein, new partition information comprises the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions.
Initialization module 12 utilizes new partition information (i.e. the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions), initialization Flash partition, obtain the partition information after adjustment subregion, and by the data convert in all Flash partition of backup extremely with in the Flash partition (Flash partition namely after adjustment) after new partition information initialization.
After completing the adjustment of Flash partition, by the corresponding Flash partition after the data convert in the Flash partition to be adjusted of backup to adjustment, loss of data can be avoided.
Makeing mistakes to ensure that the partition information after adjusting is not lost and prevented subregion from adjusting rear visit data, preserving module 13 and further the partition information partition information be saved to outside independent of BIOS and OS after adjustment subregion being deposited in medium, completing subregion adjustment.
In actual application, initialization module 12 is in the following manner with new partition information initialization Flash partition:
Initialization module 12 passes through EFI, new partition information (i.e. the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions) is saved in the fixing internal memory of BIOS, replace original partition information with new partition information, realize the renewal of partition information.
Existing Flash is driven unloading by initialization module 12, so that reload Flash driving to obtain new partition information.
Initialization module 12 reloads Flash and drives, and when loading Flash and driving, obtains new partition information, with new partition information initialization Flash partition by EFI from the fixing internal memory of BIOS.Wherein, being in the process by running at OS with new partition information initialization Flash partition, reinitializing Flash partition with new partition information, to complete subregion adjustment.
Refer to Fig. 9, the application comprises the processor 21 be connected with power supply (VCC) 23 and the flash memory 22 be electrically connected with power supply (VCC) 23 and processor 21 respectively based on an embodiment of the system of flash memory storage, wherein:
Processor 21 at BIOS in operational process, first time initialization Flash partition, obtain the first partition information after first time initialization Flash partition, at OS in operational process, the first partition information is obtained from BIOS, and utilize the first partition information second time initialization Flash partition, obtain the second partition information after second time initialization Flash partition, and send to flash memory 22 to preserve the first partition information and the second partition information;
Processor 21 is electrically connected with power supply (VCC) 23, and power to processor 21 by power supply (VCC) 23, simultaneous processor 21 other end is electrically connected with flash memory 22, controls the adjustment of Flash partition to system and Flash partition.
Processor 21 is after system electricity starts, first time initialization Flash partition is carried out respectively in the process of BIOS operation, at the first partition information that the Procedure Acquisition first time initialization Flash partition of OS operation obtains, utilize the first partition information to carry out second time initialization Flash partition and obtain the second partition information.The storer 22 outside independent of BIOS and OS is sent to preserve the first partition information and the second partition information.Thus it is unified to realize BIOS and OS partition information, solve the problem of BIOS and OS partition information not homology.
One end of flash memory 22 is connected with power supply (VCC) 23, power to flash memory 22 by power supply (VCC) 23, the other end of flash memory 22 is electrically connected with processor 21, for independent of outside BIOS and OS, and the data in storage system and the partition information of flash memory.
Certainly, in actual application, the partition information of flash memory can adopt other storer such as EEPROM to store.
On the other hand, on the basis unified based on BIOS and OS partition information, if need to expand Flash partition, reduce, and deletion, increase, merging subregion etc., can be adjusted by the carrying out of processor 21 pairs of Flash partition.Processor 21 obtains the partition information independent of the subregion to be adjusted preserved outside BIOS and OS by EFI, and receive the partition information of amended subregion to be adjusted, realize the adjustment to Flash partition with the partition information initialization Flash partition of amended subregion to be adjusted.
By the description of above-mentioned embodiment, be different from prior art, the advantage of the application is: the application is in BIOS operational process, first time initialization Flash partition, and send the first partition information obtained after first time initialization to OS, in OS operational process, utilize the first partition information second time initialization Flash partition, adopt unified partition information initialization Flash partition to realize BIOS and OS, solve the problem of BIOS and OS partition information not homology.Eliminate BIOS and os release corresponding problem, thus reduction upgrading does not match the risk causing subregion to use.And the first partition information and the second partition information are all saved to same as in the partition information storage medium outside BIOS and OS, realize BIOS and OS partition information homology.
On the basis that BIOS and OS partition information is unified, in the scope that subregion is supported, needed the partition information of the Flash partition of adjustment to adjust Flash partition by amendment, make when adjusting subregion, BIOS and OS is without version Matching Relationship.The flexible flexibly adjustment with Flash partition size of sharing of partition information can be realized, improve the extendability of system.
On the other hand, carry out backing up the situation that can prevent because subregion adjustment causes loss of data maybe cannot access to the data in Flash partition in the process of adjustment, strengthen the reliability of data in Flash partition.Again be saved to by partition information after adjustment subregion and independently deposit in the medium of partition information, both ensured that partition information is not lost, after it also avoid subregion adjustment, visit data is made mistakes, and again adjusts Flash partition after being also convenient to simultaneously.
In several embodiments that the application provides, should be understood that disclosed apparatus and method can realize by another way.Such as, device embodiments described above is only schematic, such as, the division of described module or unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described functional module illustrated as separating component can or may not be physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of present embodiment scheme.
In addition, each functional module in each embodiment of the application can be integrated in a processing unit, also can be that the independent physics of each functional module exists, also can two or more functional modules in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that the technical scheme of the application contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform all or part of step of method described in each embodiment of the application.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
The foregoing is only the embodiment of the application; not thereby the scope of the claims of the application is limited; every utilize present specification and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in the scope of patent protection of the application.

Claims (9)

1. based on a partition method for flash-memory storage system, it is characterized in that, comprising:
The first partition information obtained after obtaining Basic Input or Output System (BIOS) first time initialization flash partition, described first partition information is saved in partition information storage medium, described partition information storage medium be independent of described Basic Input or Output System (BIOS) and operating system outside storage medium;
According to described first partition information flash partition described in second time initialization in operating system process, the second partition information obtained after obtaining described second time initialization flash partition;
By described second partition information, be saved in described partition information storage medium;
Obtain the partition information in described partition information storage medium, in the scope that subregion is supported, the partition information of subregion to be adjusted is modified;
With new partition information initialization flash partition, described new partition information comprises the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions.
2. method according to claim 1, is characterized in that, before the step of the first partition information obtained after described acquisition Basic Input or Output System (BIOS) first time initialization flash partition, comprising:
Judge whether have flash partition information in described partition information storage medium;
If have flash partition information in described partition information storage medium, then obtain described flash partition information, first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to described flash partition information, to obtain described first partition information; If do not have flash partition information in described partition information storage medium, then first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to configurations information, to obtain described first partition information.
3. method according to claim 1, is characterized in that, described with after the step of new partition information initialization flash partition, also comprises: by described new partition information, is saved in described partition information storage medium.
4. method according to claim 1, is characterized in that, described partition information at least comprises the information whether partition name, subregion start address, partition size or subregion are supported to adjust.
5. based on a partitioning device for flash-memory storage system, it is characterized in that, comprise acquisition module, preserve module and initialization module, wherein:
Described acquisition module, for the first partition information obtained after obtaining Basic Input or Output System (BIOS) first time initialization flash partition, and sends to described preservation module by described first partition information;
Described initialization module, utilizes described first partition information second time initialization flash partition for described first partition information that receives from described acquisition module, obtains the second partition information, and described second partition information is sent to described preservation module;
Described preservation module, for described first partition information and the second partition information are saved in same partition information storage medium, described partition information storage medium be independent of described Basic Input or Output System (BIOS) and operating system outside storage medium;
Described device also comprises modified module, described modified module is for obtaining the partition information in described partition information storage medium, in the scope that subregion is supported, the partition information of subregion to be adjusted is modified, and amended partition information is sent to described initialization module;
Described initialization module is used for new partition information initialization flash partition, and described new partition information comprises the partition information of amended subregion to be adjusted and the partition information of other unmodified subregions.
6. device according to claim 5, is characterized in that, described initialization module is also in the process run in Basic Input or Output System (BIOS), and first time initialization flash partition, to obtain the first partition information, comprises judging unit and initialization unit, wherein:
Judged result for judging whether have flash partition information in described partition information storage medium, and is sent to described initialization unit by described judging unit;
Described initialization unit is used for when there being flash partition information in described partition information storage medium, obtain described flash partition information, first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to described flash partition information, to obtain described first partition information; Or for when not having flash partition information in described partition information storage medium, first time initialization flash partition in the process run in Basic Input or Output System (BIOS) according to configurations information, to obtain described first partition information.
7. device according to claim 5, is characterized in that, described preservation module also for by described new partition information, is saved in described partition information storage medium.
8. device according to claim 5, is characterized in that, described partition information at least comprises the information whether partition name, subregion start address, partition size or subregion are supported to adjust.
9. based on a system for flash memory storage, it is characterized in that, the flash memory comprising processor and be electrically connected with processor, wherein:
Described processor is used in Basic Input or Output System (BIOS) in operational process, first time initialization flash partition, obtain the first partition information after described first time initialization flash partition, in operating system in operational process, obtain described first partition information, and utilize described first partition information second time initialization flash partition, obtain the second partition information after second time initialization flash partition, and send to described flash memory to preserve described first partition information and the second partition information;
Described processor obtains the partition information independent of the subregion to be adjusted preserved outside Basic Input or Output System (BIOS) and operating system, in the scope that subregion is supported, amendment needs the flash partition of adjustment, with the partition information initialization flash partition of amended subregion to be adjusted;
Described flash memory independent of described in the area stores outside described Basic Input or Output System (BIOS) and operating system based on the intrasystem data of flash memory storage and the partition information of flash memory.
CN201280002993.5A 2012-11-29 2012-11-29 Based on the system of flash memory storage, partition method and device Active CN103392174B (en)

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 (2)

Publication Number Publication Date
CN103392174A CN103392174A (en) 2013-11-13
CN103392174B true CN103392174B (en) 2015-11-25

Family

ID=49535838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201280002993.5A Active CN103392174B (en) 2012-11-29 2012-11-29 Based on the system of flash memory storage, partition method and device

Country Status (2)

Country Link
CN (1) CN103392174B (en)
WO (1) WO2014082250A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
WO2014082250A1 (en) 2014-06-05
CN103392174A (en) 2013-11-13

Similar Documents

Publication Publication Date Title
CN102099787B (en) Systems and methods for installing a bootable virtual storage appliance on a virtualized server platform
CN103392174B (en) Based on the system of flash memory storage, partition method and device
KR102269452B1 (en) Supporting multiple operating system environments in computing device without contents conversion
CN102591675B (en) Method and system for management of multiple software images with shared memory blocks
CN102165418A (en) Turbo boot systems and methods
CN104823160A (en) Virtual machine-preserving host updates
CN103106091A (en) Start-up system and method of operating system based on removable storage media
US20140298317A1 (en) Methods and apparatus to convert a machine to a virtual machine
CN103777981A (en) Multi-operation-system remote loading implementation method suitable for X86 framework
CN104866324A (en) Method for constructing portable operating system and portable memorizer
US10664164B2 (en) Hard disk system operation method, storage system, and processor
CN105824648A (en) Unattended BIOS configuration method
CN105653331A (en) Middleware application method and apparatus
CN109710297B (en) Method for upgrading and backing equipment wholly or in modules
CN114756290A (en) Operating system installation method, device and readable storage medium
CN106528226A (en) Operation system installation method and apparatus
CN106933604B (en) System upgrading method and device
US11249767B2 (en) Boot assist zero overhead flash extended file system
US20070079279A1 (en) Embedded device with software registry
CN102135896A (en) Method and system for realizing software upgrading based on embedded system
CN112379867B (en) Embedded operating system, method and storage medium based on modular development
CN102629209B (en) Method, single board and system for realizing plug-and-play of single board
CN104679438A (en) Serial Attached SCSI (SAS) interface card drive mounting system and method
CN102801768A (en) Data processing method and system and network device
US10210004B2 (en) Method of providing at least one data carrier for a computer system and computer system including service processor independently operable from a main processor of the computer system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant