Firmware starting method based on multi-core technology

By dividing parallel subtasks and introducing intelligent scheduling modules in the UEFI startup process, the problem of inefficiency in the multi-core CPU environment is solved, and faster startup time and higher resource utilization efficiency are achieved.

CN119883554AActive Publication Date: 2025-04-25BEIJING SHENZHOU AEROSPACE SOFTWARE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411950768.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The existing UEFI startup process fails to fully utilize parallel processing capabilities in a multi-core CPU environment, resulting in long startup time and inefficient efficiency.

Method used

After the SEC phase is completed, the initialization task is divided into multiple parallel subtasks, and a lightweight parallel task scheduler is introduced to dynamically allocate and schedule parallel tasks, and execute them simultaneously using multi-core CPUs. At the same time, a computing resource monitoring module and an intelligent scheduling module were introduced to optimize the startup strategy through machine learning algorithms.

Benefits of technology

By performing initialization tasks and dynamic scheduling in parallel, the system startup time is significantly shortened, the startup efficiency is improved, and it has good adaptability to adapt to changes in hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883554A_ABST
    Figure CN119883554A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware starting method based on a multi-core technology, and the method comprises the steps: dividing an initialization task into a plurality of parallel subtasks after an SEC stage is completed; and dynamically distributing and scheduling parallel subtasks. By redesigning the starting process, the steps which can be executed in parallel can be operated at the same time in the multi-core environment, and the intelligent scheduling module and the resource monitoring module are introduced, so that the system starting time is greatly shortened, the starting efficiency is improved, and meanwhile, it is ensured that the starting strategy has good adaptivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unified extensible firmware interface, and in particular to a firmware startup method based on multi-core technology. Background Art

[0002] Currently, UEFI (Unified Extensible Firmware Interface) is the mainstream hardware boot method. Although it provides a relatively complete boot process and functions, its serial execution boot steps fail to fully utilize the multi-core parallel processing capabilities of modern hardware as multi-core CPUs become increasingly popular. This leads to unnecessary time delays in the boot process, affecting the overall efficiency of system boot and user experience.

[0003] The existing UEFI boot process consists of six main steps:

[0004] SEC: Mainly responsible for initializing the CPU and some basic hardware resources, such as the memory controller. It also sets up a temporary stack and loads the initial code for the next stage (PEI);

[0005] PEI: Responsible for initializing the basic hardware resources of the system, including setting up RAM and making it available for subsequent stages. This stage also includes initializing necessary peripherals, such as USB controllers, to enable access to additional storage devices, and then handing control over to DXE.

[0006] DXE: Initializes DXE basic services, schedules execution of DXE drivers, and then passes control to BDS.

[0007] BDS: Executes startup policies, initializes console devices, loads necessary device drivers, and loads and executes startup items.

[0008] TSL: Executed by the operating system loader, system resources are still controlled by the UEFI kernel until the RT phase is entered after calling ExitBootServices.

[0009] RT: The control of the system is transferred from the UEFI kernel to the OS loader. The various resources occupied by UEFI are recycled to the OS loader. Only the UEFI runtime services are reserved for the OS loader and OS.

[0010] The main disadvantage of the existing UEFI boot process is that its serial execution method fails to fully utilize the parallel processing capabilities of multi-core CPUs, resulting in long boot time and low efficiency. Summary of the invention

[0011] In view of the above problems, the present invention is proposed to provide a firmware startup method based on multi-core technology that overcomes the above problems or at least partially solves the above problems.

[0012] According to one aspect of the present invention, a firmware startup method based on multi-core technology is provided, and the firmware startup method includes:

[0013] After the SEC phase is completed, the initialization task is divided into multiple parallelizable subtasks;

[0014] Dynamically allocate and schedule parallel subtasks.

[0015] Optionally, after the SEC phase is completed, the initialization task is divided into a plurality of parallelizable subtasks, specifically including:

[0016] After the SEC stage is completed, the initialization tasks of the PEI, DXE and BDS stages are divided into parallel subtasks and executed simultaneously using a multi-core CPU.

[0017] Optionally, the dynamic allocation and scheduling of parallel subtasks specifically include:

[0018] A lightweight parallel task scheduler is introduced to dynamically allocate and schedule parallel tasks, ensuring correct synchronization and dependencies between tasks.

