CN113127071A - Starting method and device based on solidified starting code, computer equipment and storage medium - Google Patents

Starting method and device based on solidified starting code, computer equipment and storage medium Download PDF

Info

Publication number
CN113127071A
CN113127071A CN201911425362.4A CN201911425362A CN113127071A CN 113127071 A CN113127071 A CN 113127071A CN 201911425362 A CN201911425362 A CN 201911425362A CN 113127071 A CN113127071 A CN 113127071A
Authority
CN
China
Prior art keywords
sub
starting
flash memory
preset
code
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.)
Pending
Application number
CN201911425362.4A
Other languages
Chinese (zh)
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.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner Technology 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 Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN201911425362.4A priority Critical patent/CN113127071A/en
Publication of CN113127071A publication Critical patent/CN113127071A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a starting method and device based on solidified starting codes, computer equipment and a storage medium. The method comprises the following steps: acquiring whether a solidified starting code is starting information for starting for the first time; when the starting information indicates that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register; acquiring a starting instruction of a starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation; and executing the starting operation corresponding to the starting instruction, and outputting prompt information for prompting that the 1 type of flash memory chip is hit. Therefore, the purpose that the solidified starting code can directly hit the flash memory chip through the preset sub-operation data table and the preset sub-operation stored in the register when the solidified starting code is not started for the first time is achieved, and the starting speed of the embedded system is improved.

Description

