Electronic device, initialization starting method thereof, and chip

By enabling the embedded multimedia card to enter an accessible state and performing the initialization phase in parallel within the electronic device, the problem of excessively long eMMC initialization time is solved, thereby improving startup speed and efficiency without increasing costs.

CN121704927BActive Publication Date: 2026-07-03JINGCHEN SEMICON SHENZHEN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610203051.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-12
Publication Date
2026-07-03
Estimated Expiration
2046-02-12

AI Technical Summary

Technical Problem

The initialization process of eMMC is time-consuming, resulting in insufficient startup speed of electronic devices, which is unacceptable, especially in application scenarios with high startup speed requirements. Furthermore, adding auxiliary media will increase cost and complexity.

Method used

By enabling the embedded multimedia card to access the boot partition, the on-chip system reads the boot code and executes a portion of the initialization process in parallel. At the same time, the embedded multimedia card executes the second initialization phase, avoiding the time consumption caused by sequential waiting in the traditional serial execution method.

Benefits of technology

Without increasing additional costs, the overall startup time of electronic devices from power-on or reset to entering a usable state is shortened, improving startup efficiency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121704927B_ABST
    Figure CN121704927B_ABST
Patent Text Reader

Abstract

This disclosure provides an electronic device and its initialization startup method and chip. The electronic device includes a system-on-a-chip (SoC) and an embedded multimedia card electrically connected to the SoC. The method includes: in response to a power-on or reset event, controlling the embedded multimedia card to execute a first initialization phase, so that the embedded multimedia card enters a state where a boot partition can be accessed, and reading boot code from the boot partition; according to the boot code, the SoC executes at least a portion of its own initialization process, and the embedded multimedia card executes a second initialization phase to enter a user data accessible state; wherein, at least a portion of the initialization process of the SoC and the second initialization phase of the embedded multimedia card are executed in at least partial parallel time. Using the above technical solution, the overall startup time can be shortened without increasing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to an electronic device and its initialization startup method and chip. Background Technology

[0002] System-on-a-Chip (SoC) is widely used in various electronic devices because it integrates a processor, memory control unit, and various peripheral interfaces into a single chip. To ensure the normal operation of electronic devices, the SoC typically needs to acquire necessary program or configuration information after power-on or reset to complete system initialization and function startup.

[0003] Embedded Multi Media Card (eMMC) is a common non-volatile storage medium. Due to its mature interface specifications, large storage capacity, and good compatibility, it is widely used to store boot-related data, system programs, and user data.

[0004] However, as a device with a large storage capacity, eMMC has a long initialization process, which is unacceptable for some application scenarios that require high startup speed. Summary of the Invention

[0005] In view of this, the present disclosure provides an electronic device and its initialization startup method and chip, which can shorten the overall startup time without increasing costs.

[0006] To achieve the above objectives, the present disclosure provides the following technical solutions.

[0007] In a first aspect, embodiments of this disclosure provide an initialization startup method for an electronic device, the electronic device comprising: a system-on-a-chip (SoC) and an embedded multimedia card electrically connected to the SoC, the initialization startup method comprising:

[0008] In response to a power-on or reset event, the embedded multimedia card is controlled to perform a first initialization phase, so that the embedded multimedia card enters a state where the boot partition can be accessed, and reads the boot code from the boot partition;

[0009] According to the startup code, the on-chip system executes at least a portion of its own initialization process and sends a user area management command to the embedded multimedia card. The embedded multimedia card then executes a second initialization phase to enter a user data accessible state. The initialization process of the on-chip system and the second initialization phase of the embedded multimedia card are executed in at least partial parallel time.

[0010] Optionally, the step of controlling the embedded multimedia card to perform a first initialization phase in response to a power-on or reset event includes:

[0011] In response to a power-on or reset event, an initialization command sequence is sent to the embedded multimedia card, causing the embedded multimedia card to execute the first initialization phase according to the initialization command sequence.

[0012] Optionally, the initialization startup method satisfies one or more of the following:

[0013] The first initialization phase includes the initialization of the boot partitions Boot0 and / or Boot1 of the embedded multimedia card;

[0014] The startup code includes: a second-stage program loader, or a second-stage program loader and a third-stage program loader;

[0015] The embedded multimedia card is checked by polling the device ready flag in the operation condition register to determine whether it has entered the state of being able to access the boot partition.

[0016] Optionally, during the second initialization phase, the system-on-chip is prohibited from requesting data access to the uninitialized partitions of the embedded multimedia card.

[0017] Optionally, during the execution of the second initialization phase, prohibiting the on-chip system from accessing data to the uninitialized partitions of the embedded multimedia card includes:

[0018] When the on-chip system enters the boot program execution stage indicated by the boot code, the boot code controls the on-chip system to send a status query instruction to the embedded multimedia card. The status query instruction is used to obtain the initialization completion status of other partitions in the embedded multimedia card except for the boot partition.

[0019] Based on the status information returned by the embedded multimedia card, determine whether the other partition has completed initialization and is in an accessible state;

[0020] In response to the fact that the other partition has not been initialized, the driver code in the boot code prevents the on-chip system from performing data access operations on the other partition.

[0021] Optionally, in response to the other partition not having completed initialization, the initialization status of the other partition continues to be polled by sending the status query instruction; and / or, in response to the other partition completing initialization and being in an accessible state, the on-chip system is allowed to perform data access operations on the other partition.

[0022] The status query instruction includes one or more of the standard status query instruction and the custom status query instruction.

[0023] Optionally, during the second initialization phase, in response to receiving a signal from the system-on-a-chip, the embedded multimedia card replies with all-zero data to the system-on-a-chip, and / or, the embedded multimedia card replies with all-zero data and an error flag corresponding to the all-zero data to the system-on-a-chip, the error flag indicating that the all-zero data is invalid data information.

[0024] Optionally, the second initialization phase includes one or more of the following: establishing an access mapping for the user data area, loading internal parameters, and entering a data transfer state with higher access performance than the boot partition;

[0025] At least a portion of the initialization process of the on-chip system, which is executed in at least partial parallel time with the second initialization phase, consists of steps of the operation of the second initialization phase that are independent of the embedded multimedia card.

[0026] Optionally, the at least part of the initialization process includes one or more of the following: loading the startup code, initializing DDR, secure startup signature verification, and data verification.

[0027] In a second aspect, embodiments of this disclosure provide an electronic device, including: a system-on-a-chip (SoC) and an embedded multimedia card electrically connected to the SoC;

[0028] The system-on-chip, in response to a power-on or reset event, controls the embedded multimedia card to perform a first initialization phase, so that the embedded multimedia card enters a state where the boot partition can be accessed, and reads boot code from the boot partition; and executes at least a portion of its own initialization process according to the boot code;

[0029] The embedded multimedia card performs a second initialization phase to enter a user data accessible state;

[0030] In this process, at least a portion of the initialization process of the on-chip system is executed in parallel with the second initialization phase of the embedded multimedia card in time.

[0031] Thirdly, this disclosure provides a chip storing a computer program, characterized in that when the computer program is executed by the chip, the steps of the initialization startup method of the electronic device described in any of the foregoing embodiments are executed.

[0032] Compared with the prior art, the technical solution of the present disclosure has the following advantages:

[0033] In the initialization startup method of the electronic device provided in this disclosure, by enabling the embedded multimedia card to enter a state where the boot partition is accessible, the system-on-a-chip (SoC) can read the boot code from the boot partition. The SoC can then execute at least a portion of its own initialization process based on this boot code. Furthermore, the embedded multimedia card can execute a second initialization phase, entering a user data accessible state. That is, at least a portion of the SoC's initialization process and the second initialization phase of the embedded multimedia card are executed in at least partial parallel time. The two independent and non-dependent initialization operations overlap in time, avoiding the time consumption caused by sequential waiting in traditional serial execution methods. This effectively reduces the overall startup latency required for the system to enter a usable state from power-on or reset; and without adding additional auxiliary media, the overall startup time can be shortened without increasing costs. Attached Figure Description

[0034] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 A schematic diagram of an eMMC partition structure is shown.

[0036] Figure 2 A flowchart of an initialization startup method for an electronic device according to an embodiment of the present disclosure is shown.

[0037] Figure 3 A flowchart of a data access request according to an embodiment of this disclosure is shown.

[0038] Figure 4 The diagram illustrates the stages of an initialization startup method for an electronic device according to an embodiment of this disclosure.

[0039] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0040] Currently, the initialization process of eMMC takes a long time, which is unacceptable for some application scenarios that have high requirements for startup speed.

[0041] To better understand and illustrate the time-consuming issue of eMMC initialization in existing solutions, an example will be provided.

[0042] See Figure 1The diagram shown illustrates a partition structure for eMMC, as follows: Figure 1 As shown, the eMMC is usually divided into several partitions such as Boot Area1 (Boot1), Boot Area2 (Boot2), RPMB, and User Area.

[0043] Boot Area 1 is a dedicated boot partition built into the eMMC, with a small capacity (e.g., 4MiB / 8MiB, determined by EXT_CSD), used to store boot code (e.g., the Bootloader image).

[0044] Boot Area 2 is a dedicated boot partition built into the eMMC, with the same structure and capacity as Boot Area 1. The SoC can be configured to boot from either Boot Area 1 or Boot Area 2.

[0045] RPMB (Replay Protected Memory Block) is a built-in secure storage area in eMMC used to store secure data, with a capacity of approximately 4MiB.

[0046] The User Area is the primary storage area of ​​the eMMC, used to store the kernel, system image, and client information. The User Area occupies the vast majority of the eMMC's capacity. For example, the User Area's capacity may account for 90% or more of the nominal 4GiB / 8GiB.

[0047] Currently, eMMC initialization completes the initialization of Boot Area1, Boot Area2, RPMB, and User Area in one go. This process includes loading internal firmware and rebuilding the mapping table. The mapping table rebuilding process accounts for the majority of the time overhead. Since the size of the mapping table increases with the capacity, the initialization time of eMMC also shows a trend of increasing with the capacity.

[0048] For example, eMMC has a storage capacity of 4 GiB, and the corresponding initialization process typically takes about 200ms to 600ms.

[0049] Furthermore, when eMMC is used as the boot medium for SoC, the initialization and boot process of SoC and eMMC is usually performed sequentially according to a preset timing sequence.

[0050] For example, during the boot process of an electronic device, the SoC often needs to complete the initialization of some modules first, then configure communication and access data to the eMMC, and only after the eMMC completes the initialization of the user area can it read data from the user area and continue to execute subsequent boot operations. That is, the current boot process is usually executed serially.

[0051] However, the above-mentioned serialized initialization startup method has certain limitations in practical applications.

[0052] On the one hand, the initialization processes of the SoC and eMMC are somewhat independent in time. Sequential execution may cause some hardware resources to remain idle while waiting, thereby increasing the overall boot latency. On the other hand, when the eMMC initialization process is affected by factors such as power stabilization time, internal state recovery, or communication parameter negotiation and takes a long time, the SoC boot process may be forced to block, further reducing system boot efficiency.

[0053] As electronic devices increasingly demand fast startup and high responsiveness, the initialization startup mechanism, which is mainly based on sequential execution, has gradually become insufficient in terms of startup efficiency and resource utilization.

[0054] In one boot method, in order to meet the application scenario's requirements for capacity and boot time, other devices that do not require initialization time will be selected as auxiliary boot media, such as SPINOR.

[0055] However, this solution requires additional memory chips and their peripheral circuitry, leading to increased costs and PCB area. At the same time, the coexistence of multiple boot media complicates the boot architecture and software maintenance, and can easily cause problems such as version inconsistencies.

[0056] Therefore, there is a need to provide a solution that optimizes the initialization and boot process of SoC and eMMC without adding auxiliary boot media, so as to reduce system boot latency and improve overall boot performance.

[0057] After studying the initialization and startup process of a SoC, the inventors discovered that the SoC startup process is divided into multiple sequentially executed startup stages. These stages include at least a read-only memory (ROM) stage, a second program loader (SPL) stage, and a third program loader (TPL) stage. The startup code corresponding to the ROM stage is stored in a fixed manner within the SoC chip and is used to execute the initial startup operation after power-on or reset.

[0058] More specifically, during the execution of the ROM stage, the SPL is loaded into the on-chip static random access memory (SRAM) by calling the eMMC driver pre-installed in the ROM. The SPL is used to complete hardware configuration operations, including but not limited to the initialization of dynamic random access memory (DDR).

[0059] After completing DDR initialization, SPL loads TPL into DDR through its internally integrated eMMC driver to perform subsequent system boot tasks.

[0060] In other words, during the SoC initialization and startup process, there exists a startup phase that does not depend on the eMMC initialization operation. This allows for concurrent execution of this startup phase, thereby accelerating the overall startup of the electronic device, rather than improving the eMMC initialization speed.

[0061] Specifically, by enabling the embedded multimedia card to access the boot partition, the system-on-a-chip (SoC) can read the boot code from the boot partition, and then execute at least part of its initialization process based on the boot code. Furthermore, the embedded multimedia card can perform a second initialization phase, entering a user data accessible state.

[0062] In other words, at least a portion of the initialization process of the on-chip system and the second initialization phase of the embedded multimedia card are executed in parallel time. The initialization operations of the two are independent and have no dependency relationship, which overlap in time. This avoids the time consumption caused by sequential waiting in the traditional serial execution method, thereby effectively reducing the overall startup latency required for the system to enter the usable state from power-on or reset. Furthermore, no additional auxiliary medium is added, so the overall startup time can be shortened without increasing the cost.

[0063] In other words, the embodiments of this disclosure employ a phased initialization of the eMMC, and by executing at least a portion of the initialization process of the on-chip system in at least partial parallel time with the second initialization phase of the embedded multimedia card, at least a portion of the initialization process of the on-chip system can be started in advance, thereby reducing the overall startup latency required for the system to enter a usable state from power-on or reset.

[0064] Furthermore, the above solution does not change the initialization and startup logic of eMMC. Even when the SoC's ROM is already fixed, it can still achieve a parallel initialization and startup process, thereby reducing startup latency. At the same time, since it is still based on the information exchange startup process between the SoC and eMMC, it can also take into account existing solutions.

[0065] To enable those skilled in the art to better understand, implement and realize the embodiments of this disclosure, the following exemplary description is provided with reference to the accompanying drawings.

[0066] See Figure 2 , Figure 2 This is a flowchart of an initialization and startup method for an electronic device according to an embodiment of the present disclosure. The electronic device may include: a system-on-a-chip (SoC) and an embedded multimedia card electrically connected to the SoC.

[0067] The system-on-chip sends initialization commands to the embedded multimedia card according to a predetermined communication protocol. Based on the response information returned by the embedded multimedia card, it gradually completes operations such as power supply confirmation, working voltage negotiation, clock and bus width configuration, working mode switching, and status confirmation, and finally establishes a stable communication link, thereby enabling it to read startup data from the embedded multimedia card.

[0068] Specifically, the initialization startup method in this embodiment of the present disclosure may include steps S201 and S202:

[0069] S201, in response to a power-on or reset event, control the embedded multimedia card to perform a first initialization phase, so that the embedded multimedia card enters a state where the boot partition can be accessed, and reads the boot code from the boot partition.

[0070] In some embodiments, when the electronic device detects a power-on event or a reset event, it triggers an initialization startup process. This initialization startup process is executed by the on-chip system and is used to control and configure the embedded multimedia card.

[0071] Specifically, in response to a power-on or reset event, the system-on-chip controls the embedded multimedia card to perform the first initialization phase. The first initialization phase includes, but is not limited to: configuring the power-on timing of the embedded multimedia card, initializing the clock, establishing the communication interface, and setting necessary operating parameters.

[0072] The execution of the first initialization phase enables the embedded multimedia card to switch from a non-working or reset state to a state accessible to the on-chip system, especially to the boot partition.

[0073] After the embedded multimedia card enters a state where the boot partition is accessible, the system-on-a-chip (SoC) can send a read command to the embedded multimedia card to read pre-stored boot code from the boot partition. This boot code may include a bootloader, initialization configuration data, or a set of instructions for initiating subsequent system operation. The read boot code is loaded into the SoC's internal memory or a designated memory area for execution during the subsequent system boot phase.

[0074] By using the above method, the embedded multimedia card can be reliably initialized after power-on or reset, and the boot code can be obtained from the boot partition, thereby ensuring the stability and consistency of the boot process.

[0075] In some embodiments, step S201 may include:

[0076] In response to a power-on or reset event, an initialization command sequence is sent to the embedded multimedia card, causing the embedded multimedia card to execute the first initialization phase according to the initialization command sequence.

[0077] Specifically, when a power-on event or reset event is detected, the system-on-chip initiates a portion of the initialization process for the embedded multimedia card.

[0078] The on-chip system sends multiple initialization commands to the embedded multimedia card in sequence according to the preset initialization timing. These multiple initialization commands together constitute the initialization command sequence.

[0079] After receiving the initialization command sequence, the embedded multimedia card configures its internal registers, power state, and operating mode according to the instructions of each initialization command, thus entering the first initialization stage.

[0080] By executing the first initialization phase, the embedded multimedia card can be switched from a non-working state to a configurable state, preparing it for subsequent initialization phases and normal data transmission.

[0081] In some examples, the initialization commands in the initialization command sequence are sent in a predetermined order.

[0082] In some examples, initialization commands may include, but are not limited to: reset commands, power mode setting commands, operating voltage configuration commands, clock frequency setting commands, and bus width configuration commands.

[0083] It should be noted that the first initialization phase is the initial phase in the embedded multimedia card initialization process. It does not involve reading or writing data in the user area, but is used to complete the initialization configuration of the basic hardware and protocol layers.

[0084] In some embodiments, the first initialization phase includes initializing the boot partitions Boot0 and / or Boot1 of the embedded multimedia card.

[0085] The Boot partitions Boot0 and / or Boot1 have smaller spaces (or capacities), and the initialization time for the Boot partitions is shorter. This allows for the earlier initiation of a portion of the SoC's own initialization process, thereby further shortening the startup time of the electronic device.

[0086] Accordingly, the startup code includes the Second Program Loader (SPL). The SPL is located in the middle stage of the SoC startup process. It is triggered after the initial loader has finished executing. It is used to initialize and configure the critical hardware resources of the system in the limited on-chip operating environment and build an extended execution environment to support the subsequent bootloader, so as to achieve the continuity and stability of the startup process.

[0087] More specifically, the BootROM first reads the SPL from Boot0 or Boot1 of the eMMC into the SRAM of the SoC and jumps to execute it; based on the SPL, it completes the critical hardware initialization (e.g., DDR initialization).

[0088] In some embodiments, the startup code includes: a second-stage program loader (SPL) and a third-stage program loader (TPL).

[0089] In some embodiments, the eMMC initialization is segmented to achieve parallel processing. Therefore, it is necessary to determine whether the eMMC has completed the first stage of initialization.

[0090] For example, the embedded multimedia card enters the state of being able to access the boot partition by checking the device ready flag bit in the operation condition register through a polling command.

[0091] Specifically, the SoC sends a polling command (e.g., CMD1) to the eMMC, and the eMMC responds to the SoC with a signal for this polling command. The SoC uses the device ready flag (busy bit) to determine whether the embedded multimedia card has entered a state where the boot partition can be accessed.

[0092] For example, the SoC determines that the embedded multimedia card has entered a state where it can access the boot partition by indicating that the embedded multimedia card is in an idle state based on the device ready flag.

[0093] For example, upon power-up, the SoC first provides the operating voltage to the eMMC and outputs an initial clock signal to the eMMC's clock signal line.

[0094] Subsequently, the SoC sends a reset command CMD0 to the eMMC via the command signal line to put the eMMC into an idle state. During this stage: the CMD0 command is sent via the command signal line, the clock signal synchronously drives the command transmission, and the eMMC resets its internal state machine after receiving the CMD0 command.

[0095] That is, by using the CMD0 command, we ensure that the eMMC is in a known initial state, providing a basis for the subsequent initialization process.

[0096] After resetting, the SoC periodically sends a polling command (CMD1) to the eMMC via the command signal line to request the eMMC to return its power-on status and operational capability information. The CMD1 command is used to: confirm whether the eMMC has completed power-on initialization, and obtain the eMMC's capacity, voltage support, and ready status information. Upon receiving the CMD1 command, the eMMC returns a corresponding response signal via the command line. When the response signal indicates that the eMMC has entered the ready state, the SoC proceeds to the next initialization phase.

[0097] S202, according to the startup code, the on-chip system executes at least a portion of its own initialization process, and the embedded multimedia card executes a second initialization phase to enter a user data accessible state; wherein, the at least a portion of the initialization process of the on-chip system and the second initialization phase of the embedded multimedia card are executed in at least partial parallel time.

[0098] In some embodiments, the SoC can write the read boot code into SRAM. The SoC then uses this boot code to execute at least a portion of its initialization process after power-on or reset.

[0099] In this process, eMMC spontaneously switches from the first initialization phase to the second initialization phase.

[0100] In this way, the eMMC can autonomously perform a second initialization phase to at least complete user area configuration operations, enabling it to respond to user area data access requests. In this state, the SoC can perform read and write operations on the eMMC's user area, thus achieving normal access to user data during the boot process.

[0101] In other words, eMMC can proactively execute the second initialization phase without relying on SoC-based trigger instructions.

[0102] Specifically, once the embedded multimedia card completes the first initialization phase, it already possesses multitasking capabilities. Thus, while the SoC accesses the boot partition, the embedded multimedia card can begin preparing for the second initialization phase without the SoC actively triggering it, thereby maximizing concurrency and reducing the overall system startup time.

[0103] Furthermore, since the second initialization phase of the eMMC is independent of a portion of the initialization process of the SoC, and the portion of the initialization process of the SoC does not depend on the second initialization phase of the eMMC, at least a portion of the initialization process of the on-chip system and the second initialization phase of the embedded multimedia card are executed in at least partial parallel time.

[0104] In other words, the SoC executes a portion of its initialization process, while the eMMC executes its second initialization phase, both synchronously. By executing the eMMC's second initialization phase in parallel with a portion of the SoC's initialization process, the time consumption caused by sequential waiting in the traditional serial execution method is avoided, thereby effectively reducing the overall startup latency required for the system to enter a usable state from power-on or reset; and without adding additional auxiliary media, the overall startup time can be shortened without increasing costs.

[0105] In some embodiments, the second initialization phase includes one or more of the following: establishing an access mapping for the user data area, loading internal parameters, and entering a data transfer state with higher access performance than the boot partition.

[0106] The user data area access mapping refers to the mapping relationship between the access request initiated by the SoC for the user data area and the corresponding user data area inside the eMMC, so that the access request for the user data area can be correctly identified and executed.

[0107] Internal parameters refer to parameter information used to characterize and control the working characteristics of eMMC, including but not limited to configuration parameters that affect data access methods, data transmission capabilities, or working modes.

[0108] A data transfer state with higher performance than the boot partition access state refers to a working state with higher data transfer capabilities compared to the data transfer state used to access the boot partition, used to support data read and write operations on the user data area.

[0109] In some embodiments, at least a portion of the on-chip initialization process, which is executed in at least partial parallel time with the second initialization phase, consists of steps of the second initialization phase that are independent of the embedded multimedia card.

[0110] "Independent" can be understood as a part of the SoC initialization process not taking the startup state, running state or function provision of the second initialization stage as a prerequisite, that is, two independent and parallel initialization processes.

[0111] Accordingly, at least part of the initialization process includes one or more of the following: loading the startup code, initializing DDR, secure startup signature verification, and data verification.

[0112] As mentioned earlier, the SoC and eMMC communicate via an initialization command sequence to bring the embedded multimedia card into a state where the boot partition is accessible. However, when the SoC determines that the embedded multimedia card has entered a state where the boot partition is accessible based on polling commands, the SoC assumes that the eMMC has already been initialized, and there is a possibility that the SoC may access the user area and / or other areas.

[0113] Therefore, during the second initialization phase, the system-on-chip is prohibited from accessing data to the uninitialized partitions of the embedded multimedia card.

[0114] Specifically, when the eMMC completes the first initialization phase, some areas (e.g., the user area) remain uninitialized. During this phase, the SoC's access to the eMMC's user area is uncertain, which may result in the reading of invalid data, thereby affecting the stability of the SoC's subsequent boot process.

[0115] Therefore, when the eMMC is determined to be in the second initialization phase, data access requests for the uninitialized partitions of the embedded multimedia card are prohibited.

[0116] In some embodiments, the SoC can determine the current initialization process of the eMMC by sending a status query command to the eMMC. By introducing a real-time status-based judgment mechanism during the initialization process, the initialization process is transformed from passive waiting to active control, thereby significantly improving the initialization success rate, system stability, and startup efficiency.

[0117] See Figure 3 The flowchart of a data access request in an embodiment of this disclosure is shown below. Figure 3 As shown, it includes:

[0118] S301, when the on-chip system enters the boot program execution stage indicated by the boot code, the boot code controls the on-chip system to send a status query instruction to the embedded multimedia card. The status query instruction is used to obtain the initialization completion status of other partitions in the embedded multimedia card except for the boot partition.

[0119] In some embodiments, after power-on, the SoC executes the boot code stored in read-only memory. The boot code is used to complete basic hardware initialization, clock configuration, bus configuration, and memory identification of the SoC, and after completing the above basic configuration, it enters the bootloader execution stage, that is, executes its own initialization process.

[0120] At the same time, the SoC can also send status query commands to the eMMC to determine whether other partitions besides the boot partition have completed initialization, providing a basis for subsequent access control.

[0121] In some embodiments, the status query instruction includes one or more of the standard status query instruction and the custom status query instruction.

[0122] The standard status query command can be CMD13. CMD13 is a status query command already defined in the standard. This solution can achieve real-time perception and control of the eMMC initialization status without adding new command types.

[0123] Furthermore, compared to other commands, CMD13 has the characteristics of not changing the running state of eMMC, returning complete information, and being forcibly supported by eMMC, thereby improving the reliability and efficiency of the initialization process while ensuring standard compatibility.

[0124] Custom status query commands can be Vender Commands. By introducing the custom command VenderCommand, the SoC can obtain extended status information reflecting the internal initialization progress of the eMMC and adaptively control the initialization process based on this extended status information. This avoids executing subsequent operations before the eMMC has completed its internal initialization, reducing the probability of initialization failure, minimizing invalid command interactions, and improving initialization efficiency.

[0125] S302, based on the status information returned by the embedded multimedia card, determine whether the other partition has completed initialization and is in an accessible state.

[0126] In some embodiments, after receiving a status query instruction, the eMMC returns the corresponding status information to the SoC. The status information may include the partition status register value, the ready flag, or the initialization completion flag.

[0127] After receiving the status information, the SoC parses and judges the status information to determine whether other partitions have completed initialization and have the ability to provide data access services to the outside world.

[0128] For example, when the corresponding initialization completion flag in the status information is set, it indicates that the other partitions have completed initialization and are in an accessible state; when the corresponding initialization completion flag in the status information is not set, it indicates that the other partitions have not yet completed initialization. If access is made to them at this time, it may result in access failure, data errors or system abnormalities.

[0129] In some embodiments, a preset waiting time threshold or a polling mechanism can be used to query the status information multiple times to further improve the accuracy of the judgment results.

[0130] S303, in response to the fact that the other partition has not been initialized, the driver code in the boot code prevents the on-chip system from performing data access operations on the other partition.

[0131] In some embodiments, when the determination result is that other partitions have not yet completed initialization, the driver code will take access control measures to restrict the on-chip system's access to those other partitions.

[0132] Specifically, the system-on-chip (SoC) can be prevented from performing data access operations on other partitions in one or more of the following ways: blocking read and write commands for other partitions; blocking data access requests sent by the SoC to other partitions; returning a preset error status or exception flag to requests to access the other partitions; preventing the mapping of the other partitions in the address mapping table from taking effect; delaying or suspending access requests for the other partitions until they complete initialization.

[0133] By using the above method, it can be ensured that the on-chip system will not access other partitions unexpectedly before the other partitions have completed initialization, thereby avoiding problems such as data inconsistency, system crashes or boot failures caused by the incomplete internal state of the partitions.

[0134] In this way, by detecting the initialization status of other partitions in the embedded multimedia card, illegal access is avoided when the partitions are not ready, thus improving the stability and reliability of the system startup process.

[0135] In some embodiments, in response to the fact that the other partition has not completed initialization, the initialization status of the other partition continues to be polled by sending the status query instruction.

[0136] Specifically, if it is determined that the eMMC is still in the second initialization phase, it means that the user area is unreadable. At this point, the status query command can be sent continuously to obtain the initialization status of other partitions.

[0137] For example, in the first approach, the SoC can periodically send status query commands to the eMMC according to a preset polling cycle during the polling detection phase in order to continuously obtain the initialization status information of other partitions.

[0138] When the status information indicates that other partitions have not yet completed initialization, the polling operation continues, and the status judgment result is updated in each polling result; when the status information indicates that other partitions have completed initialization, it is determined that other partitions are in an accessible state, and the data access restrictions on other partitions are lifted.

[0139] By introducing a polling mechanism, misjudgments caused by one-time queries can be avoided. This is especially suitable for application scenarios where the initialization time of embedded multimedia cards is uncertain or fluctuates, thereby further improving the accuracy and robustness of the judgment during the system startup phase.

[0140] In the second approach, the duration of the second initialization phase of the embedded multimedia card can be estimated in advance, and the status query command can be sent again after at least that duration to reduce overhead.

[0141] Correspondingly, in response to the other partition completing initialization and becoming accessible, the on-chip system is allowed to perform data access operations on that other partition.

[0142] Specifically, when it is detected that other partitions have completed initialization and are in an accessible state, the access restrictions on other partitions can be lifted, enabling the on-chip system to access other partitions normally.

[0143] In some embodiments, a timeout timer is started at the same time as the status query command is sent for the first time, and the status information returned by the embedded multimedia card is judged during the validity period of the timer.

[0144] If the status information consistently indicates that other partitions have not completed initialization within the preset timeout period, it is determined that the embedded multimedia card has an initialization error or a response error.

[0145] In this situation, an exception handling process can be executed, including but not limited to one or more of the following operations: maintaining access prohibition to other partitions; logging initialization exception information for subsequent debugging or analysis; entering secure boot mode or degraded boot mode; triggering system reset or reinitializing the embedded multimedia card.

[0146] By introducing timeout control and exception handling mechanisms, the system can be effectively prevented from falling into a long-term blocked state due to eMMC exceptions during the startup phase, thereby improving the overall reliability and fault tolerance of the system.

[0147] Correspondingly, during the execution of the second initialization phase, in response to receiving a signal from the system-on-a-chip, the embedded multimedia card replies with all-zero data to the system-on-a-chip, and / or the embedded multimedia card replies with all-zero data to the system-on-a-chip, along with an error flag for the all-zero data, to indicate that the all-zero data is invalid data information.

[0148] Specifically, even if the embedded multimedia card responds to some signals from the on-chip system, the embedded multimedia card replies with all zero data, which will not affect the initialization process of the on-chip system.

[0149] Furthermore, it can also respond with an error flag for all-zero data, which indicates that all-zero data is invalid data information.

[0150] To better understand and illustrate the process of the initialization startup method of the electronic device in the embodiments of this disclosure, an example is provided.

[0151] See Figure 4 The diagram shown illustrates the stages of an initialization startup method for an electronic device according to an embodiment of this disclosure. Figure 4 As shown, in this scheme, the initialization of eMMC is divided into at least two processes, specifically:

[0152] The SoC sends a sequence of commands to the eMMC to initialize at least the Boot1 and Boot2 partitions, which are smaller in size and can significantly reduce the time required compared to a full initialization.

[0153] For example, the command sequence is CMD0..CMD1..CMD1.., where CMD1 is used to determine the initialization state of the two partitions, Boot1 and Boot2, and Figure 4 The CMD1 symbol represents the polling state. There is no limit to the number of CMD1s. It can be understood as sending CMD1s in a polling manner to determine the current state of the eMMC.

[0154] Based on CMD1, when the SoC determines that the eMMC is in the Ready state, it executes a Read Operation through the ROM to read the SPL from Boot1 or Boot2, and the SoC can load the SPL normally.

[0155] During this period, the eMMC can simultaneously perform initialization actions on other partitions (such as the User partition). When the SoC runs to the SPL stage, it uses the Vendor Command / CMD13 to detect the initialization completion status of other partitions. Only after the initialization of other partitions is completed will the driver code in the SPL allow the SoC to access the eMMC.

[0156] For example, when the SoC determines that the eMMC is in the Ready state again based on Vender Command / CMD13, it can read data from any partition by executing a Read Operation.

[0157] This allows the initialization process of other partitions (User partition) within the eMMC to be performed concurrently with the loading of SPL and other time-consuming processes by the SoC, thereby achieving an overall acceleration of system startup.

[0158] It is understood that the above embodiments provide multiple implementation schemes, and these implementation schemes can be combined and cross-referenced with each other without conflict, thereby extending to multiple possible implementation schemes. These can all be considered as the implementation schemes disclosed and made public in this application.

[0159] This disclosure also provides a device corresponding to the initialization and startup method of the above-described electronic device. The following detailed description is provided with reference to the accompanying drawings and specific embodiments.

[0160] See Figure 5 The diagram shown is a structural schematic of an electronic device according to an embodiment of this disclosure, such as... Figure 5 As shown, the electronic device 500 may include: a system-on-a-chip 510, and an embedded multimedia card 520 electrically connected to the system-on-a-chip 510, wherein:

[0161] The system-on-chip 510, in response to a power-on or reset event, controls the embedded multimedia card 520 to perform a first initialization phase, so that the embedded multimedia card 520 enters a state where the boot partition can be accessed, and reads boot code from the boot partition; and performs at least a part of its own initialization process according to the boot code.

[0162] The embedded multimedia card 520 performs a second initialization phase to enter a user data accessible state;

[0163] In this process, at least a portion of the initialization process of the system-on-chip 510 and the second initialization phase of the embedded multimedia card 520 are executed in at least partial parallel time.

[0164] about Figure 5 For more information on the working principles, operating methods, and beneficial effects of the electronic devices shown, please refer to the preceding text and... Figures 1 to 4 The specific details will not be elaborated here.

[0165] This disclosure also provides a chip that stores a computer program, which, when executed by the chip, causes the steps of the initialization startup method of the electronic device described in any of the foregoing embodiments to be executed.

[0166] In some embodiments, the chip may have the same or similar architecture as the electronic device, that is, the chip may include: a system on a chip and an embedded multimedia card, and be able to perform initialization operations in accordance with the initialization startup method of the electronic device in the foregoing example.

[0167] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means.

[0168] While the embodiments disclosed herein are as described above, this disclosure is not limited thereto. Any person skilled in the art can make various alterations and modifications without departing from the spirit and scope of this disclosure; therefore, the scope of protection of this disclosure should be determined by the scope defined in the claims.

Claims

1. An initialization startup method for an electronic device, the electronic device comprising: A system-on-a-chip (SoC) and an embedded multimedia card electrically connected to the SoC, characterized in that the initialization startup method includes: In response to a power-on or reset event, the embedded multimedia card is controlled to perform a first initialization phase, so that the embedded multimedia card enters a state where the boot partition is accessible, and reads the boot code from the boot partition; wherein, the device ready flag in the operation condition register is checked by a polling command to determine that the embedded multimedia card has entered a state where the boot partition is accessible, the first initialization phase includes the initialization of the boot partitions Boot0 and / or Boot1 of the embedded multimedia card, and the boot code includes: a second-stage program loader, or a second-stage program loader and a third-stage program loader; According to the startup code, the on-chip system executes at least a portion of its own initialization process, and the embedded multimedia card executes a second initialization phase to enter a user data accessible state. During the second initialization phase of the embedded multimedia card, the on-chip system is prohibited from accessing data to the uninitialized partitions of the embedded multimedia card. The at least portion of the on-chip system's initialization process and the second initialization phase of the embedded multimedia card are executed in at least partial parallel time, and the at least portion of the on-chip system's initialization process that is executed in at least partial parallel time with the second initialization phase consists of steps that are independent of the second initialization phase of the embedded multimedia card.

2. The initialization startup method according to claim 1, characterized in that, The step of controlling the embedded multimedia card to perform a first initialization phase in response to a power-on or reset event includes: In response to a power-on or reset event, an initialization command sequence is sent to the embedded multimedia card, causing the embedded multimedia card to execute the first initialization phase according to the initialization command sequence.

3. The initialization startup method according to claim 1, characterized in that, During the second initialization phase, prohibiting the on-chip system from accessing data to the uninitialized partitions of the embedded multimedia card includes: When the on-chip system enters the boot program execution stage indicated by the boot code, the boot code controls the on-chip system to send a status query instruction to the embedded multimedia card. The status query instruction is used to obtain the initialization completion status of other partitions in the embedded multimedia card except for the boot partition. Based on the status information returned by the embedded multimedia card, determine whether the other partition has completed initialization and is in an accessible state; In response to the fact that the other partition has not been initialized, the driver code in the boot code prevents the on-chip system from performing data access operations on the other partition.

4. The initialization startup method according to claim 3, characterized in that, In response to the fact that the other partition has not completed initialization, the initialization status of the other partition continues to be polled by sending the status query instruction; and / or, in response to the fact that the other partition has completed initialization and is in an accessible state, the on-chip system is allowed to perform data access operations on the other partition. The status query instruction includes one or more of the standard status query instruction and the custom status query instruction.

5. The initialization startup method according to any one of claims 3 or 4, characterized in that, During the second initialization phase, in response to receiving a signal from the system-on-a-chip, the embedded multimedia card replies with all-zero data to the system-on-a-chip, and / or, the embedded multimedia card replies with all-zero data and an error flag corresponding to the all-zero data to the system-on-a-chip, the error flag indicating that the all-zero data is invalid data information.

6. The initialization startup method according to claim 1, characterized in that, The second initialization phase includes one or more of the following: establishing access mapping for the user data area, loading internal parameters, and entering a data transfer state with higher access performance than the boot partition.

7. The initialization startup method according to claim 6, characterized in that, The initialization process at least part includes one or more of the following: loading the startup code, initializing DDR, secure startup signature verification, and data verification.

8. An electronic device, comprising: A system-on-a-chip (SoC) and an embedded multimedia card electrically connected to the SoC, characterized in that, The system-on-chip, in response to a power-on or reset event, controls the embedded multimedia card to perform a first initialization phase, so that the embedded multimedia card enters a state where the boot partition is accessible and reads boot code from the boot partition; and executes at least a portion of its own initialization process according to the boot code; wherein, the system-on-chip checks the device ready flag in the operation condition register by polling commands to determine that the embedded multimedia card has entered a state where the boot partition is accessible, the first initialization phase includes the initialization of the boot partitions Boot0 and / or Boot1 of the embedded multimedia card, and the boot code includes: a second-stage program loader, or a second-stage program loader and a third-stage program loader; The embedded multimedia card performs a second initialization phase to enter a user data accessible state, and during the execution of the second initialization phase, the on-chip system is prohibited from accessing data to the uninitialized partitions of the embedded multimedia card. Wherein, at least a portion of the initialization process of the on-chip system is executed in at least partial parallel time with the second initialization phase of the embedded multimedia card, and the at least a portion of the initialization process of the on-chip system executed in at least partial parallel time with the second initialization phase are steps of the operation that do not depend on the second initialization phase of the embedded multimedia card.

9. A chip storing a computer program, characterized in that, When the computer program is executed by the chip, the steps of the initialization startup method of the electronic device according to any one of claims 1 to 7 are performed.

Citation Information

Patent Citations

  • Computer readable storage medium and method for starting intelligent terminal operating system from multiple storage medium

    CN112988248A

  • Display device, startup configuration file generation method and startup method

    CN121433740A