[0019] Optionally, the introduction of a lightweight parallel task scheduler to dynamically allocate and schedule parallel tasks to ensure correct synchronization and dependencies between tasks specifically includes:

[0020] Establish a computing resource monitoring module to record and monitor each scheduling strategy, resource usage, and startup time;

[0021] The machine learning algorithm is used to summarize the execution data of each task and retrain the startup scheduling strategy prediction model.

[0022] Optionally, the task scheduler method includes: after each CPU is initialized, starting the scheduler on CPU0;

[0023] Initialize resource parallel resource initialization list mutex, stored in shared L1 cache;

[0024] Each CPU executes resource initialization scheduling tasks in parallel, and achieves synchronous access to the parallel resource initialization list through the parallel resource initialization list mutex lock;

[0025] Resource initialization scheduling tasks, under the premise of meeting the priority and previous resource scheduling, arrange the scheduling tasks of each CPU resource through the resource configuration prediction model to complete the CPU resource arrangement of the initialization task;

[0026] According to resource scheduling, each CPU completes hardware resource initialization in parallel;

[0027] The resource monitoring module records the monitoring results of this startup;

[0028] After the machine is started, the resource monitoring module transmits the startup data to the intelligent scheduling model training module, regenerates a new scheduling model, and updates it to generate the next scheduling strategy.

[0029] Optionally, the monitoring results include: power consumption, resource utilization and final startup time.

[0030] Optionally, the data for this startup includes a resource allocation table generated by a scheduling strategy, resource consumption, and startup time.

[0031] The present invention provides a firmware startup method based on multi-core technology, the firmware startup method comprising: after the SEC stage is completed, the initialization task is divided into a plurality of parallel subtasks; and the parallel subtasks are dynamically allocated and scheduled. By redesigning the startup process, the steps that can be executed in parallel can be run simultaneously in a multi-core environment, and an intelligent scheduling module and a resource monitoring module are introduced, which greatly shortens the system startup time, improves the startup efficiency, and ensures that the startup strategy has good adaptability.

[0032] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0034] Figure 1 A flowchart of starting parallel hardware resources provided by an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of an intelligent scheduler provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0037] The terms "comprises" and "having" and any variations thereof in the description embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.

[0038] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0039] The present invention proposes a multi-core parallel UEFI boot process, which specifically includes:

[0040] like Figure 1 As shown in the figure, parallel initialization: After the SEC stage is completed, the initialization tasks of the PEI, DXE and BDS stages are divided into parallel subtasks and executed simultaneously using multi-core CPUs. For example, memory initialization (PEI part) is carried out in parallel with device driver loading (DXE part), while boot strategy execution (BDS part) starts after these initialization tasks are completed, but also in parallel with other non-conflicting tasks.

[0041] Dynamic scheduling and synchronization: A lightweight parallel task scheduler is introduced to dynamically allocate and schedule parallel tasks, ensure correct synchronization and dependencies between tasks, and avoid data competition and deadlock.

[0042] A computing resource monitoring module is introduced to record and monitor the scheduling strategy, resource usage and startup time of each scheduling. The machine learning algorithm is used to summarize the execution data of each task and retrain the startup scheduling strategy prediction model.

[0043] like Figure 2 As shown in the figure, the basic steps of the dynamic scheduler are as follows: After each CPU is initialized, the scheduler is started on CPU0:

[0044] Initialize the "Parallel Resource Initialization List". This list stores the initialization status of each hardware resource (RAM, USB, PCIE), all of which are 0. This table is also the basis for the scheduling strategy. The "Parallel Resource Initialization List" is stored in the shared L1 cache.

[0045] Parallel Resource Initialization List

[0046]

[0047]

[0048] Initialize the resource "parallel resource initialization list" mutex, which is also stored in the shared first-level cache.

[0049] Each CPU executes resource initialization scheduling tasks in parallel, and achieves synchronous access to the "parallel resource initialization list" through the "parallel resource initialization list" mutex lock.

[0050] The resource initialization scheduling task, under the premise of meeting the priority and previous resource scheduling, arranges the scheduling tasks of each CPU resource through the resource configuration prediction model to complete the CPU resource orchestration of the initialization task.

[0051] According to resource scheduling, each CPU completes hardware resource initialization in parallel.

[0052] The resource monitoring module records the monitoring results of this startup (power consumption, resource utilization, final startup time, etc.).

[0053] After the machine is started, the resource monitoring module transmits the startup data (including the resource allocation table generated by the scheduling strategy, resource consumption, and startup time) to the intelligent scheduling model training module, regenerates a new scheduling model, and updates it to generate the next scheduling strategy.

[0054] The above closed-loop iteration method continuously improves the startup performance of the hardware and has good adaptability to the scenarios of newly added hardware.

[0055] Resource optimization and management: Optimize resource allocation and management during UEFI boot process to ensure efficient resource utilization during multi-core parallel execution while retaining sufficient resources for subsequent OS loader use.

[0056] In the multi-CPU scheduling process, by configuring the content of the "parallel resource initialization list", the OS loader is also managed as a special resource, and its execution resources are ensured by solidifying its initialization CPU.

[0057] And through priority, it is ensured that it can start execution after the minimum prerequisite hardware set is started.

[0058] Parallel Resource Initialization List

[0059]

[0060]

[0061] Beneficial effects: Significantly improve the startup speed: Through multi-core parallel execution, the system startup time is greatly shortened and the user experience is improved.

[0062] Efficient use of resources: Make full use of the processing power of multi-core CPUs to improve resource utilization efficiency during the startup process.

[0063] Good adaptability: The designed intelligent parallel task scheduler and resource management mechanism have good scalability and adaptability. When the hardware resources change, the startup strategy can automatically adjust the startup strategy adaptively at the next startup based on the analysis of the previous rounds of hardware monitoring and startup data.

[0064] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A firmware startup method based on multi-core technology, characterized in that: The firmware startup method comprises: After the SEC phase is completed, the initialization task is divided into multiple parallelizable subtasks; Dynamically allocate and schedule parallel subtasks.

2. The firmware startup method based on multi-core technology according to claim 1, characterized in that: After the SEC phase is completed, the initialization task is divided into multiple parallel subtasks, specifically including: After the SEC stage is completed, the initialization tasks of the PEI, DXE and BDS stages are divided into parallel subtasks and executed simultaneously using a multi-core CPU.

3. The firmware startup method based on multi-core technology according to claim 1, characterized in that: The dynamic allocation and scheduling of parallel subtasks specifically include: A lightweight parallel task scheduler is introduced to dynamically allocate and schedule parallel tasks, ensuring correct synchronization and dependencies between tasks.

4. The firmware startup method based on multi-core technology according to claim 3, characterized in that: The introduction of a lightweight parallel task scheduler to dynamically allocate and schedule parallel tasks to ensure correct synchronization and dependencies between tasks specifically includes: Establish a computing resource monitoring module to record and monitor each scheduling strategy, resource usage, and startup time; The machine learning algorithm is used to summarize the execution data of each task and retrain the startup scheduling strategy prediction model.

5. The firmware startup method based on multi-core technology according to claim 3, characterized in that: The method of the task scheduler includes: after each CPU is initialized, starting the scheduler on CPU0; Initialize resource parallel resource initialization list mutex, stored in shared L1 cache; Each CPU executes resource initialization scheduling tasks in parallel, and achieves synchronous access to the parallel resource initialization list through the parallel resource initialization list mutex lock; Resource initialization scheduling tasks, under the premise of meeting the priority and previous resource scheduling, arrange the scheduling tasks of each CPU resource through the resource configuration prediction model to complete the CPU resource arrangement of the initialization task; According to resource scheduling, each CPU completes hardware resource initialization in parallel; The resource monitoring module records the monitoring results of this startup; After the machine is started, the resource monitoring module transmits the startup data to the intelligent scheduling model training module, regenerates a new scheduling model, and updates it to generate the next scheduling strategy.

6. The firmware startup method based on multi-core technology according to claim 5, characterized in that: The monitoring results include: power consumption, resource utilization and final startup time.

7. The firmware startup method based on multi-core technology according to claim 5, characterized in that: The data of this startup includes a resource allocation table generated by a scheduling strategy, resource consumption, and startup time.

Citation Information

Patent Citations

  • Dynamic load balancing method for CPU+GPU CPPC

    CN103902387A

  • Firmware boot task distribution for implementing low latency boot performance

    CN114296750A

  • Multi-core DSP-oriented parallel computing resource self-organizing scheduling method and system

    CN116360941A

  • OpenMP implementation method based on domestic multi-core DSP

    CN117608532A

  • Method for reorganizing tasks for optimization of resources

    US20110246998A1