Startup method, device, computer equipment and storage medium based on solidified startup code

By using a method based on solidified startup code in consumer electronics system-on-chip, we directly obtain preset sub-operation data tables and operations from the registers, the problem of slow startup speed of NAND FLASH chip is solved, and a faster startup time is achieved.

CN113127071BActive Publication Date: 2025-01-17ALLWINNER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201911425362.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-31
Publication Date
2025-01-17
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

In the prior art, in consumer electronics systems on chips, the NAND FLASH chip starts slowly, mainly because it requires traversing the chip model every time it starts, resulting in a large time consumption.

Method used

Using a method based on the solidified startup code, by obtaining the information about whether the solidified startup code is the first startup, when it is not the first startup, obtain the preset sub-operation data table and preset sub-operation from the register, and directly obtain the startup instruction and execute it to avoid Iterate through the operating parameters of each model.

Benefits of technology

It improves the startup speed of the embedded system, reduces the traversal time during non-first startup, and improves the startup efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113127071B_ABST
    Figure CN113127071B_ABST
Patent Text Reader

Abstract

The present application provides a startup method, device, computer equipment and storage medium based on a fixed startup code. The method includes: obtaining startup information of whether the fixed startup code is the first startup; when the startup information indicates that the fixed startup code is not the first startup, obtaining a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model from a register; according to the preset sub-operation data table and the preset sub-operation, obtaining a startup instruction of the startup code corresponding to the flash memory chip; executing the startup operation corresponding to the startup instruction, and outputting prompt information indicating that the flash memory chip of one model is hit. In this way, the purpose of directly hitting the flash memory chip through the preset sub-operation data table and the preset sub-operation stored in the register when the fixed startup code is not the first startup is achieved, thereby improving the startup speed of the embedded system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of embedded systems, and in particular to a startup method, device, computer equipment and storage medium based on a solidified startup code. Background Art

[0002] In consumer electronics systems-on-chip, in order to meet the diverse needs of product forms, a system-on-chip usually supports more and more types of NAND FLASH chips. The types of NAND FLASH chips include not only types, but also each type can be refined into different models of NAND FLASH according to different manufacturing processes, different storage stacks (such as two-dimensional and three-dimensional) and different manufacturers. In order to be compatible with different NAND FLASH models, the BOOT ROM in the chip often chooses to sacrifice the boot speed.

[0003] In order to maintain the compatibility of NAND FLASH and quickly hit different NAND FLASH models, one of the existing methods is to use the boot_select_pin method to roughly divide NAND FLASH into several categories, and then distinguish the specific models of NAND FLASH according to the high and low levels of the external GPIO pins. For example, when there are 2 pins, 00 represents the SLC class and 01 represents the MLC class; the second existing method is to store the startup parameter table of different NAND FLASH in a small-capacity SPI NOR memory, read it from the SPINOR memory first, and then parse the parameters for startup.

[0004] The existing method still needs to traverse the BOOT ROM to distinguish the NAND FLASH model, and the NAND FLASH model needs to be traversed every time it is started, which is time-consuming and leads to a slow startup speed. Summary of the invention

[0005] Based on this, it is necessary to provide a startup method, device, computer equipment and storage medium based on solidified startup code to address the problem of long time consumption and slow startup speed caused by traversing the models of flash memory chips every time the embedded system is started.

[0006] In a first aspect, an embodiment of the present application provides a startup method based on a solidified startup code, comprising:

[0007] Get the startup information of whether the fixed startup code is the first startup;

[0008] When the startup information indicates that the fixed startup code is not started for the first time, a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model are obtained from a register;

[0009] According to the preset sub-operation data table and the preset sub-operation, obtaining a startup instruction of the startup code corresponding to the flash memory chip;

[0010] Execute the startup operation corresponding to the startup instruction and output prompt information; wherein the prompt information is used to prompt that the flash memory chip of the one model is hit.

[0011] In a second aspect, an embodiment of the present application provides a startup device based on a solidified startup code, the device comprising:

[0012] A first acquisition module is used to obtain startup information of whether the solidified startup code is started for the first time;

[0013] A second acquisition module is used to acquire a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model from a register when the startup information indicates that the fixed startup code is not started for the first time;

[0014] A third acquisition module, configured to acquire a startup instruction of a startup code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation;

[0015] An execution module is used to execute the startup operation corresponding to the startup instruction and output prompt information; wherein the prompt information is used to prompt that the flash memory chip of the one model is hit.

[0016] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0017] Get the startup information of whether the fixed startup code is the first startup;

[0018] When the startup information indicates that the fixed startup code is not started for the first time, a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model are obtained from a register;

[0019] According to the preset sub-operation data table and the preset sub-operation, obtaining a startup instruction of the startup code corresponding to the flash memory chip;

[0020] Execute the startup operation corresponding to the startup instruction and output prompt information; wherein the prompt information is used to prompt that the flash memory chip of the one model is hit.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0022] Get the startup information of whether the fixed startup code is the first startup;

[0023] When the startup information indicates that the fixed startup code is not started for the first time, a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model are obtained from a register;

[0024] According to the preset sub-operation data table and the preset sub-operation, obtaining a startup instruction of the startup code corresponding to the flash memory chip;

[0025] Execute the startup operation corresponding to the startup instruction and output prompt information; wherein the prompt information is used to prompt that the flash memory chip of the one model is hit.

[0026] The present application provides a startup method, device, computer equipment and storage medium based on a fixed startup code, wherein the method first obtains startup information of whether the fixed startup code is the first startup, and when the startup information indicates that the fixed startup code is not the first startup, a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model can be directly obtained from a register; thereby avoiding the problem that the existing method executes the operation parameters of each model of flash memory chip pre-stored in the fixed startup code as long as the startup instruction of the fixed startup code is received, and does not involve the problem of slow startup speed caused by whether it is not the first startup; further, when the startup instruction of the startup code corresponding to the flash memory chip is obtained according to the preset sub-operation data table and the preset sub-operation, the startup operation corresponding to the startup instruction can also be executed, and prompt information can be output. In this way, the purpose of directly hitting a model of flash memory chip through the preset sub-operation data table and the preset sub-operation stored in the register when the fixed startup code is not started for the first time is achieved, thereby improving the startup speed of the embedded system. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of a startup method flow based on a solidified startup code provided by an embodiment;

[0028] Figure 2 A schematic flow chart of a startup method based on a solidified startup code provided in another embodiment;

[0029] Figure 3 A schematic flow chart of a startup method based on a solidified startup code provided in yet another embodiment;

[0030] Figure 4 A schematic flow chart of a startup method based on a solidified startup code provided in yet another embodiment;

[0031] Figure 5 A schematic flow chart of a startup method based on a solidified startup code provided in yet another embodiment;

[0032] Figure 6A schematic flow chart of a startup method based on a solidified startup code provided in yet another embodiment;

[0033] Figure 7 A schematic flow chart of a startup method based on a solidified startup code provided in yet another embodiment;

[0034] Figure 8 A schematic diagram of a startup device based on a solidified startup code provided by an embodiment;

[0035] Fig. 9 An internal structural diagram of a computer device provided for one embodiment. DETAILED DESCRIPTION

[0036] At present, the system-on-chip of consumer electronics can support multiple models of flash memory chips. In order to improve the startup speed of the system-on-chip, the boot_select_pin method is usually used to roughly classify the flash memory chips and then distinguish the specific models according to the high and low levels of the GPIO pins. The startup parameter table of flash memory chips of different models is also stored in a small-capacity SPINOR memory, which is first read from the SPI NOR memory and then the parameters are parsed for startup. However, the boot_select_pin method not only has a low degree of distinction and a long traversal time, but also requires peripherals to be implemented, and the scope of use is limited. In addition, the cost of the SPINOR memory is high, and it takes a certain amount of time to read the parameters from the SPI NOR memory, which results in a slow system startup speed.