Starting method and device based on solidified starting code, computer equipment and storage medium
Technical Field
The present application relates to the field of embedded system technologies, and in particular, to a boot method and apparatus based on a solidified boot code, a computer device, and a storage medium.
Background
In a system on chip of a consumer electronic device, in order to meet the diversified requirements of product forms, NAND FLASH chip types supported by one system on chip are more and more, wherein NAND FLASH chip types include not only the types, but also each type can be refined into NAND FLASH with different models according to different manufacturing processes, different storage stacks (such as two-dimensional and three-dimensional) and different manufacturers, and the BOOT ROM in the chip is often selected to sacrifice the starting speed in order to be compatible with different models NAND FLASH.
In order to maintain NAND FLASH compatibility and quickly hit different models NAND FLASH, one of the existing methods is to adopt a boot _ select _ pin mode to roughly divide NAND FLASH into several large classes, and then distinguish the specific models NAND FLASH according to the high and low levels of the external GPIO pin pins, for example, 00 represents the SLC class and 01 represents the MLC class when 2 pins are used; another conventional method is to store the different NAND FLASH startup parameter tables in the small-capacity SPI NOR memory, and read the tables from the SPI NOR memory before analyzing the parameters to start the system.
The prior method distinguishes NAND FLASH models and needs BOOT ROM traversal to determine, and NAND FLASH models need to be traversed for each start, which is time-consuming, and therefore, the start speed is slow.
Disclosure of Invention
Based on this, it is necessary to provide a boot method, an apparatus, a computer device, and a storage medium based on a solidified boot code for the problems of high time consumption and slow boot speed caused by traversing the model of the flash memory chip each time the embedded system is booted.
In a first aspect, an embodiment of the present application provides a boot method based on a solidified boot code, including:
acquiring whether a solidified starting code is starting information for starting for the first time;
when the starting information represents that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register;
acquiring a starting instruction of a starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation;
executing the starting operation corresponding to the starting instruction, and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
In a second aspect, an embodiment of the present application provides a boot apparatus based on a solidified boot code, where the apparatus includes:
the first acquisition module is used for acquiring the starting information of whether the solidified starting code is started for the first time;
the second obtaining module is used for obtaining a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register when the starting information represents that the solidified starting code is not started for the first time;
the third obtaining module is used for obtaining a starting instruction of the starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation;
the execution module is used for executing the starting operation corresponding to the starting instruction and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
In a third aspect, a computer device provided in an embodiment of the present application includes a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
acquiring whether a solidified starting code is starting information for starting for the first time;
when the starting information represents that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register;
acquiring a starting instruction of a starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation;
executing the starting operation corresponding to the starting instruction, and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps:
acquiring whether a solidified starting code is starting information for starting for the first time;
when the starting information represents that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register;
acquiring a starting instruction of a starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation;
executing the starting operation corresponding to the starting instruction, and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
The application provides a starting method, a starting device, computer equipment and a storage medium based on a solidified starting code, wherein the method firstly obtains whether the solidified starting code is the starting information for the first starting, and when the starting information represents that the solidified starting code is not the first starting, a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip can be directly obtained from a register; therefore, the problems that in the existing method, the operating parameters of the flash memory chips of various types stored in the solidified starting code in advance are traversed as long as the starting instruction of the solidified starting code is received, and whether the starting speed is slow or not caused by non-first starting is not involved are solved; further, when the starting instruction of the starting code corresponding to the flash memory chip is obtained according to the preset sub-operation data table and the preset sub-operation, the starting operation corresponding to the starting instruction can be executed, and prompt information is output. Therefore, the purpose that the solidified starting code can directly hit 1 type of flash memory chip through the preset sub-operation data table and the preset sub-operation stored in the register when the solidified starting code is not started for the first time is achieved, and the starting speed of the embedded system is improved.
Drawings
FIG. 1 is a flowchart illustrating a boot method based on solidified boot code according to an embodiment;
FIG. 2 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment;
FIG. 3 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment;
FIG. 4 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment;
FIG. 5 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment;
FIG. 6 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment;
FIG. 7 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment;
FIG. 8 is a schematic representation of a boot device based on a solidified boot code according to one embodiment;
FIG. 9 is an internal block diagram of a computer device provided in one embodiment.
Detailed Description
At present, a system on chip of consumer electronics can support the models of a plurality of flash memory chips, in order to improve the starting speed of the system on chip, a mode of boot _ select _ pin is generally adopted to roughly classify the flash memory chips, then specific models are distinguished according to the high and low levels of a pin of a GPIO (general purpose input/output), a starting parameter table of the flash memory chips of different models is also stored in an SPI NOR memory with small capacity, parameters are analyzed and started after reading from the SPI NOR memory, but the mode of boot _ select _ pin is not only low in distinguishing degree and long in traversal time, but also can be realized by peripheral equipment, and the use range is limited; and the cost of the SPI NOR memory is high, and a certain time is required to read parameters from the SPI NOR memory, so that the starting speed of the system is slow.
According to the starting method and device based on the solidified starting code, the computer equipment and the storage medium, when the starting information that the solidified starting code is not started for the first time is obtained, the preset sub-operation data table and the preset sub-operation of the flash memory chips of 1 model are obtained from the register, the starting instruction for executing the next-stage starting code is obtained, the starting operation corresponding to the starting instruction is executed, and the specific process for prompting the hit prompt information of the flash memory chips of 1 model is output, so that peripheral equipment does not need to be added, and the starting speed is improved.
It should be noted that, the embodiment of the present application provides a boot method based on solidified boot code, and an execution subject of the boot method may be a boot apparatus based on solidified boot code, and the boot apparatus based on solidified boot code may be implemented as part of or all of a computer device by software, hardware, or a combination of software and hardware. Optionally, the Computer device may be an electronic device with a data processing function, such as a Personal Computer (PC), a portable device, a server, and the like, or may also be an embedded device, an intelligent device, and the like, such as a television box, a tablet, an intelligent speaker, and a system on a chip. The execution subjects of the method embodiments described below are described taking a computer device as an example.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Fig. 1 is a flowchart illustrating a starting method based on a solidified boot code according to an embodiment, where the embodiment relates to a specific process of how a computer device outputs a prompt message indicating that a flash memory chip of 1 model is hit according to whether an obtained solidified boot code is the first-started starting message. As shown in fig. 1, the method includes:
and step S11, acquiring the starting information whether the solidified starting code is started for the first time.
Specifically, the computer device may include a system on chip SOC chip, a Nand Flash memory (Nand Flash) module, a dynamic random access memory (Dram), and other devices, such as a display module, a camera, and the like when the computer device is a tablet, and a remote controller, a screen, and the like when the computer device is a television box; the system on chip may include a boot ROM (boot ROM) that may be code cured in a non-programmable ROM (ROM) inside the SOC chip, a Real Time Clock (RTC) module, a processor, and a register, and the Dram is an internal memory that directly exchanges data with the processor.
The RTC module can be used for providing accurate real-time, and one-time programmable memory (Efuse) can be used for storing the operating parameter that Nand flash memory chip corresponds, operating parameter can include at least one in read operation parameter and the write operation parameter, and the Efuse can independently place in the system on chip, also can set up inside the RTC module, can be used for external battery power supply when the main power supply of computer equipment loses power when the Efuse sets up inside the RTC module.
The Nand flash memory module comprises m types of Nand flash memory chips, when computer equipment receives a starting instruction to execute starting operation, the BOOTROM also hits the 1 type of Nand flash memory chip to determine that the 1 type of Nand flash memory chip can be compatible, and the computer equipment can be really started at this time.
Therefore, in order to save the starting time, when the computer equipment receives a starting instruction, whether the identification parameter stored in the register meets the preset threshold condition is judged, and when the identification parameter meets the preset threshold condition, the solidified starting code can be determined to be not started for the first time; when the identification parameter does not meet a preset threshold condition, determining that the curing start code is started for the first time; the starting information can be an identification parameter stored in a register, and the identification parameter can be bit data used for verifying whether the stored data stored in the register is valid; setting the identification parameter to bit data may be used to prevent other users from inadvertently or intentionally modifying the bit operations of the register, thereby ensuring the validity of the register.
And step S12, when the starting information indicates that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register.
Specifically, the operating parameters of Nand flash memory chips of m models are prestored in a curing start code of the computer device, and when the curing start code is started for the first time, the operating parameters of 1 Nand flash memory chip of one of the m models are selected from the operating parameters of the Nand flash memory chips of the m models to perform traversal operation, so that a preset sub-operation data table and preset sub-operation for the Nand flash memory chips of 1 model are obtained, and the preset sub-operation data table and the preset sub-operation are stored in a register, so that the preset sub-operation data table and the preset sub-operation are directly obtained from the register when the curing start code is not started for the first time, and the operating parameters of the Nand flash memory chips of m models are prestored in the curing start code do not need to be traversed, and m is far greater than 1.
In an actual processing process, the number of the preset sub-operations may be m, the number of the preset sub-operation data table may be k, each preset sub-operation may be a numbered sub-operation, each preset sub-operation data may be a numbered sub-operation data table, each sub-operation corresponds to an operation parameter of a flash memory chip of one model, the operation parameter may include at least one of a read operation parameter and a write operation parameter, each preset sub-operation data table includes at least one preset sub-operation, the sum of the numbers of all the preset sub-operations in the k preset sub-operation data tables is m, and one preset sub-operation may be in at least one preset sub-operation table; wherein k is an integer greater than 1.
When the m types of flash memory chips are m types of NAND FLASH chips, the m types of NAND FLASH chips may include a Single-Level Cell (SLC), a double-Level Cell (MLC), a multiple-Level Cell (TLC), or the like.
And step S13, acquiring a starting instruction of the flash memory chip corresponding to the starting code according to the preset sub-operation data table and the preset sub-operation.
Specifically, the computer device may directly obtain the operation parameters of the 1 model flash memory chip according to the preset sub-operation data table and the preset sub-operation, and may also obtain the start instruction of the start code corresponding to the flash memory chip when obtaining the operation parameters of the 1 model flash memory chip.
In an actual processing process, a starting process of the computer device may include a BOOTROM, a boot loader (Bootloader), a real-time operating system program (Kernel), an application program (App), and the like, where "-" represents a next-stage starting object, and the Bootloader, the Kernel, the App, and the like may form a firmware package to be written into a flash memory chip corresponding to one model, and therefore the computer may obtain a starting instruction of a starting code at each stage in the flash memory chip according to the preset sub-operation data table and the preset sub-operation, for example, the starting instruction of the starting code at each stage may include a starting instruction of a Bootloader code, a starting instruction of a Kernel code, a starting instruction of an App code, and the like; the starting instruction of the flash memory chip corresponding to the starting code may be a starting instruction of each level of the starting code in the flash memory chip.
Step S14, executing the starting operation corresponding to the starting instruction, and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
Specifically, the starting instruction of the flash memory chip corresponding to the starting code, which is obtained by the computer device, may be a starting instruction of each level of the starting code in the flash memory chip, and when the computer device obtains the starting instruction of each level of the starting code in the flash memory chip, the starting operation corresponding to the starting instruction may be executed, for example, the starting operation of the Bootloader code, the starting operation of the Kernel code, the starting operation of the App code, and the like in each flash memory chip may be sequentially executed.
When the computer device finishes executing the starting operation corresponding to the starting instruction of each stage of the starting code in the flash memory chip, the computer device can output prompt information for prompting that the 1 type of flash memory chip is hit so as to indicate that the 1 type of flash memory chip is started.
In this embodiment, the computer device first obtains whether the solidified boot code is boot information for a first boot, and when the boot information indicates that the solidified boot code is not a first boot, can directly obtain a preset sub-operation data table and a preset sub-operation corresponding to 1 model of the flash memory chip from the register; therefore, the problems that in the existing method, the operating parameters of the flash memory chips of various types stored in the solidified starting code in advance are traversed as long as the starting instruction of the solidified starting code is received, and whether the starting speed is slow or not caused by non-first starting is not involved are solved; further, when the starting instruction of the starting code corresponding to the flash memory chip is obtained according to the preset sub-operation data table and the preset sub-operation, the starting operation corresponding to the starting instruction can be executed, and prompt information is output. Therefore, the purpose that the solidified starting code can directly hit 1 type of flash memory chip through the preset sub-operation data table and the preset sub-operation which are acquired from the register when the solidified starting code is not started for the first time is achieved, and the starting speed of the embedded system is improved.
The above embodiment discloses a specific process how the computer device executes the boot operation on the 1 model flash memory chips according to the boot information indicating whether the obtained solidified boot code is booted for the first time, and the following embodiment describes a specific process how the computer device executes the boot operation when the boot information indicates that the solidified boot code is booted for the first time. It should be noted that the following method is only used for explaining the present application and is not used for limiting the present application.
Fig. 2 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment, where this embodiment relates to a specific process of how a computer device performs a boot operation when the boot information indicates that the solidified boot code is first booted. On the basis of the foregoing embodiment, optionally, as shown in fig. 2, the method further includes:
step S21, when the starting information represents that the solidified starting code is started for the first time, the operating parameters of m types of flash memory chips pre-stored in the solidified starting code are packaged to obtain m sub-operations; the operating parameters comprise at least one of read operating parameters and write operating parameters, the operating parameters of the 1 model flash memory chips are selected from the operating parameters of m model flash memory chips prestored in the curing starting code, and m is far greater than 1.
Specifically, when the computer device determines that the solidified boot code is first booted, the computer device may perform encapsulation processing on the operation parameters of m types of flash memory chips pre-stored in the solidified boot code, specifically, encapsulate the operation parameters of the m types of flash memory chips in a structure manner, and determine the encapsulated operation parameters in the form of m structures as the m sub-operations.
In the actual process, the flash memory chip may be an NAND FLASH chip, and the operating parameters of 1 model of NAND FLASH chip may be selected from the operating parameters of m models of NAND FLASH chips that will be stored in advance in the solidified boot code, and the operating body obtained by encapsulating the read operating parameters of the NAND FLASH chip of this model in a structural body manner may be as shown in table 1, so as to reduce the storage space of 1 operating body and improve the operating speed of the register.
TABLE 1
Figure BDA0002353418840000081
And step S22, classifying the m sub-operations to obtain a k sub-operation data table.
Specifically, after obtaining m sub-operations, the computer device may classify the m sub-operations, for example, when the m types of flash memory chips are NAND FLASH chips of m types, and d sub-operations corresponding to NAND FLASH chips of d types belonging to SLC in NAND FLASH chips of m types are classified into an SLC class set, e sub-operations corresponding to NAND FLASH chips of e types belonging to MLC are classified into an MLC class set, f sub-operations corresponding to NAND FLASH chips of f types belonging to TLC are classified into a TLC class set, and the like; wherein k class sets such as the MLC class set, and the TLC class set are the k sub-operation data tables, and d + e + f + … … is equal to m.
And step S23, sequentially numbering the m sub-operations and the k sub-operation data tables respectively to obtain numbered m sub-operations and numbered k sub-operation data tables.
Specifically, after obtaining the m sub-operations and the k sub-operation data tables, the computer device may sequentially number the m sub-operations and the k sub-operation data tables, sequentially number the m sub-operations as sub-operation number 1, sub-operation number 2, … …, and sub-operation number m, sequentially number the k sub-operation data tables as table 1, table 2, … …, and table k, and thereby obtain the numbered m sub-operations and the numbered k sub-operation data tables.
In an actual processing process, when m models of flash memory chips are NAND FLASH chips, each sub-operation corresponds to NAND FLASH chips of one model, and when the numbered k sub-operation data tables include an operation data table 0 and an operation data table 1, and the numbered m sub-operations include a sub-operation number 0, a sub-operation number 1 and a sub-operation number 2, a NAND FLASH read operation data table as shown in table 2 can be generated; in table 2, each sub-operation corresponds to a read operation parameter of a model NAND FLASH chip.
TABLE 2
Figure BDA0002353418840000091
Step S24, determining the numbered m sub-operations as the preset sub-operations, and determining the numbered k sub-operation data tables as the preset sub-operation data tables; wherein m is far greater than 1, and k is an integer greater than 1.
Specifically, after obtaining the numbered m sub-operations and the numbered k sub-operation data tables, the computer device may further determine the numbered m sub-operations as the preset sub-operations, and determine the numbered k sub-operation data tables as the sub-operation data tables, so that the computer device may quickly search and hit when being restarted after being stored.
And step S25, acquiring the starting instruction of the starting code corresponding to the 1 model flash memory chip according to the preset sub-operation data table and the preset sub-operation.
Specifically, after obtaining the preset sub-operation data table and the preset sub-operation, the computer device may directly obtain the operation parameters of 1 type of the flash memory chips, and may also obtain the start instruction of the start code corresponding to the 1 type of the flash memory chips when obtaining the operation parameters of the 1 type of the flash memory chips; the starting instruction of the starting code corresponding to the flash memory chip may be a starting instruction of each level of starting code in the 1 model flash memory chip.
And step S26, storing the preset sub-operation and the preset sub-operation data table into the register, and executing the starting operation corresponding to the starting instruction.
Specifically, when the computer device obtains a start instruction of a start code corresponding to 1 type of flash memory chip, the preset sub-operation and the preset sub-operation data table may be stored in a register, or an identification parameter may be stored in the register, and then the start operation corresponding to the start instruction is executed; the identification parameter may be a bit data, and when the identification parameter is the same as the preset threshold, it may be determined that the preset sub-operation and the preset sub-operation data table stored in the register are valid.
In an actual processing process, the register may be a power-down holding register, a one-time programmable Memory (efuse), a Non-Volatile Memory (NVM), and the preset sub-operation, the preset sub-operation data table, and the identification parameter may be stored in a preset storage unit of the register, where the preset storage unit may be a storage unit with a size of a word.
The preset sub-operation and the preset sub-operation data table can be stored to the high-wbit of the preset storage unit, the identification parameter can be stored to the low-wbit of the preset storage unit, and the preset sub-operation data table can also be stored to the low-wbit of the preset storage unit, and the preset sub-operation data table can be stored to the high-wbit of the preset storage unit.
In this embodiment, when the computer device determines that the obtained start information indicates that the solidified start code is started for the first time, the computer device determines that the preset sub-operation data table and the preset sub-operation are stored after performing the classification processing on the m types of operation parameters of the flash memory chips by packaging the m types of operation parameters of the flash memory chips, performing the classification processing on the m sub-operations obtained after the packaging processing, and numbering the k sub-operation data tables and the m sub-operations obtained after the classification processing, so as to ensure that the computer device can directly obtain the start instruction of the start code corresponding to the flash memory chip by searching the preset sub-operation data table and the preset sub-operation when determining that the solidified start code is not started for the first time, thereby improving the start speed of the flash memory chips of 1 type.
Fig. 3 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment, where this embodiment relates to a specific process of how a computer device classifies m sub-operations to obtain k sub-operation data tables. On the basis of the above embodiment, optionally, as shown in fig. 3, step S22 may be implemented by the following sub-steps:
and step S221, acquiring the flash memory model of the flash memory chip corresponding to each sub-operation.
Specifically, after obtaining M sub-operations, the computer device may correspondingly obtain a flash memory model of a flash memory chip corresponding to each sub-operation, where the flash memory model may include a storage capacity, a type, a manufacturer, a manufacturing process, and the like of the corresponding flash memory chip, the storage capacity may be 512M, 2G, 8G, 32G, and the like, the type may be SLC, MLC, TLC, and the like, the manufacturer may be Samsung electronics (Samsung), SK maritime (Hynix), Toshiba semiconductor (Toshiba), and the like, and the manufacturing process may be 16 nm, 15 nm, 10 nm, and the like.
Step S222, determining k flash memory model sets belonging to the same flash memory category in the m flash memory models.
Specifically, the flash memory category may be a storage capacity, a type, a manufacturer, a manufacturing process, or the like, and the computer device may store the sameThe flash memory models with the capacity are respectively classified into a flash memory model set, for example, a computer device can store the corresponding t with the storage capacity of 512M in M flash memory models1Grouping the flash memory model into the 1 st flash memory model set, and storing the corresponding t with the storage capacity of 2G2Grouping the flash memory models into a 2 nd flash memory model set, … …, corresponding t with a storage capacity of 8GkThe individual flash model numbers are grouped into a kth set of flash model numbers.
The computer device may also associate t with SLC in m flash memory models1The type of each flash memory is classified as 1 st flash memory signal set, and the type of the corresponding t is MLC2Grouping individual flash model into 2 nd flash model set, … …, grouping corresponding t with TLC typekEach flash memory model is classified into a kth flash memory model set; the computer equipment can also correspond t of Samsung as manufacturer in m flash memory models1The number of flash memory models is classified as 1 st flash memory model set, and the corresponding t of SK Hynix is the manufacturer2Each flash model is classified as the 2 nd set of flash models, … …, corresponding t for Toshiba from the manufacturerkThe individual flash model numbers are grouped into a kth set of flash model numbers.
The computer equipment can also make the corresponding t with the manufacturing process of 16 nanometers in m flash memory models1Each flash model is classified as the 1 st set of flash models, corresponding to a manufacturing process of 15 nm2Individual flash model numbers are grouped into the 2 nd flash model set, … …, corresponding t with a manufacturing process of 10 nanometerskEach flash memory model is classified into a kth flash memory model set; and are not limited herein.
Wherein, the ith flash model set comprises tiFlash model, i ═ 1, 2, … …, k, t1+t2+……+tk=m。
Step S223, determining k sub-operation sets corresponding to the k flash memory model sets, and determining the k sub-operation sets as the k sub-operation data tables.
Specifically, when the computer device obtains k flash memory model sets, the k flash memory models can be determined according to the one-to-one correspondence relationship between the flash memory models and the sub-operationsDetermining k sub-operation sets corresponding to the flash memory model set as k sub-operation data tables; wherein, the ith sub-operation data table includes tiSub-operation, i ═ 1, 2, … …, k, t1+t2+……+tk=m。
In this embodiment, the computer device first obtains m flash memory models corresponding to m sub-operations, and then further determines k flash memory model sets belonging to the same flash memory category in the m flash memory models, so as to determine k sub-operation sets corresponding to the k flash memory model sets as the k sub-operation data tables, thereby improving flexibility and reliability of determining the k sub-operation data tables by the computer device.
Fig. 4 is a flowchart illustrating a boot method based on a solidified boot code according to another embodiment, which relates to a specific process of how a computer device detects whether a preset sub-operation data table stored in a register and a preset sub-operation are valid. On the basis of the foregoing embodiment, optionally, as shown in fig. 4, the step S12 of detecting whether the data in the register is valid and obtaining the detection result may be implemented by the following sub-steps:
step S121, detecting whether an identification parameter in the register is the same as a preset threshold value, wherein the identification parameter is used for verifying whether the preset sub-operation data table stored in the register and the preset sub-operation are valid.
Specifically, the preset threshold may be a reference value for verifying whether the identification parameter changes; when the computer equipment detects that the identification parameter in the register is the same as the threshold value, the identification parameter is not changed; otherwise, when the computer device detects that the identification parameter in the register is different from the preset threshold value, the identification parameter is changed.
And step S122, when the identification parameter is the same as the preset threshold value, determining that the preset sub-operation data table stored in the register and the preset sub-operation are valid.
Specifically, when the computer device determines that the identification parameter is the same as the preset threshold, it may be determined that the identification parameter has not changed, and the solidified boot code is not a first boot, so that it may be determined that the preset sub-operation data table and the preset sub-operation are stored in the register at this time, and the stored preset sub-operation data table and the preset sub-operation are valid; optionally, the preset threshold may be 0x55 aa.
And S123, outputting the indication information that the data stored in the register is invalid when the identification parameter is different from the preset threshold value.
Specifically, when the computer device determines that the identification parameter is different from the preset threshold, it may be determined that the identification parameter is a default value when the computer device leaves a factory, and at this time, it may be determined that the solidification start code is started for the first time, and the preset sub-operation data table and the preset sub-operation are not stored in the register, so that the indication information that the register is invalid may be output, so that the solidification start code traverses the operation parameters of the m types of flash memory chips to determine the preset sub-operation data table and the preset sub-operation.
In this embodiment, the computer device further determines whether the preset sub-operation and the preset sub-operation data table stored in the register are valid according to the detection result that whether the identification parameter in the register is the same as the preset threshold, so as to ensure the validity and reliability of the register storing the preset sub-operation and the preset sub-operation data table, and improve the functional diversity of the computer device.
Fig. 5 is a flowchart illustrating a starting method based on a solidified boot code according to yet another embodiment, where this embodiment relates to a specific process of how to obtain a next-level application start instruction in the flash memory chip when the computer device determines that the register storage data is invalid. On the basis of the above embodiment, optionally, as shown in fig. 5, after step S12, the method further includes:
and step S31, performing traversal operation on the preset sub-operation data table pre-stored in the solidified starting code to obtain a traversal result of the traversal operation.
Specifically, when the computer device determines that the identification parameter in the register is different from the preset threshold, the data currently stored in the register may be considered invalid, and at this time, the traversal operation may be performed on the preset sub-operation data table pre-stored in the solidified boot code.
The traversing operation on the preset sub-operation data tables may be regarded as sequentially traversing at least one preset sub-operation data table, that is, traversing t included in the 1 st preset sub-operation data table1The preset sub-operations are sequentially traversed, … …, and/or t is included in the ith preset sub-operation data tableiSequentially traversing the preset sub-operations to obtain a traversal result of the traversal operation; wherein i is 1, 2, … …, k, t1+t2+……+tk=m。
In the actual processing process, when the computer equipment determines that the solidified starting code is the first-time starting code, the solidified starting code traverses the operation parameters of the m types of flash memory chips to obtain the preset sub-operation data table and the preset sub-operation, and the preset sub-operation data table and the preset sub-operation are stored in a register and also stored in the solidified starting code.
Step S32, when the traversal result of the traversal operation includes the next-level application start instruction in the 1-type flash memory chip, determining that the traversal is successful.
Specifically, after performing traversal operation on at least one preset sub-operation data table, if the obtained traversal result includes a start instruction of a boot code corresponding to 1 type of flash memory chip, for example, when a boot instruction of a Bootloader code is output, it may be indicated that the performed traversal operation is successful.
And step S33, storing the preset sub-operation data table, the preset sub-operation and the identification parameter into the register.
Specifically, after the computer device determines that the traversal operation is successful, the numbered m sub-operations and the numbered k sub-operation data tables can be stored in a high-bit of a preset storage unit of a register, and the identification parameter is stored in a low-bit of the preset storage unit; or storing the identification parameter in the high wbit stored in the preset storage unit, and storing the numbered m sub-operations and the numbered k sub-operation data tables in the low vbit stored in the preset storage unit.
The preset storage unit may be a word-sized storage unit in the register, the numbered m sub-operations may be determined by sequentially numbering m sub-operations obtained by encapsulating operation parameters of m types of flash memory chips, and the numbered k sub-operation data tables may be determined by sequentially numbering k sub-operation data tables obtained by classifying the m sub-operations.
In this embodiment, when determining that the data stored in the register is invalid, the computer device performs traversal operation on a preset sub-operation data table pre-stored in the solidification start code, and determines that traversal success is determined when determining that a traversal result obtained after performing the traversal operation includes a next-level application start instruction in the flash memory chips of 1 model, so as to further improve the flexibility and diversity of the register, and then the computer device stores the preset sub-operation data table, the preset sub-operation and the identification parameter into the register, so that the flash memory chips of 1 model can be quickly hit when the start information that the solidification start code is not started for the first time is subsequently received again, and thus the start speed of the computer device is improved.
Fig. 6 is a flowchart illustrating a boot method based on a solidified boot code according to yet another embodiment, which relates to a specific process of how a computer device determines that a traversal is successful according to a traversal result of a traversal operation. On the basis of the above embodiment, optionally, as shown in fig. 6, step S32 may be implemented by the following sub-steps:
step S321, determining t in the ith sub-operation data tableiThe duration of the sub-operation is determinediWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; j is 1, 2, … …, ti,i=1,2,……,k,t1+t2+……+tkK is an integer greater than 1.
Specifically, the computer device may traverse t in the ith sub-operation data tableiT corresponding to sub-operationiOperating parameters, sequentially judging tiWhether the 1 st operation parameter is valid, whether the 2 nd operation parameter is valid, … … to the tiWhether an operational parameter is valid; and judging whether the operation parameters are effective or not comprises judging whether the operation parameters can acquire a starting instruction of the starting code corresponding to the 1 type of flash memory chip or not.
During the actual processing, when the computer device judges tiWhen the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid, the process goes to step S322; otherwise, when the computer equipment judges tiIf the jth operation parameter corresponding to the jth sub-operation in the sub-operations is invalid, the process proceeds to step S323.
And step S322, when the jth operation parameter is valid, determining that the traversal is successful.
Specifically, when the computer device determines tiWhen the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid, it indicates that the next-level application starting instruction in the flash memory chip can be obtained according to the jth operation parameter, and at this time, it indicates that the traversal operation is successful.
In the actual process, if the computer device traverses t in the 1 st sub-operation data table1T corresponding to sub-operation1An operating parameter and determines t1When the 1 st operation parameter is valid, it can also be said that the traversal operation is successful.
Step S323, when the jth operation parameter is invalid, determining that j < tiIf so, the value of j is incremented by 1, and the process returns to step S321 to determine tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; if the jth operating parameter is invalid, and determining j-tiThen, the process proceeds to step S324.
Specifically, when the computer device determines that the jth operation parameter is invalid, it indicates that the next-level application start instruction in the flash memory chip cannot be obtained according to the jth operation parameter, and it indicates that the traversal operation is not successful, and at this time, the value of j may be determined again after adding 1.
In the actual process, if the computer device traverses t in the 1 st sub-operation data table1T corresponding to sub-operation1An operating parameter and determines t1When the 1 st operation parameter is invalid, the judgment of t can be continued1Whether the 2 nd operation parameter is valid or not is judged, and when the 2 nd operation parameter is invalid, the judgment of t is continued1Whether the 3 rd of the operational parameters is valid, … …, and so on.
If t is1One of the operation parameters is judged to be valid, and the traversal operation is successful and can also be stopped; if t is1All the operation parameters are judged to be invalid, and the t in the 2 nd sub-operation data table can be processed2T corresponding to sub-operation2The individual operating parameters are traversed in sequence.
Step S324, when t is reachediT corresponding to sub-operationiIf all the operation parameters are invalid and i is determined to be less than k, the value of i is added with 1, and the step S321 is entered to judge tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; if t isiT corresponding to sub-operationiIf all the operation parameters are invalid, and if it is determined that i is k, the process proceeds to step S325.
Specifically, when the computer judges tiT corresponding to sub-operationiWhen all the operating parameters are invalid, the description is based on tiAny one of the operation parameters cannot acquire a next-level application starting instruction in the flash memory chip, and at this time, traversal operation can be performed on a next sub-operation data table of the current sub-operation data table; for example, the computer determines t in the 1 st sub-operation data table1T corresponding to sub-operation1When all the operation parameters are invalid, the 2 nd sub-operation can be continuously judgedT in data sheet2T corresponding to sub-operation2And judging whether the operation parameters have effective operation parameters or not, … …, and so on, and determining that the traversal is successful when the operation parameters corresponding to one sub-operation in the k preset sub-operation data tables are effective.
And step S325, outputting reminding information, wherein the reminding information is used for reminding the starting failure.
Specifically, after traversing k preset sub-operation data tables, the computer device determines that no valid operation parameter exists, at this time, it indicates that the stored data in the register is invalid, the preset sub-operation data table pre-stored in the solidified start code is also invalid, and at this time, the computer device cannot be normally used for hitting 1 operation parameter of 1 model of flash memory chip, so that a prompt message of this start failure is output.
In this embodiment, the computer device sequentially performs traversal operation on m operation parameters corresponding to the k sub-operation data tables to determine whether an effective operation parameter exists, and the computer device can determine that traversal is successful if only one effective operation parameter exists in the m operation parameters, and output a prompt message of this start failure when all the m operation parameters are invalid, so that flexibility and intelligence of the computer device are improved.
Fig. 7 is a flowchart illustrating a starting method based on a solidified boot code according to another embodiment, where this embodiment relates to a specific process of how a computer device determines whether a next-level application start instruction in the 1 model flash memory chip can be acquired based on the operating parameter. On the basis of the foregoing embodiment, optionally, as shown in fig. 7, as to determine whether the operation parameter is valid and includes a start instruction based on whether the operation parameter can acquire the start code corresponding to the 1 model flash memory chip in step S321, the following sub-steps may be implemented:
step S3211, the starting data of the next-level application is correspondingly obtained according to the operation parameters.
Specifically, the starting process of the computer device may include a BOOTROM, a boot loader (Bootloader), a real-time operating system program (Kernel), an application program (App), and the like, where — represents a next-level starting object, a firmware package composed of the Bootloader, the Kernel, the App, and the like is written in each flash memory chip, and header files of the Bootloader, the Kernel, and the App respectively include preset check parameters, and the preset check parameters may include preset check bits and preset check values.
Therefore, when the computer device traverses one preset sub-operation in the k preset sub-operation data tables, it may be further determined whether an operation parameter of the flash memory chip corresponding to the preset sub-operation is valid, that is, the computer may correspondingly obtain the boot data of the next stage in the 1 model flash memory chips according to the operation parameter, for example, when the next stage is a Bootloader, the boot data that the computer device correspondingly obtains according to the operation parameter is a Bootloader code.
Step S3212, the startup data is checked according to a preset check parameter, and it is determined whether the checked startup data is consistent with the startup data corresponding to the next-level application startup instruction.
Specifically, the preset check parameter may be a preset check digit and a preset check value carried by the boot data corresponding to the next-stage application boot instruction, for example, when the next-stage application boot instruction is a boot instruction of a Bootloader code, the computer device may check the boot data obtained corresponding to the operation parameter according to the preset check parameter in the Bootloader code, and then further determine whether the checked boot data is the same as the boot data corresponding to the boot instruction of the Bootloader code, where the check result indicates that the checked boot data is correct when the check result is the same, and the check result indicates that the checked boot data is incorrect when the check result is different.
In the actual processing process, the preset check value in the Bootloader code may be a magic check value, a crc check value, and the like, and when the checked boot data is the same as the boot data corresponding to the boot instruction of the Bootloader code, it indicates that the checked boot data passes through the magic and crc check, and at this time, it indicates that the operation parameter is valid; otherwise, when the verified boot data is different from the boot data corresponding to the boot instruction of the Bootloader code, it indicates that the verified boot data does not pass at least one of the verifications such as magic and crc, and at this time, it indicates that the operation parameter is invalid.
Step S3213, if the operation parameters are consistent, determining that a next-level application starting instruction in the 1 model flash memory chip can be acquired based on the operation parameters.
Specifically, the computer device determines that the verified boot data is the same as the boot data corresponding to the boot instruction of the Bootloader code, and may determine that the verified boot data passes verification such as magic and crc of the Bootloader code, thereby indicating that the operation parameter is valid, and the computer device may obtain the boot instruction of the Bootloader code according to the operation parameter.
Step S3214, if not, determining that the next-level application start instruction in the 1 model flash memory chip cannot be acquired based on the operation parameters.
Specifically, when the computer device determines that the verified boot data is different from the boot data corresponding to the boot instruction of the Bootloader code, it may be determined that the verified boot data does not pass at least one of the verifications such as the magic and the crc of the Bootloader code, thereby indicating that the operation parameter is invalid, and the computer device may not obtain the boot instruction of the Bootloader code according to the operation parameter.
In this embodiment, when the computer device obtains the start data of the next-level application according to the operation parameter, the computer device checks the preset check parameter, and further determines whether the checked start parameter is the same as the start data corresponding to the start instruction of the next-level application, so as to determine whether the start instruction of the next-level application in the 1 model flash memory chips can be obtained according to the operation parameter, thereby improving the reliability and flexibility of obtaining the start instruction of the next-level application of the 1 model flash memory chips by the computer device, and also improving the functional diversity of the electronic device.
It should be understood that although the various steps in the flow charts of fig. 1-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in FIG. 8, a boot device based on a cured boot code is provided. As shown in fig. 8, the apparatus includes: a first obtaining module 11, a second obtaining module 12, a third obtaining module 13 and an executing module 14.
Specifically, the first obtaining module 11 is configured to obtain starting information of whether the solidified starting code is started for the first time; a second obtaining module 12, configured to obtain, from the register, a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip when the start information indicates that the solidified start code is not started for the first time; a third obtaining module 13, configured to obtain a starting instruction of the starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation; the execution module 14 is configured to execute a starting operation corresponding to the starting instruction, and output a prompt message; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
The starting apparatus based on the solidified starting code may specifically further include: the device comprises a packaging module 21, a fourth obtaining module 22, a fifth obtaining module 23, a first determining module 24, a sixth obtaining module 25 and a processing module 26.
Specifically, the encapsulation module 21 is configured to encapsulate, when the start information indicates that the solidified start code is started for the first time, the operation parameters of m types of flash memory chips pre-stored in the solidified start code to obtain m sub-operations; the operating parameters comprise at least one of read operating parameters and write operating parameters, the operating parameters of the 1 model flash memory chips are selected from the operating parameters of m model flash memory chips prestored in the curing starting code, and m is far greater than 1; a fourth obtaining module 22, configured to classify the m sub-operations to obtain a k sub-operation data table; a fifth obtaining module 23, configured to sequentially number the m sub-operations and the k sub-operation data tables, respectively, to obtain numbered m sub-operations and numbered k sub-operation data tables; a first determining module 24, configured to determine that the numbered m sub-operations are the preset sub-operations, and determine that the numbered k sub-operation data tables are the preset sub-operation data tables; wherein k is an integer greater than 1; a sixth obtaining module 25, configured to obtain, according to the preset sub-operation data table and the preset sub-operation, a starting instruction of the starting code corresponding to the flash memory chips of 1 model; and the processing module 26 is configured to store the preset sub-operation and the preset sub-operation data table into the register, and execute a start operation corresponding to the start instruction.
The packaging module 21 may be specifically configured to package the operation parameters of each type of flash memory chip in a structure mode, and determine the packaged operation parameters in the form of m structures as the m sub-operations.
The fourth obtaining module 22 may specifically include: an acquisition unit 221, a first determination unit 222, a second determination unit 223.
Specifically, the obtaining unit 221 is configured to obtain a flash memory model of a flash memory chip corresponding to each sub-operation;
a first determining unit 222, configured to determine k sets of flash memory models belonging to the same flash memory category from among the m flash memory models; a second determining unit 223, configured to determine k sub-operation sets corresponding to the k flash model sets, and determine the k sub-operation sets as the k sub-operation data tables; wherein, the ith flash model set comprises tiFlash model, i ═ 1, 2, … …, k, t1+t2+……+tk=m。
The starting apparatus based on the solidified starting code may further specifically include: a detection unit 121, a first processing unit 122 and a second processing unit 123.
Specifically, the detecting unit 121 is configured to detect whether an identification parameter in the register is the same as a preset threshold, where the identification parameter is used to verify whether the preset sub-operation data table stored in the register and the preset sub-operation are valid; a first processing unit 122, configured to determine that the preset sub-operation data table stored in the register is valid and the preset sub-operation is valid when the identification parameter is the same as the preset threshold; and the second processing unit 123 is configured to, when the identification parameter is different from the preset threshold, output an indication that the register stores invalid data.
The starting device based on the embedded system may further specifically include: a traversal module 31, a second determination module 32 and a storage module 33.
Specifically, the traversal module 31 is configured to perform traversal operation on the preset sub-operation data table pre-stored in the solidified boot code to obtain a traversal result of the traversal operation; a second determining module 32, configured to determine that the traversal is successful when a traversal result of the traversal operation includes a next-level application starting instruction in the 1-type flash memory chip; a storage module 33, configured to store the preset sub-operation data table, the preset sub-operation, and the identification parameter into the register.
The second determining module 32 may further specifically include: a first judging unit 321, a first determining unit 322, a second judging unit 323, a third judging unit 324, and a second determining unit 325.
Specifically, the first judging unit 321 is configured to determine t in the ith sub-operation data tableiThe duration of the sub-operation is determinediWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; j is 1, 2, … …, ti,i=1,2,……,k,t1+t2+……+tkM, k is an integer greater than 1; a first determining unit 322 for determining, when the jth operating parameter is valid,determining that the traversal is successful; a second determining unit 323, configured to add 1 to the value of j to determine t when the jth operation parameter is invalidiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; a third judging unit 324 for judging if t isiT corresponding to sub-operationiWhen all the operation parameters are invalid, adding 1 to the value of i, and judging tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; a second determining unit 325, configured to determine that the traversal is successful until it is determined that an operation parameter corresponding to one sub-operation in the preset sub-operation data table is valid; and judging whether the operation parameters are effective or not comprises judging whether the operation parameters can acquire a starting instruction of the starting code corresponding to the 1 type of flash memory chip or not.
The second determining unit 325 may be specifically configured to: acquiring starting data of the next-level application correspondingly according to the operating parameters; checking the starting data according to preset checking parameters, and judging whether the checked starting data is consistent with the starting data corresponding to the next-level application starting instruction or not; if the operation parameters are consistent, determining that a next-level application starting instruction in the 1 model flash memory chip can be obtained based on the operation parameters; and if the operation parameters are inconsistent, determining that the next-level application starting instruction in the 1 model flash memory chip cannot be acquired based on the operation parameters.
For specific definition of the solidified boot code based boot device, reference may be made to the above definition of the boot method based on the solidified boot code, which is not described herein again. The various modules in the solidified boot code based boot device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an assessment quantization value acquisition method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring whether a solidified starting code is starting information for starting for the first time; when the starting information represents that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register; acquiring a starting instruction of a starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation; executing the starting operation corresponding to the starting instruction, and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the starting information represents that the solidified starting code is started for the first time, packaging the operating parameters of m types of flash memory chips stored in the solidified starting code in advance to obtain m sub-operations; the operating parameters comprise at least one of read operating parameters and write operating parameters, the operating parameters of the 1 model flash memory chips are selected from the operating parameters of m model flash memory chips prestored in the curing starting code, and m is far greater than 1; classifying the m sub-operations to obtain k sub-operation data tables; sequentially numbering the m sub-operations and the k sub-operation data tables respectively to obtain numbered m sub-operations and numbered k sub-operation data tables; determining m numbered sub-operations as the preset sub-operations, and determining k numbered sub-operation data tables as the preset sub-operation data tables; wherein k is an integer greater than 1; acquiring starting instructions of the starting codes corresponding to the 1 type of flash memory chips according to the preset sub-operation data table and the preset sub-operation; and storing the preset sub-operation and the preset sub-operation data table into the register, and executing the starting operation corresponding to the starting instruction.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and respectively packaging the operating parameters of the flash memory chips of each model in a structural body mode, and determining the packaged operating parameters in the form of m structural bodies as the m sub-operations.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring the flash memory model of the flash memory chip corresponding to each sub-operation; determining k flash memory model sets belonging to the same flash memory category in the m flash memory models; determining k sub-operation sets corresponding to the k flash memory model sets, and determining the k sub-operation sets as k sub-operation data tables; wherein, the ith flash model set comprises tiThe number of the flash memory model is one,i=1,2,……,k,t1+t2+……+tk=m。
in one embodiment, the processor, when executing the computer program, further performs the steps of:
detecting whether an identification parameter in a register is the same as a preset threshold value or not, wherein the identification parameter is used for verifying whether the preset sub-operation data table stored in the register and the preset sub-operation are valid or not; when the identification parameter is the same as the preset threshold value, determining that the preset sub-operation data table stored in the register and the preset sub-operation are valid; and when the identification parameter is different from the preset threshold value, outputting the indication information that the data is invalid stored in the register.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
traversing the preset sub-operation data table pre-stored in the curing start code to obtain a traversing result of the traversing operation; when the traversal result of the traversal operation comprises a next-level application starting instruction in the 1-type flash memory chip, determining that the traversal is successful; and storing the preset sub-operation data table, the preset sub-operation and the identification parameter into the register.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining t in data table for ith sub-operationiThe duration of the sub-operation is determinediWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; j is 1, 2, … …, ti,i=1,2,……,k,t1+t2+……+tkM, k is an integer greater than 1; when the jth operation parameter is valid, determining that the traversal is successful; when the jth operation parameter is invalid, adding 1 to the value of j, and judging tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; when t isiT corresponding to sub-operationiWhen all the operation parameters are invalid, adding 1 to the value of i, and judging tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid or not(ii) a Determining that the traversal is successful until the operation parameter corresponding to one sub-operation in the preset sub-operation data table is judged to be effective; and judging whether the operation parameters are effective or not comprises judging whether the operation parameters can acquire a starting instruction of the starting code corresponding to the 1 type of flash memory chip or not.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring starting data of the next-level application correspondingly according to the operating parameters; checking the starting data according to preset checking parameters, and judging whether the checked starting data is consistent with the starting data corresponding to the next-level application starting instruction or not; if the operation parameters are consistent, determining that a next-level application starting instruction in the 1 model flash memory chip can be obtained based on the operation parameters; and if the operation parameters are inconsistent, determining that the next-level application starting instruction in the 1 model flash memory chip cannot be acquired based on the operation parameters.
It should be clear that, in the embodiments of the present application, the process of executing the computer program by the processor is consistent with the process of executing the steps in the above method, and specific reference may be made to the description above.
In one embodiment, there is also provided a computer readable storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of:
acquiring whether a solidified starting code is starting information for starting for the first time; when the starting information represents that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register; acquiring a starting instruction of a starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation; executing the starting operation corresponding to the starting instruction, and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the starting information represents that the solidified starting code is started for the first time, packaging the operating parameters of m types of flash memory chips stored in the solidified starting code in advance to obtain m sub-operations; the operating parameters comprise at least one of read operating parameters and write operating parameters, the operating parameters of the 1 model flash memory chips are selected from the operating parameters of m model flash memory chips prestored in the curing starting code, and m is far greater than 1; classifying the m sub-operations to obtain k sub-operation data tables; sequentially numbering the m sub-operations and the k sub-operation data tables respectively to obtain numbered m sub-operations and numbered k sub-operation data tables; determining m numbered sub-operations as the preset sub-operations, and determining k numbered sub-operation data tables as the preset sub-operation data tables; wherein k is an integer greater than 1; acquiring starting instructions of the starting codes corresponding to the 1 type of flash memory chips according to the preset sub-operation data table and the preset sub-operation; and storing the preset sub-operation and the preset sub-operation data table into the register, and executing the starting operation corresponding to the starting instruction.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and respectively packaging the operating parameters of the flash memory chips of each model in a structural body mode, and determining the packaged operating parameters in the form of m structural bodies as the m sub-operations.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring the flash memory model of the flash memory chip corresponding to each sub-operation; determining k flash memory model sets belonging to the same flash memory category in the m flash memory models; determining k sub-operation sets corresponding to the k flash memory model sets, and determining the k sub-operation sets as k sub-operation data tables; wherein, the ith flash model set comprises tiFlash model, i ═ 1, 2, … …, k, t1+t2+……+tk=m。
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether an identification parameter in a register is the same as a preset threshold value or not, wherein the identification parameter is used for verifying whether the preset sub-operation data table stored in the register and the preset sub-operation are valid or not; when the identification parameter is the same as the preset threshold value, determining that the preset sub-operation data table stored in the register and the preset sub-operation are valid; and when the identification parameter is different from the preset threshold value, outputting the indication information that the data is invalid stored in the register.
In one embodiment, the computer program when executed by the processor further performs the steps of:
traversing the preset sub-operation data table pre-stored in the curing start code to obtain a traversing result of the traversing operation; when the traversal result of the traversal operation comprises a next-level application starting instruction in the 1-type flash memory chip, determining that the traversal is successful; and storing the preset sub-operation data table, the preset sub-operation and the identification parameter into the register.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining t in data table for ith sub-operationiThe duration of the sub-operation is determinediWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; j is 1, 2, … …, ti,i=1,2,……,k,t1+t2+……+tkM, k is an integer greater than 1; when the jth operation parameter is valid, determining that the traversal is successful; when the jth operation parameter is invalid, adding 1 to the value of j, and judging tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; when t isiT corresponding to sub-operationiWhen all the operation parameters are invalid, adding 1 to the value of i, and judging tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; determining that the traversal is successful until the operation parameter corresponding to one sub-operation in the preset sub-operation data table is judged to be effective;and judging whether the operation parameters are effective or not comprises judging whether the operation parameters can acquire a starting instruction of the starting code corresponding to the 1 type of flash memory chip or not.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring starting data of the next-level application correspondingly according to the operating parameters; checking the starting data according to preset checking parameters, and judging whether the checked starting data is consistent with the starting data corresponding to the next-level application starting instruction or not; if the operation parameters are consistent, determining that a next-level application starting instruction in the 1 model flash memory chip can be obtained based on the operation parameters; and if the operation parameters are inconsistent, determining that the next-level application starting instruction in the 1 model flash memory chip cannot be acquired based on the operation parameters.
It should be clear that, in the embodiments of the present application, the process of executing the computer program by the processor is consistent with the process of executing the steps in the above method, and specific reference may be made to the description above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A boot method based on solidified boot code, the method comprising:
acquiring whether a solidified starting code is starting information for starting for the first time;
when the starting information represents that the solidified starting code is not started for the first time, acquiring a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register;
acquiring a starting instruction of a starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation;
executing the starting operation corresponding to the starting instruction, and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
2. The method of claim 1, further comprising:
when the starting information represents that the solidified starting code is started for the first time, packaging the operating parameters of m types of flash memory chips stored in the solidified starting code in advance to obtain m sub-operations; the operating parameters comprise at least one of read operating parameters and write operating parameters, the operating parameters of the 1 model flash memory chips are selected from the operating parameters of m model flash memory chips prestored in the curing starting code, and m is far greater than 1;
classifying the m sub-operations to obtain k sub-operation data tables;
sequentially numbering the m sub-operations and the k sub-operation data tables respectively to obtain numbered m sub-operations and numbered k sub-operation data tables;
determining m numbered sub-operations as the preset sub-operations, and determining k numbered sub-operation data tables as the preset sub-operation data tables; wherein k is an integer greater than 1;
acquiring starting instructions of the starting codes corresponding to the 1 type of flash memory chips according to the preset sub-operation data table and the preset sub-operation;
and storing the preset sub-operation and the preset sub-operation data table into the register, and executing the starting operation corresponding to the starting instruction.
3. The method of claim 2, wherein the encapsulating the operating parameters of the m types of flash memory chips to obtain m sub-operations comprises:
and respectively packaging the operating parameters of the flash memory chips of each model in a structural body mode, and determining the packaged operating parameters in the form of m structural bodies as the m sub-operations.
4. The method of claim 2, wherein the classifying the m sub-operations to obtain a k sub-operation data table comprises:
acquiring the flash memory model of the flash memory chip corresponding to each sub-operation;
determining k flash memory model sets belonging to the same flash memory category in the m flash memory models;
determining k sub-operation sets corresponding to the k flash memory model sets, and determining the k sub-operation sets as k sub-operation data tables;
wherein, the ith flash model set comprises tiFlash model, i ═ 1, 2, … …, k, t1+t2+……+tk=m。
5. The method of claim 1, wherein when the register has an identification parameter stored therein, the method further comprises:
detecting whether an identification parameter in a register is the same as a preset threshold value or not, wherein the identification parameter is used for verifying whether the preset sub-operation data table stored in the register and the preset sub-operation are valid or not;
when the identification parameter is the same as the preset threshold value, determining that the preset sub-operation data table stored in the register and the preset sub-operation are valid;
and when the identification parameter is different from the preset threshold value, outputting the indication information that the data is invalid stored in the register.
6. The method of claim 1, wherein after the step of outputting an indication that the register is invalid when the identification parameter is not the same as the preset threshold, the method further comprises:
traversing the preset sub-operation data table pre-stored in the curing start code to obtain a traversing result of the traversing operation;
when the traversal result of the traversal operation comprises a next-level application starting instruction in the 1-type flash memory chip, determining that the traversal is successful;
and storing the preset sub-operation data table, the preset sub-operation and the identification parameter into the register.
7. The method of claim 6, wherein determining that the traversal is successful when the traversal result of the traversal operation includes a next-level application start instruction in the flash memory chip comprises:
determining t in data table for ith sub-operationiThe duration of the sub-operation is determinediWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid; j is 1, 2, … …, ti,i=1,2,……,k,t1+t2+……+tkM, k is an integer greater than 1;
when the jth operation parameter is valid, determining that the traversal is successful;
when the jth operation parameter is invalid, adding 1 to the value of j, and judging tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid;
when t isiT corresponding to sub-operationiWhen all the operation parameters are invalid, adding 1 to the value of i, and judging tiWhether a jth operation parameter corresponding to a jth sub-operation in the sub-operations is valid;
determining that the traversal is successful until the operation parameter corresponding to one sub-operation in the preset sub-operation data table is judged to be effective;
and judging whether the operation parameters are effective or not comprises judging whether the operation parameters can acquire a starting instruction of the starting code corresponding to the 1 type of flash memory chip or not.
8. The method according to claim 7, wherein the determining whether the operation parameter is valid includes determining whether the operation parameter can obtain a boot instruction of a boot code corresponding to the 1 model flash memory chip, and includes:
acquiring starting data of the next-level application correspondingly according to the operating parameters;
checking the starting data according to preset checking parameters, and judging whether the checked starting data is consistent with the starting data corresponding to the next-level application starting instruction or not;
if the operation parameters are consistent, determining that a next-level application starting instruction in the 1 model flash memory chip can be obtained based on the operation parameters;
and if the operation parameters are inconsistent, determining that the next-level application starting instruction in the 1 model flash memory chip cannot be acquired based on the operation parameters.
9. A boot device based on a solidified boot code, the device comprising:
the first acquisition module is used for acquiring the starting information of whether the solidified starting code is started for the first time;
the second obtaining module is used for obtaining a preset sub-operation data table and preset sub-operations corresponding to 1 type of flash memory chip from a register when the starting information represents that the solidified starting code is not started for the first time;
the third obtaining module is used for obtaining a starting instruction of the starting code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation;
the execution module is used for executing the starting operation corresponding to the starting instruction and outputting prompt information; and the prompt information is used for prompting that the 1 model flash memory chip is hit.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor is adapted to carry out the steps of the method of any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN201911425362.4A 2019-12-31 2019-12-31 Starting method and device based on solidified starting code, computer equipment and storage medium Pending CN113127071A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911425362.4A CN113127071A (en) 2019-12-31 2019-12-31 Starting method and device based on solidified starting code, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911425362.4A CN113127071A (en) 2019-12-31 2019-12-31 Starting method and device based on solidified starting code, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113127071A true CN113127071A (en) 2021-07-16

