A multi-core architecture Boot jump control method, device, equipment and storage medium

By setting the timeout delay holding mode and inter-core verification mechanism in the multi-core system, the problem of some cores not successfully jumping during the Boot jump process is solved, which significantly improves the stability and reliability of the system and ensures the multi-core architecture Boot system normal operation.

CN118210575BActive Publication Date: 2024-11-19CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410379673.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-11-19
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

In a multi-core system, some cores may not be successfully redirected during Boot jump, causing the target program to fail to run normally, affecting the stability and reliability of the system.

Method used

By setting the timeout delay hold mode, the message is monitored to determine the data flash request, the target data and target address to be flashed based on the data flash request information, and inter-core verification is performed to ensure that the system's master core and slave core are received. After going to the boot jump command, jump to the target program synchronously.

Benefits of technology

It effectively prevents some cores from jumping successfully, significantly improves the system's security and operation stability, and ensures the reliability and performance of the multi-core architecture Boot system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118210575B_ABST
    Figure CN118210575B_ABST
Patent Text Reader

Abstract

The present application provides a multi-core architecture Boot jump control method, device, equipment and storage medium, the method comprising: setting a timeout delay holding mode, when the system main core enters the delay holding state, monitoring the message to determine the existence status of the data flushing request, if there is data flushing request information, determining the target data and target address to be flushed, and writing the target data into the target address, when receiving the boot jump instruction, controlling the system main core to send core status check information to each system slave core, and completing the inter-core verification, then reading the target data written into the target address, and guiding the system main core and each system slave core to jump to the target program based on the target data; by performing inter-core verification before the boot jump, it prevents the occurrence of the situation that some cores jump successfully while some cores fail during the boot jump process in the multi-core system, thereby avoiding serious problems such as the program cannot run normally, and improving the security of the system and the stability of operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer system architecture, and in particular to a multi-core architecture Boot jump control method, device, equipment and storage medium. Background Art

[0002] At present, with the continuous development and increasing intelligence of automotive electronic systems, the number of processor cores in automotive electronic control units (ECUs) is also increasing. In order to fully utilize the performance advantages of multi-core processors, the AUTOSAR standard organization has proposed the concept of multi-core architecture and formulated corresponding technical specifications to ensure communication and collaboration between different cores. In a multi-core system, the Boot jump target program is an important technical link. It is responsible for transferring the control right from Boot to the target program at startup. In AUTOSAR, the Boot jump target program technology is mainly used to achieve collaborative work between multi-core processors. Through the Boot jump target program technology, the multi-core processor can be initialized and started in a predetermined order when the system starts, thereby ensuring the stability and reliability of the system. In addition, the Boot jump target program technology can also realize data sharing and communication between multi-core processors, improving the performance and efficiency of the system.

[0003] However, the current AUTOSAR multi-core Boot jump target program technology still has some shortcomings. In the process of Boot jump target program in multi-core system, the main core may enter the target program area as expected, while some slave cores still stay in the Boot area, resulting in serious problems such as the inability to synchronize the multi-core of the target program and the inability to run the program normally. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, the present application provides a multi-core architecture Boot jump control method, device, equipment and storage medium to solve the above-mentioned technical problems.

[0005] The present application provides a multi-core architecture Boot jump control method, the method comprising: setting a timeout delay hold mode so that the system main core enters a delayed hold state after the target system completes initialization, the target system being a multi-core architecture system; when the system main core enters the delayed hold state, monitoring messages to determine the existence of a data flush request; if there is data flush request information, determining the target data and target address to be flushed based on the data flush request information, and writing the target data into the target address; when receiving a boot jump instruction, controlling the system main core to send core status check information to each system slave core, and performing inter-core verification on each system slave core; after each system slave core completes the inter-core verification, reading the target data written into the target address, and guiding the system main core and each system slave core to jump to the target program based on the target data.

[0006] In one embodiment of the present application, the system is initialized, including: obtaining basic configuration parameters and basic hardware functions of the target system; initializing system resources and peripheral device resources of the target system based on the basic configuration parameters and the basic hardware functions, the system resources at least including the system clock, memory management unit configuration, and interrupt controller settings of the microcontroller, and the peripheral device resources at least including communication protocols, memory, and network interfaces; booting code to put the system master core and each system slave core in standby state.

[0007] In one embodiment of the present application, monitoring messages to determine the existence status of a data flush request includes: when the target system is monitored to receive a system message, detecting the category of the system message; if the system message includes a message of a preset instruction category, determining that a data flush request exists; if the system message does not include a preset instruction message, determining that a data flush request does not exist; when the target system is not monitored to receive a message, determining that a data flush request does not exist.

[0008] In one embodiment of the present application, the target data and target address to be flushed are determined based on the data flush request information, and the target data is written into the target address, including: erasing the original data of the target address, and writing the target data into the target address; performing data integrity verification on the target data, and after the verification is passed, generating a data keyword for the target data, and writing the data keyword into the target address.

[0009] In one embodiment of the present application, the target data written in the target address is read, and the system main core and each system slave core are guided to jump to the target program based on the target data, including: reading the data keyword, obtaining the corresponding target data according to the data keyword, and determining the target program based on the target data; verifying the validity of the target program, and if the verification passes, guiding the system to enter the target program.

[0010] In one embodiment of the present application, the control system master core sends core status check information to each system slave core, and performs inter-core verification on each system slave core, including: sending core status check information to each system slave core to trigger each system slave core to send synchronization status information to the system master core; receiving synchronization status information sent by each system slave core to determine the current synchronization status of each system slave core; if the current synchronization status of any system slave core is different from that of the system master core, re-sending synchronization status information to all system slave cores; triggering each system slave core to send updated synchronization status information to the system master core until the current synchronization status of all system slave cores is consistent with the current synchronization status of the system master core; sending inter-core verification status information to each system slave core to perform inter-core verification on each status slave core.

[0011] In one embodiment of the present application, the method also includes: if there is no data flush request information, controlling the main core of the control system to exit the delayed hold state; determining the target program based on the historical data of the target system, and guiding the system to enter the target program after the system slave core completes the inter-core verification.

[0012] In one embodiment of the present application, before the control system main core sends core status check information to each system slave core, it also includes: clearing the configuration parameters of the target system, shutting down the basic hardware functions of the target system, and releasing the currently occupied resources of the target system to deinitialize the target system.

[0013] The present application provides a multi-core architecture Boot jump control device, the device comprising: a task and state management module, used to set a timeout delay hold mode, so that the system main core enters a delay hold state after the target system completes initialization, the target system is a multi-core architecture system; when the system main core enters the delay hold state, monitoring messages to determine the existence of a data write request; a write module, used to determine the target data and target address to be written based on the data write request information when there is data write request information, and write the target data into the target address; an inter-core synchronization module, used to control the system main core to send core status check information to each system slave core when a boot jump instruction is received , and perform inter-core verification on each system slave core; a jump module, which is used to read the target data written in the target address after each system slave core completes the inter-core verification, and guide the system main core and each system slave core to jump to the target program based on the target data; an initialization module, which is used to obtain the basic configuration parameters and basic hardware functions of the target system, and initialize the system resources and peripheral device resources of the target system based on the basic configuration parameters and the basic hardware functions; a deinitialization module, which is used to clear the configuration parameters of the target system, turn off the basic hardware functions of the target system, and release the currently occupied resources of the target system to deinitialize the target system.

[0014] The present application provides a multi-core architecture Boot jump control system, the system includes a boot system and a target program system, the boot system includes a master core and at least one slave core, wherein the master core is configured with an initialization module, a task and status management module, a flashing module, a deinitialization module, an inter-core synchronization module, and a jump module; the slave core is configured with an inter-core synchronization module and a jump module; the target program system is configured with a target code to guide the master core and each slave core to enter the target program code corresponding to each core after realizing the boot jump based on the jump module.

[0015] The present application provides an electronic device, characterized in that it includes a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the multi-core architecture Boot jump control method as described above.

[0016] The present application provides a computer-readable storage medium, characterized in that a computer program is stored thereon, and the computer program is used to enable a computer to execute the multi-core architecture Boot jump control method as described above.

[0017] Beneficial effects of the present application: The multi-core architecture Boot jump control method, device, equipment and storage medium in the present application, by implementing a strict inter-core verification mechanism before the Boot jump, effectively prevents the situation in which some cores of the multi-core system successfully jump while some cores fail to jump during the Boot jump process. This optimization measure significantly reduces the probability of serious problems such as the failure of the program to run normally, thereby significantly improving the security of the system and the stability of operation. And through this technical improvement, it also provides a more reliable and robust guarantee for the Boot system of the multi-core architecture.

[0018] In addition, the multi-core architecture Boot jump control method, device, equipment and storage medium proposed in this application also proposes to set a timeout delay hold mode. By introducing the timeout delay hold mode, a robust mechanism is provided for the target system, enabling the system to perform detailed detection and analysis of received message information in this mode. This design ensures that the system can strictly comply with the timing requirements when processing messages and effectively maintain the stability and reliability of task scheduling. By optimizing this function, the overall performance and robustness of the system are further improved.

[0019] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0021] Figure 1 is a flowchart of a multi-core architecture Boot jump control method shown in an exemplary embodiment of the present application;

[0022] Figure 2 It is a framework diagram of a multi-core architecture Boot jump control system shown in an exemplary embodiment of the present application;

[0023] FIG3( a ) is a timing diagram of a multi-core architecture Boot jump Boot system shown in an exemplary embodiment of the present application;

[0024] FIG3( b ) is a timing diagram of a multi-core architecture Boot jump Boot system shown in an exemplary embodiment of the present application;

[0025] Figure 4 It is a block diagram of a multi-core architecture Boot jump control device shown in an exemplary embodiment of the present application;

[0026] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0027] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.

[0028] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0029] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.

[0030] First of all, it needs to be explained that AUTOSAR, the full name of which is AUTomotive Open System Architecture, is the automotive open system architecture.

[0031] CAN message, or Controller Area Network message, is a communication protocol widely used in automotive engineering. It is mainly used for communication between various devices inside the car, and has the characteristics of high real-time performance, strong anti-interference ability, and long transmission distance. Eth message, or Ethernet message, is a communication protocol message based on Ethernet technology. Ethernet is a communication technology widely used in local area networks (LANs), which supports multiple transmission media and high-speed data transmission. Eth messages follow the Ethernet protocol, including IP messages, TCP messages, UDP messages, etc., and are used to realize data transmission and communication between network devices. Among them, CAN messages are mainly used for communication between internal devices in cars, while Eth messages are more used for data transmission between network devices.

[0032] UDS, or Unified Diagnostic Services, is a standardized communication protocol used to diagnose vehicle systems in the automotive industry.

[0033] like Figure 1 As shown, in an exemplary embodiment, the multi-core architecture Boot jump control method includes at least steps S110 to S150, which are described in detail as follows:

[0034] Step S110, setting a timeout delay holding mode so that the system main core enters a delay holding state after the target system completes initialization, and the target system is a multi-core architecture system.

[0035] In one embodiment of the present application, the system is initialized, including: obtaining basic configuration parameters and basic hardware functions of the target system; initializing system resources and peripheral device resources of the target system based on the basic configuration parameters and basic hardware functions, the system resources at least including the system clock, memory management unit configuration, and interrupt controller settings of the microcontroller, and the peripheral device resources at least including communication protocols, memory, and network interfaces; starting code to put the system master core and each system slave core in standby state.

[0036] In one embodiment of the present application, the hardware manual and technical documentation of the target system are first read to understand the overall architecture, hardware configuration and functional characteristics of the system, and the target system is connected and communicated with the debugging tool through the serial port, JTAG interface or other debugging interface; then the debugging tool is used to send instructions to the target system to obtain its basic configuration parameters, such as clock frequency, memory size, peripheral interface type, etc., and query the hardware registers of the target system or read related configuration information to obtain the status and configuration of basic hardware functions; then, according to the obtained clock frequency configuration, the system clock of the MCU is initialized to ensure that the clock source is correct and stable, and according to the memory size configuration, the MMU (memory management unit) is initialized to set the memory protection area and access rights, As well as initializing the interrupt controller, configuring the interrupt vector table, and enabling the necessary interrupt service routines; in addition, it also configures SPI communication parameters such as baud rate, data bit, stop bit, and starts the SPI communication function, reads the initial state of the EEPROM, sets access permissions and data storage format, configures CAN communication parameters such as baud rate, working mode, etc., joins the CAN network, erases old data in the Flash, prepares to write new program code or data, and configures network parameters such as IP address, subnet mask, etc., and starts the network interface to achieve communication with the external network; finally, after the initialization is completed, perform self-check and test of system resources to ensure that all resources are working properly, providing a stable hardware foundation for subsequent task scheduling and data processing.

[0037] It should be noted that the system resources and peripheral device resources mentioned in the above embodiments are only for illustrative purposes and do not impose any restrictions on the actual system resources and peripheral device resources of the present application. In addition, through the above steps, the basic configuration parameters and basic hardware functions of the target system are successfully obtained, and the system resources and peripheral device resources are initialized based on this information, providing specific implementation methods and steps for the startup and initialization process of the embedded system with a multi-core architecture, ensuring the stability and reliability of the system.

[0038] Step S120, when the system main core enters the delayed holding state, the message is monitored to determine the existence status of the data flushing request.

[0039] In one embodiment of the present application, monitoring messages to determine the existence status of a data flush request includes: when monitoring that the target system has received a system message, detecting the category of the system message; if the system message includes a message of a preset instruction category, determining that a data flush request exists; if the system message does not include a preset instruction message, determining that no data flush request exists; when the target system has not been monitored to have received a message, determining that no data flush request exists.

[0040] In a specific embodiment of the present application, the system continuously monitors whether the target system receives the system message by monitoring the communication interface such as serial port, SPI, CAN, etc. Once there is data flowing in, it is deemed that the system message is received; when the target system is monitored to receive the system message, the message is parsed to identify its category. When it is detected that the system message contains a message of a preset instruction category, the system determines that there is a data flush request. If the system message does not include the preset instruction message: that is, the message content does not match the preset data flush instruction, the system determines that there is no data flush request; in addition, when the system does not monitor the target system to receive any message within a certain period of time, it is directly determined that there is no data flush request. It should be noted that the category of the system message is usually distinguished according to the message header or specific field, such as by message ID, instruction code, etc.; and the preset instruction category refers to a pre-defined instruction set for representing a data flush request,

[0041] In a specific embodiment of the present application, taking the preset instruction message as a UDS message as an example, when the system is in a delayed hold state, the sending and receiving of CAN and Eth messages is continuously monitored to determine whether the UDS message 0x02 0x3E0x80 session is received to maintain online service, and based on the monitoring result, it is determined whether there is a request for data flushing. That is, if the monitoring result is that the UDS message 0x02 0x3E 0x80 is received, the session is maintained in an online service state, and it is determined that there is a data flushing request, so that the system jumps to the flushing module.

[0042] Step S130: If there is data writing request information, the target data and the target address to be written are determined based on the data writing request information, and the target data is written into the target address.

[0043] In one embodiment of the present application, the target data and target address to be flushed are determined based on the data flush request information, and the target data is written into the target address, including: erasing the original data of the target address, and writing the target data into the target address; performing data integrity verification on the target data, and after the verification is passed, generating a data keyword for the target data, and writing the data keyword into the target address.

[0044] In a specific embodiment of the present application, the target address of the data to be erased is first determined by memory mapping or address pointer, and the original data of the target address is erased using an appropriate erase command or function; then the target data to be written is written to the previously erased target address using a write command or function; and after writing the data, the data integrity is verified by comparing the data before and after writing, calculating the checksum, or using other data verification algorithms. If the verification passes, it means that the data has been successfully written and intact, then a unique data keyword is generated based on the content of the target data. The keyword can be a hash value, summary, or other identifier that can uniquely identify the data, and the generated data keyword is written to the target address, usually at the end of the data or a specific location; if the verification fails, it means that an error may have occurred during the writing process, and the erase and write operations need to be performed again. In addition, it should be noted that the target data can be program code, configuration files, or any other data that needs to be stored, and the present application does not specifically limit the category of its data.

[0045] It should be noted that the method of this embodiment can realize reliable update and verification of target address data. In addition, the steps of erasing original data, writing new data, verifying data integrity, and generating data keywords are interconnected to ensure the correctness and security of data, which has important application value in embedded systems, data storage, and other scenarios where data needs to be updated frequently.

[0046] In a specific embodiment of the present application, after the Boot system enters the flash module according to the flash request, it is confirmed by detection that the module receives the UDS message instruction (preset category instruction) and the App code data (target data). Therefore, it is necessary to perform the operations such as erasing, reading and writing of Flash based on the aforementioned instructions and target data to complete the data flash and update the App code. After the data transmission is completed, the AES128 or CRC32 algorithm is used based on the received data to perform data integrity verification. After the verification is successful, the App code startup keyword (such as: 0xA55A) is written to the Flash address. In addition, the flash module proposed in this embodiment can be composed of AUTOSAR standard components MCAL (hardware abstraction), CanIf (CAN interface), EthIf (Ethernet interface), TcpIP (Transmission Control Network Protocol), Soad (socket adaptation), DoIP (Ethernet diagnosis), CanTp (CAN transport layer), PduR (Pdu routing), Dcm (diagnostic management) and other modules. It should be noted that the above-mentioned flash module components are only used as an exemplary description and do not impose any restrictions on the specific components of the flash module of the present application.

[0047] In one embodiment of the present application, before the control system main core sends core status check information to each system slave core, it also includes: clearing the configuration parameters of the target system, shutting down the basic hardware functions of the target system, and releasing the currently occupied resources of the target system to deinitialize the target system.

[0048] In a specific embodiment of the present application, first, it is usually involved in accessing the configuration parameter storage area of ​​the target system by reading a configuration file, accessing a register or calling a related API, and performing operations such as deleting the configuration file, setting the register value to the default value or calling a special clearing function to clear or reset the configuration parameters to their default state; then identifying the basic hardware functions of the target system such as the clock system, peripheral interface, interrupt controller, etc., and performing operations such as disabling the clock signal, turning off the power of the peripheral interface, disabling the interrupt, etc. to turn off the hardware functions; finally, checking the currently occupied resources of the target system including memory, CPU time slice, and peripheral channel, and performing operations such as releasing memory blocks, stopping the process or task occupying the CPU time slice, and closing the peripheral channel to release its currently occupied resources. It should be noted that in the process of clearing the configuration parameters of the target system, in order to avoid the residual configuration from affecting subsequent operations, it is necessary to ensure that the clearing operation is thorough and irreversible; in the process of shutting down the basic hardware functions of the target system, it is necessary to avoid damage to the hardware or potential security risks; and in the process of releasing the currently occupied resources of the target system, it is necessary to ensure that the resources are released completely and without omission to avoid resource leakage or conflict.

[0049] It should be noted that the method of this embodiment can effectively deinitialize the target system, clearing configuration parameters, shutting down basic hardware functions, and releasing occupied resources, thus providing a clean and safe environment for subsequent system reset, upgrade, or other operations.

[0050] In a specific embodiment of the present application, before the system main core sends core status check information to each system slave core, the system turns off system interrupts, turns off the Gpt timer counter, and initializes SPI, EEPROM, CAN, Flash, Eth and other peripherals to prepare for the next stage of the system.

[0051] Step S140, when receiving the boot jump instruction, the control system master core sends core status check information to each system slave core, and performs inter-core check on each system slave core.

[0052] In one embodiment of the present application, a control system master core sends core status check information to each system slave core, and performs inter-core verification on each system slave core, including: sending core status check information to each system slave core to trigger each system slave core to send synchronization status information to the system master core; receiving synchronization status information sent by each system slave core to determine the current synchronization status of each system slave core; if the current synchronization status of any system slave core is different from that of the system master core, re-sending synchronization status information to all system slave cores; triggering each system slave core to send updated synchronization status information to the system master core until the current synchronization status of all system slave cores is consistent with the current synchronization status of the system master core; sending inter-core verification status information to each system slave core to perform inter-core verification on each state slave core.

[0053] In a specific embodiment of the present application, the master core sends core status check information to each system slave core, and performs inter-core check on each system slave core, which is divided into the following steps:

[0054] Step 1: Send core status check information. The system master core sends core status check information to each system slave core. The information includes the current synchronization status of the master core and a check request. The sending method can be broadcast or point-to-point communication, depending on the communication architecture and protocol of the system.

[0055] Step 2: Receive and process synchronization status information. After receiving the core status check information, each system slave core sends its own synchronization status information to the system master core. The system master core receives the synchronization status information sent by each slave core, parses and compares it; if it is found that the current synchronization status of any slave core is different from that of the system master core, the identifiers of these slave cores are recorded and the synchronization status information is prepared to be resent.

[0056] Step three, resending and updating the synchronization status information. If there are slave cores with inconsistent synchronization status, the system master core resends the synchronization status information to all system slave cores. This information usually includes the current synchronization status of the system master core and instructions for slave core updates; after each system slave core receives the update instruction, it updates its own status according to the synchronization status of the system master core, and resends the updated synchronization status information to the system master core. It should be noted that this process may require multiple iterations until the current synchronization status of all system slave cores is consistent with the current synchronization status of the system master core.

[0057] Step 4: Sending and verifying inter-core verification status information. When the synchronization status of all system slave cores is consistent with the system master core, the system master core sends inter-core verification status information to each system slave core. This information contains specific data or instructions for verification to ensure the accuracy of the status information of each slave core; each system slave core performs the verification operation and returns the verification result to the system master core; the system master core receives and verifies the verification results of each slave core to ensure that the status of all slave cores is correct and consistent.

[0058] It should be noted that through the method of this embodiment, the system master core can effectively verify and update the synchronization status with each system slave core, which helps to ensure the consistency and stability of the multi-core system and improve the overall performance and reliability of the system. At the same time, through inter-core verification, the accuracy of each state of the slave core can be further ensured, reducing potential errors and failures.

[0059] In another embodiment of the present application, if there is no data flush request information, the control system main core exits the delayed hold state; determines the target program based on the historical data of the target system, and guides the system into the target program after the system slave core completes the inter-core verification.

[0060] In a specific embodiment of the present application, the system main core continuously monitors the data by checking the receiving buffer, interrupt signal or specific status flag to monitor whether there is data flush request information; if there is no data flush request, the system main core exits the current delay hold state; then, the system main core determines the target program to be executed based on the target system's previous operation records, user preferences, system performance data and other historical data, and selects the target program that best suits the current system status and needs by analyzing these historical data; then, after ensuring that all system slave cores have completed the inter-core verification, the entire system will be guided into the determined target program. It should be noted that during the boot process, the system main core must also ensure coordination with other slave cores to ensure the correct execution of the program.

[0061] It should be noted that, through the method of this embodiment, when there is no data flush request, the system main core can correctly exit the delayed hold state and select an appropriate target program based on historical data. At the same time, the consistency of each slave core is ensured through inter-core verification, providing a guarantee for the correct execution of the program.

[0062] Step S150 , after each system slave core completes the inter-core verification, it reads the target data written in the target address, and guides the system master core and each system slave core to jump to the target program based on the target data.

[0063] In one embodiment of the present application, the target data written in the target address is read, and the system main core and each system slave core are guided to jump to the target program based on the target data, including: reading a data keyword, obtaining corresponding target data according to the data keyword, and determining the target program based on the target data; verifying the validity of the target program, and if the verification passes, guiding the system into the target program.

[0064] In a specific embodiment of the present application, the system first reads the input data keyword, and searches the system database or data warehouse according to the read data keyword to obtain the target data corresponding to the keyword; then further determines the target program to be executed according to the content or attribute of the data; then, before executing the target program, the validity of the target program is verified by checking the integrity, logical correctness and compatibility with the current system environment of the program, and the system is guided into the target program after the verification. It should be noted that the above-mentioned target data may be a record, a data set or other forms of information, and the present application does not impose any restrictions on the category or amount of its target data. In addition, when guiding the system into the target program, it should ensure coordination with other modules or systems to ensure the correct execution of the program.

[0065] It should also be noted that through the method of this embodiment, the system can accurately obtain the corresponding target data according to the data keywords, and determine and execute effective target programs based on these data, which helps to improve the flexibility and adaptability of the system while ensuring the stability and security of the system.

[0066] Figure 2 It is a framework diagram of a multi-core architecture Boot jump control system shown in an exemplary embodiment of the present application.

[0067] In one embodiment of the present application, the present application provides a multi-core architecture Boot jump control system, which includes a boot system and a target program system, and the boot system includes a master core and at least one slave core, wherein the master core is configured with an initialization module, a task and status management module, a flash module, a deinitialization module, an inter-core synchronization module, and a jump module; the slave core is configured with an inter-core synchronization module and a jump module; the target program system is configured with a target code to guide the master core and each slave core to enter the target program code corresponding to each core after realizing the boot jump based on the jump module.

[0068] In a specific embodiment of the present application, Figure 2 As shown in the figure, the multi-core architecture Boot jump control system is divided into a boot system and a target program system. Taking 4 communication cores as an example, core 1 is regarded as the master core, and cores 2, 3, and 4 are regarded as slave cores. Among them, the master core is configured with an initialization module, a task and state management module, a flashing module, a deinitialization module, an inter-core synchronization module, and a jump module, while cores 2, 3, and 4 only include an inter-core synchronization module and a jump module. After the inter-core synchronization is completed, cores 1, 2, 3, and 4 are respectively guided to the target program code through the jump module to realize the multi-core architecture Boot jump.

[0069] FIG3( a ) is a timing diagram of a multi-core architecture Boot jump to Boot system shown in an exemplary embodiment of the present application; FIG3( b ) is a timing diagram of a multi-core architecture Boot jump to Boot system shown in an exemplary embodiment of the present application.

[0070] In one embodiment of the present application, taking the target program as an app system as an example, as shown in FIG. 3(a) and FIG. 3(b), the whole process of jumping the multi-core architecture Boot to the app system can be divided into the following steps:

[0071] Step 1: When the system starts each core in Boot, it executes the startup code step by step. First, it initializes the internal crystal oscillator, timer and other hardware resources, then turns off the watchdog timer, clears the RAM space, and prepares the system resources to enter the main function execution.

[0072] Step 2: After entering the initialization module, the multi-core architecture system initializes the MCU system clock, Port interface, Gpt timer and other modules, and initializes peripheral devices such as SPI, EEPROM, CAN, Flash, Eth and other modules to ensure that all parts of the system can operate normally. Its system resources include but are not limited to the clock system of the microcontroller (MCU), the memory space occupied by the memory management unit (MMU), and the interrupt vector used by the interrupt controller. This application does not impose any restrictions on the specific content of its peripheral devices and system resources.

[0073] Step 3: After entering the task and status management module, the task and status management module is responsible for the scheduling of system tasks and the management of status. It provides 5ms and 10ms task cycle scheduling for the Boot system, and sets a 50ms timeout delay to maintain the status to ensure the system timing, stability and reliability of task scheduling.

[0074] Step 4: In the delay hold state, the Boot system monitors the sending and receiving of CAN and Eth messages to detect whether the UDS message 0x02 0x3E 0x80 session hold online service is received, and judges whether there is a data flash request. If there is a request, the system will enter the data flash module, otherwise it will enter step 8.

[0075] Step 5: After receiving the UDS session hold message, it is determined as a data flush request, and the delayed hold state is reset based on the UDS to prevent the delayed hold state from timing out and the data flush process from being terminated.

[0076] Step 6: The Boot system enters the flashing module according to the flashing request. The module consists of AUTOSAR standard components MCAL (hardware abstraction), CanIf (CAN interface), EthIf (Ethernet interface), TcpIP (Transmission Control Network Protocol), Soad (socket adapter), DoIP (Ethernet diagnostics), CanTp (CAN transport layer), PduR (Pdu routing), Dcm (diagnostic management) and other modules. This module receives UDS message instructions and App code data, performs Flash erase, read and write operations, and completes data flashing and App code updates. After the data transmission is completed, the AES128 or CRC32 algorithm is used based on the received data to perform data integrity verification, and after the verification is successful, the App code startup keyword (such as: 0xA55A) is written to the Flash address.

[0077] Step 7: After the data flashing is completed, exit the flashing mode and disconnect the external diagnostic instrument.

[0078] Step 8: Detect the current holding time of the delayed holding state. If the current holding time of the delayed holding state times out, exit the delayed holding state.

[0079] Step 9: Enter the deinitialization module, the system turns off the system interrupt, turns off the Gpt timer counter, and deinitializes SPI, EEPROM, CAN, Flash, Eth and other peripherals to prepare for the next stage of the system.

[0080] Step 10: Each core enters the inter-core synchronization module and prepares to start the synchronization operation. Core 1 starts to wait for the synchronization status of cores 2, 3, and 4 to ensure that all cores are ready. Then, cores 2, 3, and 4 enter the inter-core synchronization module one after another and set their own synchronization status to Core_2_Sync, Core_3_Sync, and Core_4_Sync respectively. Subsequently, they pass their respective status information to core 1 through inter-core communication to ensure that the status synchronization between all cores is complete.

[0081] Step 11: Core 1 determines whether each slave core has completed inter-core synchronization based on the synchronization status of each core. After all slave cores have completed inter-core synchronization, the inter-core verification status is transmitted to cores 2, 3, and 4 through inter-core communication.

[0082] Step 12: After completing the inter-core synchronization check, core 1 enters the jump module. After receiving the inter-core verification status, cores 2, 3, and 4 complete the inter-core synchronization and enter the jump module. Each core enters the jump module to read the App code startup keyword (such as 0xA55A) written by the flash module, complete the App validity check, and guide the system into the App code area to complete the boot process of the multi-core architecture Boot jump App.

[0083] It should be noted that the multi-core architecture Boot jump control method proposed in this application realizes the multi-core architecture Boot jump app system, and by cleverly introducing the inter-core synchronization module, the data synchronization and communication capabilities between the multiple cores are significantly enhanced, thereby greatly improving the overall performance and efficiency of the system. In addition, it also effectively avoids the abnormal operation of each core that may occur in the process of jumping from Boot to App in a multi-core system, ensuring that the App can achieve seamless synchronization in a multi-core environment, and the program runs stably and without worries, which not only significantly improves the reliability of the system, but also greatly enhances the security of the system, providing a solid guarantee for the stable operation of the App code.

[0084] Figure 4 is a block diagram of a multi-core architecture Boot jump control device shown in an exemplary embodiment of the present application. The device can be applied to Figure 1 The device may also be applicable to other exemplary implementation environments and specifically configured in other devices, and this embodiment does not limit the implementation environment to which the device is applicable.

[0085] like Figure 4 As shown, the exemplary multi-core architecture Boot jump control device includes: an initialization module 410, a task and state management module 420, a flash module 430, a deinitialization module 440, an inter-core synchronization module 450, and a jump module 460.

[0086] The initialization module 410 is used to obtain the basic configuration parameters and basic hardware functions of the target system, and initialize the system resources and peripheral device resources of the target system based on the basic configuration parameters and basic hardware functions; the task and status management module 420 is used to set the timeout delay hold mode so that the system main core enters the delay hold state after the target system completes the initialization, and the target system is a multi-core architecture system; when the system main core enters the delay hold state, the message is monitored to determine the existence status of the data flush request; the flush module 430 is used to determine the target data to be flushed and the target device resources based on the data flush request information when there is data flush request information The target address is determined by the system logic module 410, and the target data is written into the target address; the deinitialization module 440 is used to clear the configuration parameters of the target system, shut down the basic hardware functions of the target system, and release the currently occupied resources of the target system to deinitialize the target system; the inter-core synchronization module 450 is used to control the system main core to send core status check information to each system slave core when a boot jump instruction is received, and to perform inter-core verification on each system slave core; the jump module 460 is used to read the target data written into the target address after each system slave core completes the inter-core verification, and guide the system main core and each system slave core to jump to the target program based on the target data.

[0087] It should be noted that the multi-core architecture Boot jump control device provided in the above embodiment and the multi-core architecture Boot jump control method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In actual application, the multi-core architecture Boot jump control device provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.

[0088] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the multi-core architecture Boot jump control method provided in the above-mentioned embodiments.

[0089] Figure 5 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 5 The computer system 500 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0090] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method described in the above embodiment. In the RAM 503, various programs and data required for system operation are also stored. The CPU 501, the ROM 502 and the RAM 503 are connected to each other through the bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.

[0091] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.

[0092] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present application are executed.

[0093] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0094] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0095] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0096] Another aspect of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the multi-core architecture Boot jump control method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.

[0097] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the multi-core architecture Boot jump control method provided in each of the above embodiments.

[0098] The above embodiments are merely illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A multi-core architecture Boot jump control method, It is characterized in that The method comprises: Setting a timeout delay hold mode so that the system main core enters a delay hold state after the target system completes initialization, wherein the target system is a multi-core architecture system; When the system main core enters the delayed holding state, it monitors the message to determine the existence status of the data flushing request; If there is data writing request information, determining the target data and the target address to be written based on the data writing request information, and writing the target data into the target address; When receiving the boot jump instruction, the control system master core sends core status check information to each system slave core and performs inter-core check on each system slave core; After each system slave core completes the inter-core verification, it reads the target data written in the target address, and guides the system master core and each system slave core to jump to the target program based on the target data.

2. The multi-core architecture Boot jump control method according to claim 1, It is characterized in that Initialize the system, including: Obtaining basic configuration parameters and basic hardware functions of the target system; Initializing the system resources and peripheral device resources of the target system based on the basic configuration parameters and the basic hardware functions, the system resources at least including a system clock, a memory management unit configuration, and an interrupt controller setting of a microcontroller, and the peripheral device resources at least including a communication protocol, a memory, and a network interface; The startup code puts the system master core and each system slave core into a standby state.

3. The multi-core architecture Boot jump control method according to claim 1, It is characterized in that Monitor messages to determine the existence of data flush requests, including: When it is monitored that the target system receives a system message, detecting the type of the system message; If the system message includes a message of a preset instruction category, it is determined that there is a data flushing request; if the system message does not include a preset instruction message, it is determined that there is no data flushing request; When it is not detected that the target system receives the message, it is determined that there is no data flushing request.

4. The multi-core architecture Boot jump control method according to claim 1, It is characterized in that Determining target data and a target address to be written based on the data writing request information, and writing the target data into the target address, includes: Erasing original data at the target address and writing the target data into the target address; The target data is verified for data integrity, and after the verification is passed, a data keyword for the target data is generated, and the data keyword is written into the target address.

5. The multi-core architecture Boot jump control method according to claim 4, It is characterized in that Reading the target data written in the target address, and guiding the system main core and each system slave core to jump to the target program based on the target data, including: Reading the data keyword, obtaining corresponding target data according to the data keyword, and determining a target program based on the target data; Verify the validity of the target program, and if the verification passes, guide the system to enter the target program.

6. The multi-core architecture Boot jump control method according to claim 1, It is characterized in that The control system master core sends core status verification information to each system slave core and performs inter-core verification on each system slave core, including: Sending core status check information to each system slave core to trigger each system slave core to send synchronization status information to the system master core; Receiving synchronization status information sent by each system slave core to determine the current synchronization status of each system slave core; If the current synchronization state of any system slave core is different from that of the system master core, resend the synchronization state information to all system slave cores; Triggering each system slave core to send updated synchronization status information to the system master core until the current synchronization status of all system slave cores is consistent with the current synchronization status of the system master core; The inter-core verification status information is sent to each system slave core to perform inter-core verification on each status slave core.

7. The multi-core architecture Boot jump control method according to claim 1, It is characterized in that The method further comprises: If there is no data flush request information, the control system main core exits the delayed hold state; A target program is determined based on the historical data of the target system, and after the system slave core completes the inter-core verification, the system is guided to enter the target program.

8. A multi-core architecture Boot jump control device, It is characterized in that The device comprises: The task and state management module is used to set a timeout delay holding mode so that the system main core enters a delay holding state after the target system completes initialization, and the target system is a multi-core architecture system; when the system main core enters the delay holding state, the message is monitored to determine the existence status of the data flushing request; A flash writing module, configured to determine target data and a target address to be flashed based on the data flash writing request information when there is data flash writing request information, and write the target data into the target address; The inter-core synchronization module is used to control the control system master core to send core status check information to each system slave core when receiving the boot jump instruction, and perform inter-core check on each system slave core; A jump module, used for reading the target data written in the target address after each system slave core completes the inter-core verification, and guiding the system master core and each system slave core to jump to the target program based on the target data; An initialization module, used to obtain basic configuration parameters and basic hardware functions of the target system, and initialize system resources and peripheral device resources of the target system based on the basic configuration parameters and the basic hardware functions; The deinitialization module is used to clear the configuration parameters of the target system, shut down the basic hardware functions of the target system, and release the currently occupied resources of the target system to deinitialize the target system.

9. A multi-core architecture Boot jump control system, It is characterized in that The multi-core architecture Boot jump control system includes a boot system and a target program system. The boot system comprises the multi-core architecture Boot jump control device as claimed in claim 8, wherein the boot system is divided into a master core and at least one slave core, wherein the master core is configured with an initialization module, a task and status management module, a flashing module, a deinitialization module, an inter-core synchronization module, and a jump module; and the slave core is configured with an inter-core synchronization module and a jump module; The target program system is configured with target codes to guide the master core and each slave core to enter the target program codes corresponding to each core after the boot jump is implemented based on the jump module.

10. An electronic device, It is characterized in that It includes a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute the computer program stored in the memory to implement the multi-core architecture Boot jump control method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method for rapidly starting BOOT based on ARM chip

    CN108897576A

  • Micro-system architecture based on non-shared storage multi-core processor

    CN113672549A

  • Method for Executing One or More Programs on a Multi-Core Processor and Many-Core Processor

    US20100180101A1

  • Current prediction-based instruction throttling control

    US20230062546A1