[0037] The boot method, device, computer equipment and storage medium based on the solidified boot code provided in the embodiments of the present application, when the solidified boot code is obtained as boot information that is not the first boot, the boot instruction for executing the next level of boot code is obtained by obtaining the preset sub-operation data table and preset sub-operation of one model of flash memory chip from the register, and the specific process of executing the boot operation corresponding to the boot instruction and outputting prompt information that the one model of flash memory chip is hit, not only does not require the addition of peripherals, but also improves the boot speed.

[0038] It should be noted that the embodiment of the present application provides a startup method based on a solidified startup code, and its execution subject can be a startup device based on a solidified startup code, and the startup device based on the solidified startup code can be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware. Optionally, the computer device can be a personal computer (PC), a portable device, a server, or other electronic device with data processing functions, or an embedded device, a smart device, etc., such as a TV box, a tablet, a smart speaker, a system on a chip, etc. This embodiment does not limit the specific form of the computer device. The execution subject of the following method embodiment is described by taking a computer device as an example.

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] Figure 1 The present invention is a flowchart of a boot method based on a fixed boot code provided in an embodiment. This embodiment relates to a specific process of how a computer device outputs a prompt message indicating that a model of a flash memory chip has been hit according to the boot information of whether the fixed boot code obtained is the first boot. Figure 1 As shown, the method includes:

[0041] Step S11, obtaining startup information of whether the solidified startup code is the first startup.

[0042] Specifically, the computer device may include a system on chip (SOC) chip, a Nand Flash module, a dynamic random access memory (Dram) and other devices. When the computer device is a tablet, the other devices may be a display module, a camera, etc. When the computer device is a TV box, the other devices may be a remote control, a screen, etc.; the system on chip may include a solidified boot code BOOTROM, a real-time timer (RTC) module, a processor and a register. BOOTROM may be a code solidified in a non-programmable read-only memory ROM inside the SOC chip, and Dram is an internal memory that directly exchanges data with the processor.

[0043] The RTC module can be used to provide accurate real-time time, and the one-time programmable memory (Efuse) can be used to store operating parameters corresponding to the Nand flash memory chip, where the operating parameters may include at least one of a read operation parameter and a write operation parameter. The Efuse can be independently built into the system on a chip, or can be set inside the RTC module. When the Efuse is set inside the RTC module, it can be used to supply power to an external battery when the main power supply of the computer device is lost.

[0044] The Nand flash memory module includes m types of Nand flash memory chips. When the computer device receives the startup instruction to execute the startup operation, the BOOTROM also hits one type of Nand flash memory chip to determine whether the one type of Nand flash memory chip is compatible. Only then can the computer device be truly started.

[0045] Therefore, in order to save startup time, when the computer device receives a power-on command, it first determines whether the identification parameter stored in the register meets the preset threshold condition. When the identification parameter meets the preset threshold condition, it can be determined that the fixed startup code is not the first startup; when the identification parameter does not meet the preset threshold condition, it can be determined that the fixed startup code is the first startup; wherein, the startup information can be an identification parameter stored in the register, and the identification parameter can be a bit data used to verify whether the stored data stored in the register is valid; setting the identification parameter to bit data can be used to prevent other users from accidentally or intentionally modifying the bit operation of the register, thereby ensuring the validity of the register.

[0046] Step S12: When the startup information indicates that the fixed startup code is not started for the first time, a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model are obtained from a register.

[0047] Specifically, the computer device's fixed boot code will pre-store the operating parameters of m models of Nand flash memory chips, and when the fixed boot code is started for the first time, the operating parameters of one model of Nand flash memory chip are selected from the operating parameters of the m models of Nand flash memory chips for traversal operation, thereby obtaining a preset sub-operation data table and preset sub-operation for one model of Nand flash memory chip, and storing the preset sub-operation data table and preset sub-operation in a register, so that the fixed boot code can directly obtain the preset sub-operation data table and preset sub-operation from the register when it is not started for the first time, and there is no need to traverse the operating parameters of the m models of Nand flash memory chips pre-stored in the fixed boot code, and m is much greater than 1.

[0048] In the actual processing process, the number of preset sub-operations can be m, the number of preset sub-operation data tables can be k, each preset sub-operation can be a numbered sub-operation, each preset sub-operation data can be a numbered sub-operation data table, each sub-operation corresponds to an operation parameter of a model of flash memory chip, the operation parameter can 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 total number of all preset sub-operations in the k preset sub-operation data tables is m, and one preset sub-operation can be in at least one preset sub-operation table; wherein k is an integer greater than 1.

[0049] Among them, when the m models of flash memory chips are m models of NAND FLASH chips, the m models of NAND FLASH chips can include single storage unit memory (Single-Level Cell, SLC), dual storage unit memory (Multi-Level Cell, MLC) or multi storage unit memory (Triple-Level Cell, TLC), etc.

[0050] Step S13: acquiring a startup instruction of the startup code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation.

[0051] Specifically, the computer device can directly obtain the operating parameters of one model of the flash memory chip according to the preset sub-operation data table and the preset sub-operation, and when obtaining the operating parameters of the one model of the flash memory chip, it can also obtain the startup instructions of the startup code corresponding to the flash memory chip.

[0052] In the actual processing process, the startup process of the computer device may include BOOTROM-->boot loader (Bootloader)-->real-time operating system program (Kernel)-->application program (App), etc., wherein --> represents the next level startup object, Bootloader, Kernel, App, etc. can form a firmware package and be burned into a flash memory chip corresponding to a model. Therefore, the computer can obtain the startup instructions of each level of startup code in the flash memory chip according to the preset sub-operation data table and the preset sub-operation. For example, the startup instructions of each level of startup code may include the startup instructions of the Bootloader code, the startup instructions of the Kernel code, the startup instructions of the App code, etc.; wherein, the startup instructions of the startup code corresponding to the flash memory chip may be the startup instructions of each level of startup code in the flash memory chip.

[0053] Step S14, executing the startup operation corresponding to the startup instruction, and outputting prompt information; wherein the prompt information is used to prompt that the flash memory chip of the one model is hit.

[0054] Specifically, the startup instruction of the startup code corresponding to the flash memory chip obtained by the computer device may be the startup instruction of each level of startup code in the flash memory chip. When the computer device obtains the startup instruction of each level of startup code in the flash memory chip, the startup operation corresponding to the startup instruction can be executed. For example, the startup operation of the Bootloader code, the startup operation of the Kernel code, and the startup operation of the App code in each flash memory chip can be executed in sequence.

[0055] When the computer device executes the startup operation corresponding to the startup instruction of each level of startup code in the flash memory chip, the computer device will output prompt information indicating that the flash memory chip of one model is hit, to indicate that the flash memory chip of one model is started.

[0056] In this embodiment, the computer device first obtains the startup information of whether the fixed startup code is the first startup, and when the startup information indicates that the fixed startup code is not the first startup, the preset sub-operation data table and preset sub-operation corresponding to one model of flash memory chip can be directly obtained from the register; thereby avoiding the problem of the existing method that as long as the startup instruction of the fixed startup code is received, the operation parameters of each model of flash memory chip pre-stored in the fixed startup code are executed, and the problem of slow startup speed caused by whether it is not the first startup is not involved; further, when the startup instruction of the startup code corresponding to the flash memory chip is obtained according to the preset sub-operation data table and the preset sub-operation, the startup operation corresponding to the startup instruction can also be executed, and prompt information can be output. In this way, the purpose of directly hitting one model of flash memory chip through the preset sub-operation data table and the preset sub-operation obtained from the register when the fixed startup code is not the first startup is achieved, thereby improving the startup speed of the embedded system.

[0057] The above embodiment discloses a specific process of how a computer device performs a startup operation on the flash memory chip of one model according to the startup information of whether the fixed startup code is started for the first time. The following embodiment describes the specific process of how a computer device performs a startup operation when the startup information indicates that the fixed startup code is started for the first time. It should be noted that the following method is only used to explain this application and is not used to limit this application.

[0058] Figure 2A flowchart of a startup method based on a fixed startup code is provided for another embodiment. This embodiment relates to a specific process of how a computer device performs a startup operation when the startup information indicates that the fixed startup code is started for the first time. Based on the above embodiment, optionally, Figure 2 As shown, the method also includes:

[0059] Step S21: When the startup information indicates that the fixed startup code is started for the first time, the operation parameters of the m models of flash memory chips pre-stored in the fixed startup code are encapsulated to obtain m sub-operations; wherein the operation parameters include at least one of read operation parameters and write operation parameters, and the operation parameters of the one model of flash memory chip are selected from the operation parameters of the m models of flash memory chips pre-stored in the fixed startup code, and m is much greater than 1.

[0060] Specifically, when the computer device determines that the fixed boot code is started for the first time, the operating parameters of the m models of flash memory chips pre-stored in the fixed boot code can be packaged and processed separately. Specifically, the operating parameters of the m models of flash memory chips are packaged in the form of structures, and the packaged operating parameters in the form of m structures are determined as the m sub-operations.

[0061] In the actual processing process, the flash memory chip can be a NAND FLASH chip, and the operation parameters of one model of NAND FLASH chip can be selected from the operation parameters of m models of NAND FLASH chips pre-stored in the solidified startup code, and the read operation parameters of the NAND FLASH chip of this model are packaged in the form of a structure to obtain an operation body as shown in Table 1, thereby reducing the storage space of one operation body and improving the operation speed of the register.

[0062] Table 1

[0063]

[0064] Step S22: Classify the m sub-operations to obtain k sub-operation data tables.

[0065] Specifically, after obtaining m sub-operations, the computer device can classify the m sub-operations. For example, when the m models of flash memory chips are m models of NAND FLASH chips, and the d sub-operations corresponding to the d models of NAND FLASH chips belonging to SLC among the m models of NAND FLASH chips are classified into the SLC class set, the e sub-operations corresponding to the e models of NAND FLASH chips belonging to MLC are classified into the MLC class set, the f sub-operations corresponding to the f models of NAND FLASH chips belonging to TLC are classified into the TLC class set, and so on; wherein, the MLC class set, the MLC class set, the TLC class set and other k class sets are the k sub-operation data tables, d+e+f+...=m.

[0066] Step S23: sequentially number the m sub-operations and the k sub-operation data tables respectively to obtain m numbered sub-operations and k numbered sub-operation data tables.

[0067] Specifically, after obtaining the m sub-operations and the k sub-operation data tables, the computer device can sequentially number them, and can sequentially number the m sub-operations as sub-operation number 1, sub-operation number 2, ..., sub-operation number m; and can sequentially number the k sub-operation data tables as Table 1, Table 2, ..., Table k, so as to obtain the numbered m sub-operations and the numbered k sub-operation data tables.

[0068] In the actual processing process, when the m models of flash memory chips are m models of NAND FLASH chips, each sub-operation corresponds to a model of NAND FLASH chip, and when the numbered k sub-operation data tables include operation data table 0 and operation data table 1, and the numbered m sub-operations include sub-operation number 0, sub-operation number 1, and 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 of NAND FLASH chip.

[0069] Table 2

[0070]

[0071] 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 much greater than 1, and k is an integer greater than 1.

[0072] Specifically, after obtaining the numbered m sub-operations and the numbered k sub-operation data tables, the computer device can 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 they can be quickly searched and hit when they are stored and started again.

[0073] Step S25: According to the preset sub-operation data table and the preset sub-operation, a startup instruction of the startup code corresponding to the flash memory chip of the one model is obtained.

[0074] Specifically, after obtaining the preset sub-operation data table and the preset sub-operation, the computer device can directly obtain the operating parameters of one model of the flash memory chip, and when obtaining the operating parameters of the one model of the flash memory chip, it can also obtain the startup instructions of the startup code corresponding to the one model of the flash memory chip; wherein, the startup instructions of the startup code corresponding to the flash memory chip can be the startup instructions of each level of startup code in the one model of the flash memory chip.

[0075] Step S26: store the preset sub-operation and the preset sub-operation data table in the register, and execute the start operation corresponding to the start instruction.

[0076] Specifically, when a computer device obtains a startup instruction corresponding to a startup code of a flash memory chip model, the preset sub-operation and the preset sub-operation data table can be stored in a register first, or an identification parameter can be stored in the register, and then the startup operation corresponding to the startup instruction is executed; wherein, the identification parameter can be a bit data, and when the identification parameter is the same as a preset threshold, it can be determined that the preset sub-operation and the preset sub-operation data table stored in the register are valid.

[0077] In the actual processing process, the register may be a power-off retention register, a one-time programmable memory (efuse) or 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, and the preset storage unit may be a word-sized storage unit.

[0078] Among them, the preset sub-operation and the preset sub-operation data table can be stored in the high wbit of the preset storage unit, and the identification parameter can be stored in the low vbit of the preset storage unit, or the preset sub-operation and the preset sub-operation data table can be stored in the low vbit of the preset storage unit, and the preset sub-operation and the preset sub-operation data table can be stored in the high wbit of the preset storage unit.

[0079] In this embodiment, when the computer device determines that the acquired startup information represents that the fixed startup code is started for the first time, the operating parameters of m models of flash memory chips are packaged and processed, the m sub-operations obtained after the packaging process are classified, and the k sub-operation data tables and m sub-operations obtained after the classification process are numbered, so as to determine the preset sub-operation data table and the post-preset sub-operation process storage, so as to ensure that when the computer device determines that the fixed startup code is not started for the first time, the startup instruction of the startup code corresponding to the flash memory chip can be directly obtained by searching the preset sub-operation data table and the preset sub-operation, thereby improving the startup speed of one model of flash memory chip.

[0080] Figure 3 A flowchart of a startup method based on a fixed startup code is provided for another embodiment. This embodiment relates to a specific process of how a computer device classifies the m sub-operations to obtain k sub-operation data tables. Based on the above embodiment, optionally, Figure 3 As shown, step S22 can be implemented by the following sub-steps:

[0081] Step S221: Obtain the flash memory model of the flash memory chip corresponding to each sub-operation.

[0082] Specifically, after obtaining m sub-operations, the computer device can obtain the flash memory model of the flash memory chip corresponding to each sub-operation. The flash memory model may include the storage capacity, type, manufacturer and manufacturing process of the corresponding flash memory chip. The storage capacity may be 512M, 2G, 8G, 32G, etc., the type may be SLC, MLC, TLC, etc., the manufacturer may be Samsung Electronics (Samsung), SK Hynix (SK Hynix), Toshiba Semiconductor (Toshiba), etc., and the manufacturing process may be 16 nanometers, 15 nanometers or 10 nanometers, etc.

[0083] Step S222: Determine a set of k flash memory models belonging to the same flash memory category among the m flash memory models.

[0084] Specifically, the flash memory category may be storage capacity, type, manufacturer or manufacturing process, etc. The computer device may classify flash memory models with the same storage capacity into a flash memory model set. For example, the computer device may classify t1 flash memory models with a storage capacity of 512M among m flash memory models into the first flash memory model set, classify t2 flash memory models with a storage capacity of 2G into the second flash memory model set, ..., classify t3 flash memory models with a storage capacity of 8G into the second flash memory model set. k flash memory models are classified into the kth flash memory model set.

[0085] The computer device may also classify the corresponding t1 flash memory models of the type SLC among the m flash memory models into the first flash memory signal set, classify the corresponding t2 flash memory models of the type MLC into the second flash memory model set, ..., classify the corresponding t3 flash memory models of the type TLC into the second flash memory model set, ..., classify the corresponding t4 flash memory models of the type TLC into the third flash memory model set, ..., classify the corresponding t5 flash memory models of the type MLC into the fourth flash memory model set, ..., classify the corresponding t6 flash memory models of the type TLC into the fifth flash memory model set, ..., classify the corresponding t7 flash memory models of the type TLC into the fifth flash memory model set, ..., classify the corresponding t8 flash memory models of the type MLC into the fifth flash memory model set, ..., classify the corresponding t9 flash memory models of the type MLC into the fifth flash memory model set, ..., classify the corresponding t12 flash memory models of the type MLC into the fifth flash memory k The computer device may also classify the t1 flash memory models whose manufacturer is Samsung among the m flash memory models into the first flash memory model set, classify the t2 flash memory models whose manufacturer is SK Hynix into the second flash memory model set, and so on, classify the t3 flash memory models whose manufacturer is Toshiba into the second flash memory model set, and so on. k flash memory models are classified into the kth flash memory model set.

[0086] The computer device can also classify the corresponding t1 flash memory models with a manufacturing process of 16 nanometers among the m flash memory models into the first flash memory model set, classify the corresponding t2 flash memory models with a manufacturing process of 15 nanometers into the second flash memory model set, and so on, classify the corresponding t3 flash memory models with a manufacturing process of 10 nanometers into the second flash memory model set. k flash memory models are classified into the kth flash memory model set; there is no restriction here.

[0087] Among them, the i-th flash memory model set includes t i flash memory models, i = 1, 2, ..., k, t1 + t2 + ... + t k =m.

[0088] Step S223: determine k sub-operation sets corresponding to the k flash memory model sets, and determine the k sub-operation sets as the k sub-operation data tables.

[0089] Specifically, when the computer device obtains k flash memory model sets, it can determine k sub-operation sets corresponding to the k flash memory model sets according to the one-to-one correspondence between the flash memory models and the sub-operations, and determine the k sub-operation sets as the k sub-operation data tables; wherein the i-th sub-operation data table includes t i sub-operations, i = 1, 2, ..., k, t1 + t2 + ... + t k =m.

[0090] In this embodiment, the computer device first obtains m flash memory models corresponding to the m sub-operations, and then further determines a set of k flash memory models belonging to the same flash memory category among the m flash memory models, thereby determining the k sub-operation sets corresponding to the k flash memory model sets as the k sub-operation data tables, thereby improving the flexibility and reliability of the computer device in determining the k sub-operation data tables.

[0091] Figure 4A flowchart of a startup method based on a fixed startup code is provided for another embodiment. This embodiment 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. Based on the above embodiment, optionally, Figure 4 As shown, the step S12 of detecting whether the data in the register is valid and obtaining the detection result can be implemented by the following sub-steps:

[0092] Step S121: Detect whether an identification parameter in the register is the same as a preset threshold value, wherein the identification parameter is used to verify whether the preset sub-operation data table and the preset sub-operation stored in the register are valid.

[0093] Specifically, the preset threshold value may be a reference value for verifying whether the identification parameter has changed; when the computer device detects that the identification parameter in the register is the same as the threshold value, it indicates that the identification parameter has not changed; conversely, when the computer device detects that the identification parameter in the register is different from the preset threshold value, it indicates that the identification parameter has changed.

[0094] Step S122: When the identification parameter is the same as the preset threshold, determine that the preset sub-operation data table and the preset sub-operation stored in the register are valid.

[0095] Specifically, when the computer device determines that the identification parameter is the same as the preset threshold, it can be determined that the identification parameter has not changed, and the solidified startup code is not the first startup, so it can be determined that the preset sub-operation data table and preset sub-operation are stored in the register at this time, and the stored preset sub-operation data table and preset sub-operation are valid; optionally, the preset threshold can be 0x55aa.

[0096] Step S123: When the identification parameter is different from the preset threshold, outputting indication information that the register stores invalid data.

[0097] Specifically, when the computer device determines that the identification parameter is different from the preset threshold, it can be determined that the identification parameter is the default value at the factory. At this time, it can be determined that the fixed boot 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. Therefore, it will output an indication that the register is invalid, so that the fixed boot code traverses the operating parameters of m models of flash memory chips and then determines the preset sub-operation data table and the preset sub-operation.

[0098] In this embodiment, the computer device further determines whether the preset sub-operation and preset sub-operation data table stored in the register are valid based on the detection result of whether the identification parameter in the register is the same as the preset threshold value, thereby ensuring the validity and reliability of the preset sub-operation and preset sub-operation data table stored in the register, and improving the functional diversity of the computer device.

[0099] Figure 5 A flowchart of a startup method based on a fixed startup code is provided for another embodiment. This embodiment relates to a specific process of obtaining the next-level application startup instruction in the flash memory chip when the computer device determines that the register storage data is invalid. Based on the above embodiment, optionally, Figure 5 As shown, after step S12, the method further includes:

[0100] Step S31: perform a traversal operation on the preset sub-operation data table pre-stored in the solidified startup code to obtain a traversal result of the traversal operation.

[0101] Specifically, when the computer device determines that the identification parameter in the register is different from the preset threshold, it can be considered that the data currently stored in the register is invalid. At this time, the preset sub-operation data table pre-stored in the fixed startup code can be traversed.

[0102] The traversal operation on the preset sub-operation data table can be considered as traversing at least one preset sub-operation data table in sequence, that is, traversing t1 preset sub-operations included in the 1st preset sub-operation data table in sequence, ..., and / or traversing t1 preset sub-operations included in the ith preset sub-operation data table in sequence. i The preset sub-operations are traversed in sequence to obtain the traversal result of the traversal operation; wherein, i=1, 2, ..., k, t1+t2+ ... + t k =m.

[0103] In the actual processing process, when the computer device determines that the fixed boot code is the first boot code, the fixed boot code traverses the operating parameters of m models of flash memory chips to obtain the preset sub-operation data table and preset sub-operation. Not only will the preset sub-operation data table and preset sub-operation be stored in the register, but the preset sub-operation data table will also be stored in the fixed boot code.

[0104] Step S32: When the traversal result of the traversal operation includes the next-level application startup instruction in the flash memory chip of the one model, it is determined that the traversal is successful.

[0105] Specifically, after the computer device performs a traversal operation on at least one preset sub-operation data table, if the traversal result obtained includes a startup instruction of a startup code corresponding to a flash memory chip model, for example, when the output is a startup instruction of a Bootloader code, it can be said that the traversal operation performed is successful.

[0106] Step S33: storing the preset sub-operation data table, the preset sub-operation and the identification parameter in the register.

[0107] 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 the high wbit of the preset storage unit of the register, and the identification parameter can be stored in the low vbit of the preset storage unit; or the identification parameter can be stored in the high wbit stored in the preset storage unit, and the numbered m sub-operations and the numbered k sub-operation data tables can be stored in the low vbit stored in the preset storage unit.

[0108] Among them, the preset storage unit can be a storage unit of a word size in the register, the m numbered sub-operations can be m sub-operations obtained after packaging processing of the operating parameters of m models of flash memory chips, and then determined after sequential numbering in sequence, and the k numbered sub-operation data tables can be k sub-operation data tables obtained after classification processing of the m sub-operations, and then determined after sequential numbering in sequence.

[0109] In this embodiment, when the computer device determines that the data stored in the register is invalid, it traverses the preset sub-operation data table pre-stored in the fixed startup code, and determines that the traversal is successful when the traversal result obtained after performing the traversal operation includes the next-level application startup instruction in the flash memory chip of the one model, thereby further improving the flexibility and diversity of the register. The computer device then stores the preset sub-operation data table, the preset sub-operation and the identification parameter in the register, so that when the startup information of the fixed startup code is not the first startup, it can quickly hit the flash memory chip of one model, thereby improving the startup speed of the computer device.

[0110] Figure 6 A flowchart of a startup method based on a fixed startup code is provided for another embodiment. This embodiment relates to a specific process of how a computer device determines whether a traversal is successful based on the traversal result of a traversal operation. Based on the above embodiment, optionally, Figure 6 As shown, step S32 can be implemented by the following sub-steps:

[0111] Step S321: Determine the t in the i-th sub-operation data table. i When traversing sub-operations, judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; j = 1, 2, ..., t i ,i=1,2,…,k,t1+t2+…+t k =m, k is an integer greater than 1.

[0112] Specifically, the computer device can traverse the t in the i-th sub-operation data table. i The corresponding t of the sub-operation i operation parameters, and judge t in turn i Whether the first operation parameter is valid, whether the second operation parameter is valid, and so on until the tth operation parameter i Whether an operating parameter is valid; wherein, judging whether the operating parameter is valid includes whether a startup instruction of a startup code corresponding to the flash memory chip of the one model can be obtained based on the operating parameter.

[0113] In the actual processing process, when the computer device determines t i If the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid, the process proceeds to step S322; otherwise, when the computer device determines that t i When the j-th operation parameter corresponding to the j-th sub-operation in the sub-operations is invalid, go to step S323.

[0114] Step S322: When the j-th operation parameter is valid, determine that the traversal is successful.

[0115] Specifically, when the computer device determines that t i When the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid, it means that the next level application startup instruction in the flash memory chip can be obtained according to the jth operation parameter, and this means that the traversal operation is successful.

[0116] In the actual processing process, if the computer device traverses t1 operation parameters corresponding to t1 sub-operations in the first sub-operation data table, and determines that the first operation parameter among the t1 operation parameters is valid, it can also be said that the traversal operation is successful.

[0117] Step S323: When the jth operation parameter is invalid and it is determined that j < t i When t is , let the value of j increase by 1, and return to step S321 to determine whether t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; if the jth operation parameter is invalid, and it is determined that j=t i, proceed to step S324.

[0118] Specifically, when the computer device determines that the jth operation parameter is invalid, it means that the next level application startup instruction in the flash memory chip cannot be obtained according to the jth operation parameter, which means that the traversal operation is not successful. At this time, the value of j can be increased by 1 and then judged again.

[0119] In the actual processing process, if the computer device traverses the t1 operation parameters corresponding to the t1 sub-operation in the 1st sub-operation data table, and determines that the first operation parameter among the t1 operation parameters is invalid, it can continue to determine whether the second operation parameter among the t1 operation parameters is valid. When the second operation parameter is also invalid, it can continue to determine whether the third operation parameter among the t1 operation parameters is valid, and so on.

[0120] If one of the t1 operation parameters is judged to be valid, the traversal operation is successful and the traversal operation can be stopped; if all t1 operation parameters are judged to be invalid, the t2 operation parameters corresponding to the t2 sub-operations in the second sub-operation data table can be traversed in turn.

[0121] Step S324: when t i The corresponding t of the sub-operation i When all the operation parameters are invalid and it is determined that i<k, the value of i is increased by 1, and the process goes to step S321 to determine t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operation is valid; if t i The corresponding t of the sub-operation i When all operation parameters are invalid and it is determined that i=k, the process goes to step S325.

[0122] Specifically, when the computer determines t i The corresponding t of the sub-operation i When all operation parameters are invalid, it means that according to t i If any of the operation parameters cannot obtain the next-level application startup instruction in the flash memory chip, a traversal operation can be performed on the next sub-operation data table of the current sub-operation data table; for example, when the computer determines that t1 operation parameters corresponding to t1 sub-operations in the first sub-operation data table are invalid, it can continue to determine whether there are valid operation parameters for t2 operation parameters corresponding to t2 sub-operations in the second sub-operation data table, and so on, until it is determined that the operation parameters corresponding to one sub-operation in the k preset sub-operation data tables are valid, then the traversal is determined to be successful.

[0123] Step S325: output reminder information, where the reminder information is used to remind the user of the failure of the startup.

[0124] Specifically, after the computer device traverses k preset sub-operation data tables, it determines that no valid operation parameters exist. At this time, it means that not only the stored data in the register is invalid, but the preset sub-operation data table pre-stored in the solidified startup code is also invalid. At this time, the computer device cannot be used normally to hit an operation parameter of a flash memory chip of one model, so it outputs a reminder message of the failure of this startup.

[0125] In this embodiment, the computer device traverses the m operation parameters corresponding to the k sub-operation data tables in sequence to determine whether there is a valid operation parameter, and the traversal is determined to be successful as long as there is a valid operation parameter among the m operation parameters. When all m operation parameters are invalid, a reminder message of the startup failure is output, thereby improving the flexibility and intelligence of the computer device.

[0126] Figure 7 A flowchart of a startup method based on a fixed startup code is provided for another embodiment. This embodiment relates to a specific process of how a computer device determines whether it can obtain the next-level application startup instruction in the flash memory chip of the one model based on the operating parameters. Based on the above embodiment, optionally, Figure 7 As shown, judging whether the operating parameters are valid in step S321 includes whether the startup instruction of the startup code corresponding to the flash memory chip of the one model can be obtained based on the operating parameters, which can be implemented by the following sub-steps:

[0127] Step S3211: Obtain startup data of the next level application according to the operation parameters.

[0128] Specifically, the startup process of a computer device may include BOOTROM-->boot loader (Bootloader)-->real-time operating system program (Kernel)-->application program (App), etc., wherein --> represents the next-level startup object, and each flash memory chip is burned with a firmware package consisting of Bootloader, Kernel, App, etc., and the header files of Bootloader, Kernel, and App respectively include preset verification parameters, which may include preset verification bit numbers and preset verification values.

[0129] Therefore, when the computer device traverses one of the preset sub-operations in the k preset sub-operation data tables, it will further determine whether the operating parameters of the flash memory chip corresponding to the preset sub-operation are valid, that is, the computer can obtain the next level of startup data in the flash memory chip of the one model according to the operating parameters. For example, when the next level is the Bootloader, the startup data corresponding to the operating parameters obtained by the computer device can be the Bootloader code.

[0130] Step S3212: verify the startup data according to preset verification parameters, and determine whether the verified startup data is consistent with the startup data corresponding to the next-level application startup instruction.

[0131] Specifically, the preset verification parameters may be the preset verification bit number and the preset verification value carried by the startup data corresponding to the next-level application startup instruction. For example, when the next-level application startup instruction is a startup instruction of the Bootloader code, the computer device may verify the startup data obtained corresponding to the operation parameters according to the preset verification parameters in the Bootloader code, and then further determine whether the verified startup data is the same as the startup data corresponding to the startup instruction of the Bootloader code. If they are the same, it indicates that the verified startup data is correct; if they are different, it indicates that the verified startup data is incorrect.

[0132] In the actual processing process, the preset check value in the Bootloader code can be a magic check value, a crc check value, etc. When the checked startup data is the same as the startup data corresponding to the startup instruction of the Bootloader code, it means that the checked startup data has passed the magic and crc checks, and the operation parameters are valid. On the contrary, when the checked startup data is different from the startup data corresponding to the startup instruction of the Bootloader code, it means that the checked startup data has not passed at least one of the magic and crc checks, and the operation parameters are invalid.

[0133] Step S3213: If they are consistent, determine that the next level application startup instruction in the flash memory chip of the one model can be obtained based on the operating parameters.

[0134] Specifically, when the computer device determines that the verified startup data is the same as the startup data corresponding to the startup instruction of the Bootloader code, it can be determined that the verified startup data has passed the magic and crc checks of the Bootloader code, thereby indicating that the operating parameters are valid, and the computer device can obtain the startup instruction of the Bootloader code based on the operating parameters.

[0135] Step S3214: If there is inconsistency, determine that the next-level application startup instruction in the flash memory chip of the one model cannot be obtained based on the operating parameters.

[0136] Specifically, when the computer device determines that the verified startup data is different from the startup data corresponding to the startup instruction of the Bootloader code, it can be determined that the verified startup data does not pass at least one of the magic and crc checks of the Bootloader code, thereby indicating that the operating parameters are invalid and the computer device cannot obtain the startup instruction of the Bootloader code according to the operating parameters.

[0137] In this embodiment, when the computer device obtains the startup data of the next-level application according to the operating parameters, it verifies it through preset verification parameters, and further determines whether the verified startup parameters are consistent with the startup data corresponding to the startup instructions of the next-level application, so as to determine whether the startup instructions of the next-level application in the flash memory chip of the one model can be obtained according to the operating parameters, thereby improving the reliability and flexibility of the computer device in obtaining the startup instructions of the next-level application of one model of flash memory chip, and also improving the functional diversity of electronic devices.

[0138] It should be understood that although Figure 1-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0139] In one embodiment, Figure 8 As shown, a startup device based on a solidified startup code is provided. Figure 8 As shown, the device includes: a first acquisition module 11, a second acquisition module 12, a third acquisition module 13 and an execution module 14.

[0140] Specifically, the first acquisition module 11 is used to obtain the startup information of whether the fixed startup code is the first startup; the second acquisition module 12 is used to obtain the preset sub-operation data table and preset sub-operation corresponding to one model of flash memory chip from the register when the startup information indicates that the fixed startup code is not the first startup; the third acquisition module 13 is used to obtain the startup instruction of the startup 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 used to execute the startup operation corresponding to the startup instruction and output a prompt information; wherein the prompt information is used to prompt that the one model of flash memory chip is hit.

[0141] The startup device based on the fixed startup code may further include: a packaging module 21 , a fourth acquisition module 22 , a fifth acquisition module 23 , a first determination module 24 , a sixth acquisition module 25 and a processing module 26 .

[0142] Specifically, the encapsulation module 21 is used to encapsulate the operation parameters of m types of flash memory chips pre-stored in the solidified boot code when the startup information indicates that the solidified boot code is started for the first time, so as to obtain m sub-operations; wherein the operation parameters include at least one of a read operation parameter and a write operation parameter, and the operation parameters of the one type of flash memory chip are selected from the operation parameters of the m types of flash memory chips pre-stored in the solidified boot code, and m is much greater than 1; the fourth acquisition module 22 is used to classify the m sub-operations and obtain k sub-operation data tables; the fifth acquisition module 23 is used to classify the m sub-operations and the k sub-operations. The sub-operation data tables are numbered in sequence to obtain m numbered sub-operations and k numbered sub-operation data tables; a first determination module 24 is used to determine that the m numbered sub-operations are the preset sub-operations, and to determine that the k numbered sub-operation data tables are the preset sub-operation data tables; wherein k is an integer greater than 1; a sixth acquisition module 25 is used to obtain the startup instruction of the startup code corresponding to the flash memory chip of the one model according to the preset sub-operation data table and the preset sub-operation; a processing module 26 is used to store the preset sub-operation and the preset sub-operation data table in the register, and execute the startup operation corresponding to the startup instruction.

[0143] The encapsulation module 21 can be specifically used to encapsulate the operation parameters of each model of flash memory chip in the form of structures, and determine the encapsulated operation parameters in the form of m structures as the m sub-operations.

[0144] The fourth acquisition module 22 may specifically include: an acquisition unit 221 , a first determination unit 222 , and a second determination unit 223 .

[0145] Specifically, the acquisition unit 221 is used to acquire the flash memory model of the flash memory chip corresponding to each sub-operation;

[0146] The first determining unit 222 is used to determine k flash memory model sets belonging to the same flash memory category among the m flash memory models; the second determining unit 223 is used to determine k sub-operation sets corresponding to the k flash memory model sets, and determine the k sub-operation sets as the k sub-operation data tables; wherein the i-th flash memory model set includes t i flash memory models, i = 1, 2, ..., k, t1 + t2 + ... + t k =m.

[0147] The startup device based on the fixed startup code may further specifically include: a detection unit 121 , a first processing unit 122 and a second processing unit 123 .

[0148] Specifically, the detection unit 121 is used to detect whether the identification parameter in the register is the same as the preset threshold value, and the identification parameter is used to verify whether the preset sub-operation data table and the preset sub-operation stored in the register are valid; the first processing unit 122 is used to determine that the preset sub-operation data table and the preset sub-operation stored in the register are valid when the identification parameter is the same as the preset threshold value; the second processing unit 123 is used to output an indication that the data stored in the register is invalid when the identification parameter is not the same as the preset threshold value.

[0149] The embedded system-based startup device may further specifically include: a traversal module 31 , a second determination module 32 and a storage module 33 .

[0150] Specifically, the traversal module 31 is used to perform a traversal operation on the preset sub-operation data table pre-stored in the solidified startup code to obtain a traversal result of the traversal operation; the second determination module 32 is used to determine that the traversal is successful when the traversal result of the traversal operation includes the next-level application startup instruction in the flash memory chip of the one model; the storage module 33 is used to store the preset sub-operation data table, the preset sub-operation and the identification parameter in the register.

[0151] The second determination module 32 may further specifically include: a first judgment unit 321 , a first determination unit 322 , a second judgment unit 323 , a third judgment unit 324 , and a second determination unit 325 .

[0152] Specifically, the first judgment unit 321 is used to determine the t in the i-th sub-operation data table. i When traversing sub-operations, judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; j = 1, 2, ..., ti ,i=1,2,…,k,t1+t2+…+t k = m, k is an integer greater than 1; a first determining unit 322, used to determine that the traversal is successful when the j-th operation parameter is valid; a second judging unit 323, used to add 1 to the value of j when the j-th operation parameter is invalid, and judge t i The third judging unit 324 is used to determine whether the j-th operation parameter corresponding to the j-th sub-operation in the sub-operation is valid; i The corresponding t of the sub-operation i When all operation parameters are invalid, let the value of i increase by 1 and judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; the second determination unit 325 is used to determine that the traversal is successful until the operation parameter corresponding to a sub-operation in the preset sub-operation data table is determined to be valid; wherein, determining whether the operation parameter is valid includes whether the startup instruction of the startup code corresponding to the flash memory chip of the one model can be obtained based on the operation parameter.

[0153] The second determination unit 325 can be specifically used to: obtain the startup data of the next-level application according to the operating parameters; verify the startup data according to the preset verification parameters, and determine whether the verified startup data is consistent with the startup data corresponding to the startup instruction of the next-level application; if they are consistent, determine that the startup instruction of the next-level application in the flash memory chip of the one model can be obtained based on the operating parameters; if they are inconsistent, determine that the startup instruction of the next-level application in the flash memory chip of the one model cannot be obtained based on the operating parameters.

[0154] For the specific definition of the startup device based on the fixed startup code, please refer to the definition of the startup method based on the fixed startup code above, which will not be repeated here. Each module in the above-mentioned startup device based on the fixed startup code can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0155] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile 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 the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for obtaining an assessment quantitative value is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0156] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0157] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0158] Obtaining startup information indicating whether the fixed startup code is the first startup; when the startup information indicates that the fixed startup code is not the first startup, obtaining a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model from a register; obtaining a startup instruction of the startup code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation; executing the startup operation corresponding to the startup instruction, and outputting a prompt message; wherein the prompt message is used to prompt that the flash memory chip of one model is hit.

[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0160] When the startup information indicates that the fixed startup code is started for the first time, the operation parameters of the m models of flash memory chips pre-stored in the fixed startup code are packaged to obtain m sub-operations; wherein the operation parameters include at least one of read operation parameters and write operation parameters, and the operation parameters of the one model of flash memory chip are selected from the operation parameters of the m models of flash memory chips pre-stored in the fixed startup code, and m is much greater than 1; the m sub-operations are classified to obtain k sub-operation data tables; the m sub-operations and the k sub-operation data tables are numbered in sequence to obtain the numbered m sub-operations and the numbered k sub-operation data tables; the numbered m sub-operations are determined to be the preset sub-operations, and the numbered k sub-operation data tables are determined to be the preset sub-operation data tables; wherein k is an integer greater than 1; according to the preset sub-operation data tables and the preset sub-operations, the startup instruction of the startup code corresponding to the one model of flash memory chip is obtained; the preset sub-operation and the preset sub-operation data tables are stored in the register, and the startup operation corresponding to the startup instruction is executed.

[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0162] The operation parameters of each model of the flash memory chip are respectively packaged in the form of structures, and the packaged operation parameters in the form of m structures are determined as the m sub-operations.

[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0164] Obtain the flash memory model of the flash memory chip corresponding to each sub-operation; determine k flash memory model sets belonging to the same flash memory category among the m flash memory models; determine k sub-operation sets corresponding to the k flash memory model sets, and determine the k sub-operation sets as the k sub-operation data tables; wherein the i-th flash memory model set includes t i flash memory models, i = 1, 2, ..., k, t1 + t2 + ... + t k =m.

[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0166] Check whether an identification parameter in a register is the same as a preset threshold value, wherein the identification parameter is used to verify whether the preset sub-operation data table and the preset sub-operation stored in the register are valid; when the identification parameter is the same as the preset threshold value, determine that the preset sub-operation data table and the preset sub-operation stored in the register are valid; when the identification parameter is not the same as the preset threshold value, output indication information that the data stored in the register is invalid.

[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0168] A traversal operation is performed on the preset sub-operation data table pre-stored in the solidified startup code to obtain a traversal result of the traversal operation; when the traversal result of the traversal operation includes the next-level application startup instruction in the flash memory chip of the one model, it is determined that the traversal is successful; and the preset sub-operation data table, the preset sub-operation and the identification parameter are stored in the register.

[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0170] Determine the t in the i-th sub-operation data table i When traversing sub-operations, judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; j = 1, 2, ..., t i ,i=1,2,…,k,t1+t2+…+t k = m, k is an integer greater than 1; when the jth operation parameter is valid, the traversal is determined to be successful; when the jth operation parameter is invalid, the value of j is increased by 1, and t is determined. i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; when t i The corresponding t of the sub-operation i When all operation parameters are invalid, let the value of i increase by 1 and judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; until it is determined that the operation parameter corresponding to a sub-operation in the preset sub-operation data table is valid, the traversal is determined to be successful; wherein, judging whether the operation parameter is valid includes whether the startup instruction of the startup code corresponding to the flash memory chip of the one model can be obtained based on the operation parameter.

[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0172] The startup data of the next-level application is obtained according to the operating parameters; the startup data is checked according to the preset verification parameters, and it is determined whether the verified startup data is consistent with the startup data corresponding to the startup instruction of the next-level application; if they are consistent, it is determined that the startup instruction of the next-level application in the flash memory chip of the one model can be obtained based on the operating parameters; if they are inconsistent, it is determined that the startup instruction of the next-level application in the flash memory chip of the one model cannot be obtained based on the operating parameters.

[0173] It should be clear that the process of the processor executing the computer program in the embodiment of the present application is consistent with the execution process of each step in the above method, and the details can be found in the description above.

[0174] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0175] Obtaining startup information indicating whether the fixed startup code is the first startup; when the startup information indicates that the fixed startup code is not the first startup, obtaining a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model from a register; obtaining a startup instruction of the startup code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation; executing the startup operation corresponding to the startup instruction, and outputting a prompt message; wherein the prompt message is used to prompt that the flash memory chip of one model is hit.

[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0177] When the startup information indicates that the fixed startup code is started for the first time, the operation parameters of the m models of flash memory chips pre-stored in the fixed startup code are packaged to obtain m sub-operations; wherein the operation parameters include at least one of read operation parameters and write operation parameters, and the operation parameters of the one model of flash memory chip are selected from the operation parameters of the m models of flash memory chips pre-stored in the fixed startup code, and m is much greater than 1; the m sub-operations are classified to obtain k sub-operation data tables; the m sub-operations and the k sub-operation data tables are numbered in sequence to obtain the numbered m sub-operations and the numbered k sub-operation data tables; the numbered m sub-operations are determined to be the preset sub-operations, and the numbered k sub-operation data tables are determined to be the preset sub-operation data tables; wherein k is an integer greater than 1; according to the preset sub-operation data tables and the preset sub-operations, the startup instruction of the startup code corresponding to the one model of flash memory chip is obtained; the preset sub-operation and the preset sub-operation data tables are stored in the register, and the startup operation corresponding to the startup instruction is executed.

[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0179] The operation parameters of each model of the flash memory chip are respectively packaged in the form of structures, and the packaged operation parameters in the form of m structures are determined as the m sub-operations.

[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0181] Obtain the flash memory model of the flash memory chip corresponding to each sub-operation; determine k flash memory model sets belonging to the same flash memory category among the m flash memory models; determine k sub-operation sets corresponding to the k flash memory model sets, and determine the k sub-operation sets as the k sub-operation data tables; wherein the i-th flash memory model set includes t i flash memory models, i = 1, 2, ..., k, t1 + t2 + ... + t k =m.

[0182] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0183] Check whether an identification parameter in a register is the same as a preset threshold value, wherein the identification parameter is used to verify whether the preset sub-operation data table and the preset sub-operation stored in the register are valid; when the identification parameter is the same as the preset threshold value, determine that the preset sub-operation data table and the preset sub-operation stored in the register are valid; when the identification parameter is not the same as the preset threshold value, output indication information that the data stored in the register is invalid.

[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0185] A traversal operation is performed on the preset sub-operation data table pre-stored in the solidified startup code to obtain a traversal result of the traversal operation; when the traversal result of the traversal operation includes the next-level application startup instruction in the flash memory chip of the one model, it is determined that the traversal is successful; and the preset sub-operation data table, the preset sub-operation and the identification parameter are stored in the register.

[0186] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0187] Determine the t in the i-th sub-operation data table i When traversing sub-operations, judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; j = 1, 2, ..., t i ,i=1,2,…,k,t1+t2+…+t k = m, k is an integer greater than 1; when the jth operation parameter is valid, the traversal is determined to be successful; when the jth operation parameter is invalid, the value of j is increased by 1, and t is determined. i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; when t i The corresponding t of the sub-operation i When all operation parameters are invalid, let the value of i increase by 1 and judge t iWhether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; until it is determined that the operation parameter corresponding to a sub-operation in the preset sub-operation data table is valid, the traversal is determined to be successful; wherein, judging whether the operation parameter is valid includes whether the startup instruction of the startup code corresponding to the flash memory chip of the one model can be obtained based on the operation parameter.

[0188] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0189] The startup data of the next-level application is obtained according to the operating parameters; the startup data is checked according to the preset verification parameters, and it is determined whether the verified startup data is consistent with the startup data corresponding to the startup instruction of the next-level application; if they are consistent, it is determined that the startup instruction of the next-level application in the flash memory chip of the one model can be obtained based on the operating parameters; if they are inconsistent, it is determined that the startup instruction of the next-level application in the flash memory chip of the one model cannot be obtained based on the operating parameters.

[0190] It should be clear that the process of the processor executing the computer program in the embodiment of the present application is consistent with the execution process of each step in the above method, and the details can be found in the description above.

[0191] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. 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. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0192] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0193] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A startup method based on a solidified startup code, characterized in that: The method comprises: Get the startup information of whether the fixed startup code is the first startup; When the startup information indicates that the fixed startup code is not started for the first time, a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model are obtained from a register; the preset sub-operation data table and the preset sub-operation are generated after determining the operation parameters of a target model from the operation parameters of a plurality of candidate models pre-stored in the fixed startup code when the fixed startup code is started for the first time, and performing a traversal operation on the operation parameters of the target model; According to the preset sub-operation data table and the preset sub-operation, obtaining a startup instruction of the startup code corresponding to the flash memory chip; Execute the startup operation corresponding to the startup instruction and output prompt information; wherein the prompt information is used to prompt that the flash memory chip of the one model is hit.

2. The method according to claim 1, characterized in that The method further comprises: When the startup information indicates that the fixed startup code is started for the first time, the operation parameters of the m types of flash memory chips pre-stored in the fixed startup code are packaged to obtain m sub-operations; wherein the operation parameters include at least one of a read operation parameter and a write operation parameter, and the operation parameters of the one type of flash memory chip are selected from the operation parameters of the m types of flash memory chips pre-stored in the fixed startup code, and m is much greater than 1; Classify 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 and in sequence to obtain m numbered sub-operations and k numbered sub-operation data tables; Determine the m sub-operations after the number as the preset sub-operations, and determine the k sub-operation data tables after the number as the preset sub-operation data tables; wherein k is an integer greater than 1; According to the preset sub-operation data table and the preset sub-operation, obtaining a startup instruction of the startup code corresponding to the flash memory chip of the one model; The preset sub-operation and the preset sub-operation data table are stored in the register, and the start operation corresponding to the start instruction is executed.

3. The method according to claim 2, characterized in that The operation parameters of the m models of flash memory chips are packaged to obtain m sub-operations, including: The operation parameters of each model of the flash memory chip are respectively packaged in the form of structures, and the packaged operation parameters in the form of m structures are determined as the m sub-operations.

4. The method according to claim 2, characterized in that The m sub-operations are classified to obtain k sub-operation data tables, including: Get the flash memory model of the flash memory chip corresponding to each sub-operation; Determine a set of k flash memory models belonging to the same flash memory category among the m flash memory models; Determine k sub-operation sets corresponding to k flash memory model sets, and determine the k sub-operation sets as the k sub-operation data tables; Among them, the i-th flash memory model set includes t i Flash memory models, i=1, 2, ..., k, t1+t2+...+ t k =m.

5. The method according to claim 1, characterized in that When the register stores the identification parameter, the method further includes: Detecting whether an identification parameter in the register is the same as a preset threshold value, wherein the identification parameter is used to verify whether the preset sub-operation data table and the preset sub-operation stored in the register are valid; When the identification parameter is the same as the preset threshold, determining that the preset sub-operation data table and the preset sub-operation stored in the register are valid; When the identification parameter is different from the preset threshold, the output register stores indication information that the data is invalid.

6. The method according to claim 5, characterized in that After the step of outputting indication information indicating that the register is invalid when the identification parameter is different from the preset threshold, the method further includes: Performing a traversal operation on the preset sub-operation data table pre-stored in the solidified startup code to obtain a traversal result of the traversal operation; When the traversal result of the traversal operation includes the next level application startup instruction in the flash memory chip of the one model, determining that the traversal is successful; The preset sub-operation data table, the preset sub-operation and the identification parameter are stored in the register.

7. The method according to claim 6, characterized in that When the traversal result of the traversal operation includes the next level application startup instruction in the flash memory chip, determining that the traversal is successful includes: Determine the t in the i-th sub-operation data table i When traversing sub-operations, judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the number of sub-operations is valid; j = 1, 2, ..., t i ,i=1,2,…,k,t1+t2+…+ t k =m, k is an integer greater than 1; When the j-th operation parameter is valid, determining that the traversal is successful; When the jth operation parameter is invalid, let the value of j be increased by 1, and judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; When t i The corresponding t of the sub-operation i When all operation parameters are invalid, let the value of i increase by 1 and judge t i Whether the jth operation parameter corresponding to the jth sub-operation in the sub-operations is valid; Until it is determined that the operation parameter corresponding to a sub-operation in the preset sub-operation data table is valid, the traversal is determined to be successful; The determining whether the operating parameters are valid includes obtaining a startup instruction of a startup code corresponding to the flash memory chip of the one model based on the operating parameters.

8. The method according to claim 7, characterized in that The determining whether the operating parameters are valid includes whether a startup instruction of a startup code corresponding to the flash memory chip of the one model can be obtained based on the operating parameters, including: Obtaining startup data of a next-level application according to the operation parameters; Verifying the startup data according to preset verification parameters, and determining whether the verified startup data is consistent with the startup data corresponding to the next-level application startup instruction; If they are consistent, determining that the next level application startup instruction in the flash memory chip of the one model can be obtained based on the operation parameter; If they are inconsistent, it is determined that the next level application startup instruction in the flash memory chip of the one model cannot be obtained based on the operating parameters.

9. A startup device based on a solidified startup code, characterized in that: The device comprises: A first acquisition module is used to obtain startup information of whether the solidified startup code is started for the first time; a second acquisition module, for acquiring, from a register, a preset sub-operation data table and a preset sub-operation corresponding to a flash memory chip of one model when the startup information indicates that the fixed startup code is not started for the first time; the preset sub-operation data table and the preset sub-operation are generated after determining the operation parameters of a target model from the operation parameters of a plurality of candidate models pre-stored in the fixed startup code when the fixed startup code is started for the first time, and performing a traversal operation on the operation parameters of the target model; A third acquisition module, configured to acquire a startup instruction of a startup code corresponding to the flash memory chip according to the preset sub-operation data table and the preset sub-operation; An execution module is used to execute the startup operation corresponding to the startup instruction and output prompt information; wherein the prompt information is used to prompt that the flash memory chip of the one model is hit.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor is used to execute the computer program, the steps of any one of the methods of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of any one of the methods of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Method for starting guidance program in flash memory, network television and set-top box thereof

    CN101520735A

  • System starting method based on solid state disc and solid state disc

    CN102591686A