Family

ID=76770944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911425362.4A Pending CN113127071A (en) 2019-12-31 2019-12-31 Starting method and device based on solidified starting code, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113127071A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356455A (en) * 2022-01-06 2022-04-15 深圳忆联信息系统有限公司 Method and device for improving chip starting reliability
CN114489851A (en) * 2022-01-20 2022-05-13 飞腾信息技术有限公司 Memory chip starting method and device, computer equipment and storage medium
CN114579198A (en) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 Memory chip starting method and device, computer equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356455A (en) * 2022-01-06 2022-04-15 深圳忆联信息系统有限公司 Method and device for improving chip starting reliability
CN114356455B (en) * 2022-01-06 2023-12-05 深圳忆联信息系统有限公司 Method and device for improving starting reliability of chip
CN114489851A (en) * 2022-01-20 2022-05-13 飞腾信息技术有限公司 Memory chip starting method and device, computer equipment and storage medium
CN114579198A (en) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 Memory chip starting method and device, computer equipment and storage medium
CN114579198B (en) * 2022-01-20 2024-02-20 飞腾信息技术有限公司 Memory chip starting method and device, computer equipment and storage medium
CN114489851B (en) * 2022-01-20 2024-02-20 飞腾信息技术有限公司 Memory chip starting method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113127071A (en) Starting method and device based on solidified starting code, computer equipment and storage medium
KR100873943B1 (en) System and method of reading non-volatile computer memory
US8799555B2 (en) Boot data storage schemes for electronic devices
US7992009B2 (en) Device and method capable of verifying program operation of non-volatile memory and method card including the same
US8769309B2 (en) Flash memory storage system, and controller and method for anti-falsifying data thereof
US8341491B2 (en) System and method for providing data integrity in a non-volatile memory system
TW201351425A (en) System and method to decode data subject to a disturb condition
US20080016415A1 (en) Evaluation system and method
CN106484316A (en) Method for managing a memory device, memory device and controller
CN109164978B (en) Flash memory management method, flash memory storage device and computer readable storage medium
CN109408261B (en) Application program crash processing method and device, computer equipment and storage medium
US10579289B2 (en) Memory management method for configuring super physical units of rewritable non-volatile memory modules, memory control circuit unit and memory storage device
US5367149A (en) IC card and method of checking personal identification number of the same
CN111104246A (en) Method and device for improving verification efficiency of DRAM error detection and correction, computer equipment and storage medium
US8006045B2 (en) Dummy write operations
US9721665B2 (en) Data writing method and system
CN113421606A (en) flash detection method and detection system thereof
CN114639437B (en) Memory test method, device, equipment and storage medium
CN109686397B (en) Memory with self-checking function and its checking method
RU2010126180A (en) METHOD FOR MASKING THE TRANSITION TO THE END OF THE PERIOD OF ELECTRONIC DEVICE SERVICE AND THE DEVICE CONTAINING AN APPROPRIATE CONTROL MODULE
CN113672260A (en) CPU initialization method for processor
CN115705914A (en) Method and device for detecting bad block of flash memory and computer storage medium
CN112463633A (en) Method, device, equipment and medium for checking address decoding of on-chip memory
CN109697993B (en) Data error correction method and device
CN111857882A (en) Extensible SSD (solid State disk) firmware loading method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination