System starting method and device and electronic equipment

By utilizing the system processor's cache to initialize the extended memory module and update the memory mapping information, the problem of insufficient memory during system startup is solved, improving the efficiency and reliability of system startup.

CN121579095APending Publication Date: 2026-02-27LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511764594.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

During system startup, when checking whether the memory insertion method meets the requirements, memory that does not meet the requirements for image installation is disabled, resulting in a reduction in the amount of available memory and affecting the smooth completion of the initialization operation.

Method used

The extended memory module is initialized using the system processor's cache, and the memory mapping information is updated based on the initialized extended memory module to ensure a smooth system startup.

Benefits of technology

By prioritizing the initialization of extended memory modules, the system ensures that there are enough memory modules available during the startup process, thereby improving the efficiency and success rate of system startup.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579095A_ABST
    Figure CN121579095A_ABST
Patent Text Reader

Abstract

The invention discloses a system starting method and device and electronic equipment. The method comprises the following steps: determining whether a system is plugged with an extended memory module or not; under the condition of determining that the extended memory module is inserted into the system, initializing the extended memory module by utilizing a processor cache of a system processor; updating memory mapping information based on the initialized extended memory module; and starting the system based on the initialized extended memory module and the updated memory mapping information.
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, in particular to a system starting method and device and electronic equipment. BACKGROUND

[0002] In the system starting process, it is necessary to check whether the insertion method of the memory meets the requirements, and to perform initialization operation based on the memory meeting the requirements.

[0003] Among them, when checking whether the insertion method of the memory meets the requirements, in order to ensure electrical performance, the shortest line and the least interference, it is usually required to install memory image, and the memory that does not meet the requirement of image installation will be disabled, which leads to the decrease of the number of available memories, and when the number of memories is small, it will affect the smooth completion of the initialization operation. SUMMARY

[0004] Therefore, the present application provides a system starting method, device and electronic equipment, and the specific scheme is as follows:

[0005] A system starting method, comprising:

[0006] Determining whether an expansion memory module is inserted into the system;

[0007] In the case that it is determined that the expansion memory module is inserted into the system, initializing the expansion memory module by using the processor cache of the system processor;

[0008] Updating the memory mapping information based on the initialized expansion memory module;

[0009] Starting the system based on the initialized expansion memory module and the updated memory mapping information.

[0010] Further, the initializing the expansion memory module by using the processor cache of the system processor comprises:

[0011] Determining whether a target memory module is set in the system, the target memory module being a non-detachable memory module set in the system;

[0012] If it is determined that the target memory module is set in the system, initializing the target memory module by using the processor cache of the system processor, and initializing the expansion memory module by using the processor cache of the system processor.

[0013] Further, the starting the system based on the initialized expansion memory module and the updated memory mapping information comprises:

[0014] If the expansion memory module has been initialized but the target memory module has not been initialized, the system is started based on the expanded memory module that has been initialized.

[0015] If it is determined that the target memory module has been initialized, the system continues to start based on the initialized target memory module and the initialized extended memory module.

[0016] Furthermore, updating the memory mapping information based on the completed initialization of the extended memory module includes:

[0017] If the initialization of the extended memory module is completed but the initialization of the target memory module is not completed, the memory mapping information is updated based on the initialized extended memory module to obtain the first memory mapping information;

[0018] If the target memory module is determined to be initialized, the first memory mapping information is updated based on the initialized target memory module to obtain the second memory mapping information.

[0019] Furthermore, the step of initializing the target memory module using the processor cache of the system processor, and initializing the extended memory module using the processor cache of the system processor, if it is determined that a target memory module is provided on the system, includes:

[0020] If it is determined that a target memory module is installed on the system, the first processing thread and other processing threads of the system processor are determined, wherein the other processing threads are the processing threads of the system processor other than the first processing thread;

[0021] The target memory module is initialized using the processor cache of the system processor through the first processing thread;

[0022] The extended memory module is initialized using the processor cache of the system processor through the other processing threads.

[0023] Furthermore, it also includes:

[0024] If it is determined that the target memory module is not configured on the system, the extended memory module is initialized using the processor cache of the system processor through each processing thread of the system processor.

[0025] Furthermore, the initialization of the extended memory module using the system processor's processor cache includes:

[0026] A first portion of extended memory modules is determined from a plurality of extended memory modules plugged into the system, wherein the first portion of extended memory modules is at least a portion of the plurality of extended memory modules;

[0027] The first part of the extended memory module is initialized using the processor cache of the system processor;

[0028] The second part of the extended memory module is initialized using the first part of the extended memory module that has been initialized. The second part of the extended memory module is the other extended memory modules among the plurality of extended memory modules besides the first part of the extended memory module.

[0029] Furthermore, determining the first portion of extended memory modules from the plurality of extended memory modules plugged into the system includes:

[0030] Determine the cache parameters of the processor cache;

[0031] The target quantity is determined based on the cache parameters;

[0032] A target number of extended memory modules are determined from the multiple extended memory modules plugged into the system, and the target number of extended memory modules are determined as the first part of the extended memory modules.

[0033] An electronic device, comprising:

[0034] Extended memory module;

[0035] The system processor is used to determine whether an electronic device has an extended memory module plugged in; if it is determined that an extended memory module has an extended memory module plugged in, the system processor initializes the extended memory module using its processor cache; updates memory mapping information based on the initialized extended memory module; and starts the electronic device based on the initialized extended memory module and the updated memory mapping information.

[0036] A system startup device, comprising:

[0037] The determination unit is used to determine whether the system has an expansion memory module plugged in;

[0038] An initialization unit is used to initialize the extended memory module using the processor cache of the system processor when it is determined that an extended memory module is plugged into the system.

[0039] An update unit is used to update the memory mapping information based on the expanded memory module after initialization.

[0040] A startup unit is used to start the system based on the initialized extended memory module and the updated memory mapping information. Attached Figure Description

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

[0042] Figure 1 This is a flowchart of a system startup method disclosed in an embodiment of this application;

[0043] Figure 2 This is a flowchart of a system startup method disclosed in an embodiment of this application;

[0044] Figure 3 This is a schematic diagram of a system with an extended memory module connected to it, as disclosed in an embodiment of this application.

[0045] Figure 4 This is a flowchart of a system startup method disclosed in an embodiment of this application;

[0046] Figure 5 This is a flowchart of a system startup method disclosed in an embodiment of this application;

[0047] Figure 6 This is a flowchart of a system startup method disclosed in an embodiment of this application;

[0048] Figure 7 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application;

[0049] Figure 8 This is a schematic diagram of the structure of a system startup device disclosed in an embodiment of this application. Detailed Implementation

[0050] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0051] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0052] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0053] This application discloses a system startup method, the flowchart of which is as follows: Figure 1 As shown, it includes:

[0054] Step S11: Determine if an expansion memory module is connected to the system;

[0055] Step S12: If it is confirmed that an expansion memory module is connected to the system, initialize the expansion memory module using the processor cache of the system processor;

[0056] Step S13: Update the memory mapping information based on the initialized extended memory module;

[0057] Step S14: Start the system based on the initialized extended memory module and the updated memory mapping information.

[0058] During system startup, it is necessary to check whether the memory is inserted in accordance with the requirements and perform initialization operations based on the memory that meets the requirements.

[0059] When checking whether the memory insertion method meets the requirements, in order to ensure electrical performance, the shortest circuit and the least interference, memory mirroring is usually required. Memory that does not meet the requirements for mirroring will be disabled, which reduces the amount of available memory. When the amount of memory is small, it will affect the smooth completion of the initialization operation.

[0060] Based on this, in this solution, if it is confirmed that an extended memory module is connected to the system, the processor cache of the system processor is used to initialize the extended memory module to ensure the smooth execution of the initialization, thereby ensuring the smooth startup of the system.

[0061] The extended memory module can specifically be the CXL (Compute Express Link) extended memory module. CXL is an open industry standard built on PCIe (Peripheral Component Interconnect, a high-speed serial computer expansion bus standard). The CXL extended memory module can solve the bottleneck problem between computing and storage in high-performance computing and data center environments.

[0062] In this embodiment, during the system startup process, it is necessary to first determine whether an extended memory module (such as a CXL extended memory module) is plugged into the system. The subsequent processing methods are different when an extended memory module is plugged into the system and when no extended memory module is plugged into the system. Therefore, in order to ensure the smooth execution of system initialization and startup, it is necessary to first determine whether an extended memory module is plugged into the system.

[0063] If no expansion memory module is connected to the system, but the system has an onboard memory module, the processor cache of the processor in the system can be used to initialize the onboard memory module directly. After initialization, the system should be restarted so that the initialization of the onboard memory module can take effect. After that, other devices or components on the system should be initialized to complete the system startup.

[0064] If an expansion memory module is connected to the system, the system processor's cache is used to initialize the expansion memory module directly. After initialization, the system continues to start with the initialized expansion memory module.

[0065] In addition, after the extended memory module is initialized, the memory mapping information is updated based on the initialized extended memory module so that the initialized extended memory module can be accessed. By updating the memory mapping information, it is ensured that the memory mapping information records only the memory modules that can be accessed.

[0066] Memory mapping information can be represented in the form of a memory mapping table. The memory mapping table is a core data structure in the system used to manage memory address translation and access permissions. It establishes a mapping relationship between virtual addresses and physical addresses (or memory modules).

[0067] In the system startup method disclosed in this embodiment, the high-speed cache (processor cache) inside the system processor is used as the main memory to prioritize devices identified as extended memory modules. This ensures that at least a portion of the extended memory modules can be temporarily initialized through the processor cache inside the system processor, regardless of whether the system has enough memory for startup, so as to ensure that there are enough memory modules for system startup.

[0068] The system startup method disclosed in this embodiment, when it is determined that an extended memory module is plugged into the system, initializes the extended memory module using the system processor's cache, and updates the memory mapping information based on the initialized extended memory module, so that the system can start smoothly. In this solution, as long as it is determined that an extended memory module is plugged into the system, the system processor's cache can be used to initialize it, ensuring that the extended memory module can successfully complete the initialization during the system startup process, and further complete the system startup.

[0069] This embodiment discloses a system startup method, the flowchart of which is as follows: Figure 2 As shown, it includes:

[0070] Step S21: Determine if an expansion memory module is connected to the system;

[0071] Step S22: If it is confirmed that an expansion memory module is plugged into the system, determine whether the system is equipped with a target memory module. The target memory module is a non-removable memory module installed on the system.

[0072] Step S23: If it is determined that a target memory module is set on the system, initialize the target memory module using the system processor's processor cache, and initialize the extended memory module using the system processor's processor cache.

[0073] Step S24: Update the memory mapping information based on the initialized extended memory module and target memory module;

[0074] Step S25: Start the system based on the initialized extended memory module and the updated memory mapping information.

[0075] If it is confirmed that an extended memory module is installed on the system, the extended memory module is initialized using the system processor's cache, and the memory mapping information is updated based on the initialized extended memory module in order to complete the system startup.

[0076] In addition to the pluggable expansion memory module, the system may also have a target memory module. The system checks whether a target memory module is configured in order to initialize the target memory module and complete the system startup.

[0077] The target memory module is a non-removable memory module installed on the system, that is, a memory module that is directly soldered onto the system motherboard and cannot be removed. Specifically, it can be an onboard DDR (Double Data Rate Synchronous Dynamic Random Access Memory) module.

[0078] After confirming that an expansion memory module is connected to the system, the system's memory modules are further evaluated to determine whether the target memory module is configured on the system.

[0079] If it is confirmed that both an expansion memory module and a target memory module are connected to the system, then it can be done as follows: Figure 3 The diagram shown is a schematic of a system with an expansion memory module connected. Figure 3 The system includes: a system motherboard 31, on which a system processor 32 is mounted, connecting to the target memory module via a DIMM channel interface; additionally, expansion memory modules 33 (e.g., CXL memory modules) are plugged into the system motherboard. Multiple expansion memory modules 33 can be connected, each CXL memory module plugged into the system motherboard via a PCIe interface. The PCIe interface's physical layer provides low-latency and high-bandwidth connectivity, significantly improving the server's memory capacity and performance. Furthermore, each CXL memory module may include a CXL controller, and each CXL memory module can be horizontally expanded to include multiple DDR memory units.

[0080] If both an expansion memory module and a target memory module are connected to the system, the system processor's cache can be used to initialize the target memory module and simultaneously initialize the expansion memory module, thereby improving the initialization efficiency of the memory modules.

[0081] In addition, if it is determined that an expansion memory module is plugged into the system, but no target memory module is set, the expansion memory module can be initialized only through the processor cache of the system processor without performing other operations, thereby improving the efficiency of the expansion memory module initialization.

[0082] In the system startup method disclosed in this embodiment, the high-speed cache (processor cache) inside the system processor is used as the main memory to prioritize devices identified as extended memory modules and target memory modules. This ensures that regardless of whether the system has enough memory for startup, at least some memory modules can be temporarily initialized through the processor cache inside the system processor to ensure that there are enough memory modules for system startup.

[0083] The system startup method disclosed in this embodiment, when it is determined that an extended memory module and a target memory module are plugged into the system, initializes the extended memory module using the processor cache. In addition, it also initializes the target memory module using the processor cache, so as to update the memory mapping information based on the initialized extended memory module and target memory module, thereby completing the system startup. This realizes the initialization of the extended memory module and target memory module using the system processor's processor cache, so as to ensure that the extended memory module and target memory module can be successfully initialized during the system startup process, and further complete the system startup.

[0084] The system startup method disclosed in this embodiment has the following flowchart: Figure 4 As shown, it includes:

[0085] Step S41: Determine if an expansion memory module is connected to the system;

[0086] Step S42: If it is confirmed that an expansion memory module is plugged into the system, determine whether the system is equipped with a target memory module. The target memory module is a non-removable memory module installed on the system.

[0087] Step S43: If it is determined that a target memory module is set on the system, initialize the target memory module using the system processor's processor cache, and initialize the extended memory module using the system processor's processor cache;

[0088] Step S44: If the expansion memory module initialization is complete but the target memory module initialization is not complete, start the system based on the completed expansion memory module.

[0089] Step S45: If it is determined that the target memory module has been initialized, the system continues to start based on the initialized target memory module and the initialized extended memory module.

[0090] After confirming that an expansion memory module is installed on the system, it is also necessary to confirm whether a target memory module is set up on the system. The system processor's cache is used to initialize both the target memory module and the expansion memory module simultaneously to ensure the initialization efficiency of the memory modules.

[0091] The system processor's cache initializes both the target memory module and the extended memory module simultaneously, but their initialization speeds differ. Therefore, the initialization completion times are not the same, with the extended memory module (e.g., the CXL extended memory module) typically completing its initialization first.

[0092] For the target memory module (such as the onboard DDR module), the system processor is responsible for training. That is, the onboard DDR module itself does not have intelligent processing capabilities. All the memory training work is performed by the system processor, which takes a long time. Furthermore, the memory training process of the onboard DDR module itself includes multiple stages and may require multiple restarts to take effect. This means that each step in the memory training process of the onboard DDR module must be executed serially.

[0093] Extended memory modules (such as the CXL extended memory module) perform memory training themselves. The built-in firmware on the CXL extended memory module already provides the training and configuration information, so the system processor does not need to train it. This results in a shorter initialization time for the system processor to initialize the CXL extended memory module. Furthermore, the firmware of multiple CXL extended memory modules can be executed in parallel, which can significantly reduce the time spent waiting for memory training during system startup.

[0094] Therefore, the time required for the system processor to initialize an extended memory module (such as a CXL extended memory module) is significantly shorter than that for a target memory module (such as an onboard DDR module). Thus, the system processor initializes both the extended memory module (such as a CXL extended memory module) and the target memory module (such as an onboard DDR module) simultaneously. The extended memory module (such as a CXL extended memory module) will complete the initialization process first. Therefore, the system boot process can be performed on the extended memory module (such as a CXL extended memory module) that completes the initialization process first.

[0095] After the extended memory module (such as the CXL extended memory module) completes initialization, the system can start directly without waiting for the target memory module (such as the onboard DDR module) to complete initialization. That is, the system uses the initialized extended memory module (such as the CXL extended memory module) as the main memory to start the system, so as to ensure the efficiency of system startup.

[0096] If the target memory module (e.g., the onboard DDR module) has not been initialized, the system boot process is executed using the already initialized extended memory module (e.g., the CXL extended memory module). During the execution of the system boot process by the extended memory module (e.g., the CXL extended memory module), the target memory module (e.g., the onboard DDR module) is initialized. At this time, the system boot process can continue using both the initialized extended memory module (e.g., the CXL extended memory module) and the target memory module (e.g., the onboard DDR module) until the system boot process is complete.

[0097] Since the memory mapping information needs to be updated after the memory module initialization is complete, and because the target memory module and the extended memory module cannot be initialized simultaneously in this embodiment, the update of the memory mapping information can be specifically as follows:

[0098] If the extended memory module is initialized but the target memory module is not initialized, the memory mapping information is updated based on the initialized extended memory module to obtain the first memory mapping information; if the target memory module is initialized, the first memory mapping information is updated based on the initialized target memory module to obtain the second memory mapping information.

[0099] When neither the extended memory module nor the target memory module has been initialized, the system typically only has the processor cache. The processor cache can only be used to initialize the memory modules, which is insufficient to start the system. Therefore, the extended memory module and the target memory module can be initialized first through the processor cache. Once it is determined that a memory module has been initialized, the system can be started directly using the initialized memory module to ensure a fast system startup.

[0100] In this embodiment, the extended memory module typically completes initialization first. During the initialization of the target memory module, the system startup can be performed using the initialized extended memory module. To ensure that the initialized extended memory module can perform the system startup, its information needs to be updated in the memory mapping information to guarantee memory access.

[0101] Therefore, when the extended memory module is initialized but the target memory module is not, the memory mapping information is directly updated based on the initialized extended memory module to obtain the first memory mapping information, so as to use the initialized extended memory module to start the system; and as the target memory module is initialized, the initialized target memory module is updated to the first memory mapping information to obtain the second memory mapping information, so as to continue to start the system through the extended memory module and the target memory module based on the second memory mapping information, thereby improving the system startup efficiency.

[0102] The system startup method disclosed in this embodiment, when it is determined that an extended memory module and a target memory module are connected to the system, simultaneously initializes the target memory module and the extended memory module using the system processor's cache. If the extended memory module is initialized but the target memory module is not, the system is started based on the initialized extended memory module. If it is determined that the target memory module is initialized, the system continues to start based on the initialized target memory module and the initialized extended memory module, thereby completing the system startup. In this solution, when initializing the target memory module and the extended memory module simultaneously using the system processor's cache, they may not be initialized simultaneously. Therefore, even if the target memory module is not initialized, the system can still be started using only the initialized extended memory module after the extended memory module is initialized. After the target memory module is also initialized, the system continues to start using both the initialized extended memory module and the target memory module simultaneously. This ensures that sufficient memory is available for initialization before the system can start, avoiding slow startup speeds or startup failures.

[0103] This embodiment discloses a system startup method, the flowchart of which is as follows: Figure 5 As shown, it includes:

[0104] Step S51: Determine if an expansion memory module is connected to the system;

[0105] Step S52: If it is confirmed that an expansion memory module is plugged into the system, determine whether the system is equipped with a target memory module. The target memory module is a non-removable memory module installed on the system.

[0106] Step S53: If it is determined that a target memory module is set on the system, determine the first processing thread and other processing threads of the system processor. The other processing threads are the processing threads of the system processor other than the first processing thread.

[0107] Step S54: Initialize the target memory module using the system processor's cache through the first processing thread;

[0108] Step S55: Initialize the extended memory module using the system processor's cache through other processing threads;

[0109] Step S56: Update the memory mapping information based on the initialized extended memory module and target memory module;

[0110] Step S57: Start the system based on the initialized extended memory module, target memory module, and updated memory mapping information.

[0111] When both an expansion memory module and a target memory module are connected to the system, the system processor's cache can be used to simultaneously initialize both the expansion memory module and the target memory module, so that the system boot process can be executed using the initialized memory module.

[0112] When initialization operations are performed on both the extended memory module and the target memory module simultaneously through the system processor's processor cache, the initialization operations are actually performed on the extended memory module and the target memory module through the processor cache using the system processor's processing thread.

[0113] The number of processing threads allocated to each memory module can be determined specifically based on the characteristics of memory training for the target memory module and the extended memory module.

[0114] Specifically, the memory training process of the target memory module needs to be executed serially. Therefore, regardless of the number of target memory modules, only one processing thread is needed. Even if multiple processing threads are allocated to the target memory module, only one processing thread will be in a working state, that is, only one processing thread will execute the memory training of the target memory module.

[0115] In addition, the memory training process of the extended memory module can be executed in parallel. Therefore, after allocating one processing thread to the target memory module, other processing threads can be allocated to the extended memory module to achieve parallel memory training of the extended memory module, ensure the initialization speed of the extended memory module, and improve the efficiency of memory module initialization and system startup.

[0116] It should be noted that whether it is a single processing thread allocated to the target memory module or multiple other processing threads allocated to the extended memory module, these threads are all idle processing threads before they are allocated to the memory module. Only threads that are not occupied can be allocated to the memory module for memory module initialization.

[0117] Therefore, in this embodiment, after determining that the system has an extended memory module and a target memory module, it is necessary to further determine the currently idle processing threads in the system processor, and select one idle processing thread as the first processing thread. Other idle processing threads besides the first processing thread are then selected as other processing threads. Subsequently, the first processing thread is used to initialize the target memory module, and the other processing threads are used to initialize the extended memory module. This ensures that while the target memory module and the extended memory module are initialized simultaneously, the training steps for each memory in the extended memory module can also be executed in parallel, thereby effectively improving the efficiency of memory module initialization and thus improving the system startup efficiency.

[0118] Furthermore, the system startup method disclosed in this embodiment may also include:

[0119] After confirming that an extended memory module is connected to the system, the system continues to determine whether a target memory module is configured. If it is determined that no target memory module is configured, then the system processor's cache is used to initialize only the extended memory module. In this case, the extended memory module can be initialized using the system processor's cache through the various processing threads of the system processor.

[0120] In cases where an extended memory module is installed on the system but no target memory module is configured, only the extended memory module needs to be initialized. After the extended memory module is initialized, the system can boot successfully. When initializing the extended memory module using the system processor's processing threads, the currently idle processing threads of the system processor can be identified first. All currently idle processing threads can then be used to initialize the extended memory module; that is, all currently idle processing threads of the system processor can be used to initialize the extended memory module.

[0121] Additionally, it should be noted that regardless of whether a target memory module is configured on the system, when determining the processing thread in the system processor used to perform memory module initialization, the number of memory modules that need to be initialized (extended memory modules, or extended memory modules and one target memory module; here, "one target memory module" does not mean there is only one target memory module, but rather that only one processing thread is needed when determining the required processing thread for the target memory module) can be determined first. The number of memory modules that need to be initialized is then determined as the first number. The number of currently idle processing threads in the system processor is then determined as the second number. The first number and the second number are compared to obtain the comparison result, and the processing thread for performing memory module initialization is determined based on the comparison result.

[0122] Specifically, if the second number is greater than the first number, then the first number of idle processing threads are directly selected from the second number of idle processing threads, and the first number of idle processing threads are used to perform the initialization of the first number of memory modules respectively. For example, if the number of extended memory modules set on the system is 5, then the first number of memory modules that need to be initialized on the system is 6 (adding 1 target memory module). If the second number of idle processing threads in the system processor is 7, then 6 are selected from the 7 idle processing threads, and the selected 6 processing threads are matched one-to-one with 6 memory modules (target memory module and 5 extended memory modules). Each processing thread performs the initialization operation on its corresponding memory module.

[0123] If the second number is less than the first number, then the second number of memory modules are selected from the first number of memory modules, and the second number of idle processing threads are used to initialize the second number of memory modules respectively. After the initialization of the second number of memory modules is completed, the current idle processing threads are used to perform initialization operations on the remaining memory modules. For example, if the number of extended memory modules set on the system is 5, then the first number of memory modules that need to be initialized on the system is 6 (adding 1 target memory module). If the second number of idle processing threads in the system processor is 4, then 4 are selected from the 6 idle processing threads (target memory modules and 3 extended memory modules). The system uses four idle processing threads, each corresponding to one of the four selected memory modules (target memory module and three extended memory modules). Each processing thread performs initialization operations on its corresponding memory module. After the initialization operations are completed on the four selected memory modules (target memory module and three extended memory modules), since two extended memory modules remain to be initialized, the currently idle processing threads are determined, and two of these threads are selected. These two selected idle processing threads are then assigned one-to-one with the remaining two extended memory modules, and each idle processing thread performs initialization operations on its corresponding extended memory module.

[0124] The system startup method disclosed in this embodiment, upon determining that an extended memory module is plugged into the system and a target memory module is set, initializes the target memory module using the system processor's first processing thread and processor cache, and initializes the extended memory module using the system processor's other processing threads and processor cache. These other processing threads are all processing threads of the system processor other than the first processing thread. In this scheme, since the initialization process of the target memory module needs to be executed serially, while the initialization process of the extended memory module needs to be executed in parallel, only one processing thread needs to be allocated to the target memory module, while the other processing threads in the system processor are allocated to the extended memory module. This ensures the parallel execution of the extended memory module, improving the initialization efficiency of the extended memory module without affecting the initialization of the target memory module, thereby increasing the system startup speed.

[0125] This embodiment discloses a system startup method, the flowchart of which is as follows: Figure 6 As shown, it includes:

[0126] Step S61: Determine if an expansion memory module is connected to the system;

[0127] Step S62: If it is determined that an expansion memory module is plugged into the system, a first part of the expansion memory modules is determined from the multiple expansion memory modules plugged into the system. The first part of the expansion memory modules is at least a portion of the multiple expansion memory modules.

[0128] Step S63: Initialize the first part of the extended memory module using the system processor's processor cache;

[0129] Step S64: Initialize the second part of the extended memory module using the first part of the extended memory module that has been initialized. The second part of the extended memory module is the other extended memory modules among the multiple extended memory modules besides the first part of the extended memory module.

[0130] Step S65: Update the memory mapping information based on the initialized extended memory module;

[0131] Step S66: Start the system based on the initialized extended memory module and the updated memory mapping information.

[0132] When it is determined that an expansion memory module is installed on the system, the expansion memory module is initialized using the system processor's cache. If an expansion memory module is installed on the system, and a target memory module is also configured on the system, both the expansion memory module and the target memory module need to be initialized using the system processor's cache.

[0133] Since the memory modules are initialized using the system processor's cache, there's a possibility that the cache size might be small. When the cache is small, initializing a large number of memory modules will take a long time. Therefore, at least a portion of the memory modules can be initialized first. Specifically, the first part of the memory modules (which may include both extended and target memory modules if the system has external memory modules and a target memory module; otherwise, it consists of extended memory modules) can be initialized using the processor cache. Because the first part contains fewer memory modules, initializing it using a smaller cache won't consume much time.

[0134] After the first part of the memory module is initialized, the memory mapping information is updated so that the initialized first part of the memory module can be called and accessed.

[0135] Based on this, in this scheme, the first memory module that has been initialized can be used as the main memory so that the main memory (i.e., the first memory module) can be used to initialize the remaining second memory module. The memory space of the first memory module that has been initialized must be larger than the cache space of the processor cache. Therefore, when the first memory module that has been initialized is used to initialize the remaining second memory module, its initialization efficiency is higher than that of using the processor cache to initialize the remaining second memory module.

[0136] To ensure the efficiency of memory module initialization, it is usually determined that the number of memory modules in the first part of the memory module is less than the number of memory modules in the second part of the memory module. This ensures the efficiency of the processor cache in initializing the first part of the memory module and also improves the efficiency of the first part of the memory module in initializing the second part of the memory module.

[0137] Furthermore, the number of memory modules included in the first part of the memory module can be determined based on the processor cache parameters, specifically as follows:

[0138] Determine the cache parameters of the processor cache; determine the target number based on the cache parameters; determine the target number of memory modules from multiple memory modules in the system, and define the target number of memory modules as the first part of memory modules.

[0139] The memory module described in this embodiment may include only the extended memory module, or it may include both the extended memory module and the target content module. Specifically, if only the extended memory module is plugged into the system and no target memory module is set, then the memory module described in this embodiment refers to the extended memory module.

[0140] If an extended memory module is plugged into the system and a target memory module is set, then the memory modules mentioned in this embodiment refer to both the extended memory module and the target memory module. For example, the determined target number of memory modules must include the target memory module and (target number minus 1) extended memory modules. In this case, the determined second part of the memory modules may only include the extended memory modules and not the target memory modules. This ensures that after the (target number minus 1) extended memory modules are initialized, the initialized (target number minus 1) extended memory modules can be directly used to perform the initialization operation on the second part of the memory modules. At this time, the target memory module in the first part of the memory modules may not have been initialized yet. Therefore, the initialization process of the target memory module may have gone through the initialization of the (target number minus 1) extended memory modules and the initialization of the second part of the memory modules. Of course, after the initialization of the second part of the memory modules is completed, the target memory module may still not be initialized yet. However, this does not affect the use of the initialized memory modules to perform the system startup operation. Alternatively, the following situation may also exist: when the initialization of the (target number minus 1) extended memory modules is completed, but the initialization of the second part of the memory modules is not completed, the target memory module has been initialized.

[0141] Of course, even if both the extended memory module and the target memory module are plugged into the system, when determining the first part of the memory module, at least some of the extended memory modules can be selected as the first part of the memory module, and the remaining memory modules can be used as the second part of the memory module. In this case, the second part of the memory module may include both the target memory module and the extended memory module. Here, we do not make a specific limitation on whether the first part of the memory module includes the target memory module.

[0142] The target number is determined based on the cache parameters of the processor cache. The target number is the number of memory modules in the first part of the memory modules. The cache parameters of the processor cache can be specifically: the cache resources of the processor cache, which can include: the size of the cache space, the cache architecture (such as: hierarchy, association method, etc.).

[0143] Specifically, determining the number of memory modules that match the size of the cache space and setting this number as the target number can be achieved by: selecting this number of memory modules as the first part of the memory modules under the processor cache corresponding to the size of the cache space, which can ensure that the time required for the initialization of all memory modules (the first part of the memory modules and the second part of the memory modules) is short; or, the processor cache corresponding to the size of the cache space can complete the initialization of this number of memory modules while ensuring a certain level of efficiency.

[0144] For example: If the processor cache resources are determined to be less than a certain value, then one extended memory module can be directly designated as the first part of the memory module, and the other memory modules as the second part of the memory module. First, the processor cache is used to initialize the selected extended memory module. After the extended memory module is initialized, it is used as main memory to initialize the second part of the memory module. Similarly: If the processor cache resources are determined to be within a certain range, then three extended memory modules can be directly designated as the first part of the memory module, and the other memory modules as the second part of the memory module. First, the processor cache is used to initialize the three selected extended memory modules. After the three selected extended memory modules are initialized, they are used as main memory to initialize the second part of the memory module.

[0145] Alternatively, determine the number of memory modules that match the cache architecture and set that number as the target number. Specifically, determine the number of memory modules that match the cache architecture among all memory modules and set that number as the target number. When selecting the first set of memory modules, select only the memory modules that match the cache architecture as the first set of memory modules, etc.

[0146] After all memory modules are initialized, the memory mapping information is updated, and all memory modules are mapped to main memory for access.

[0147] The system startup method disclosed in this solution will not cause the system to fail to boot even if the system motherboard does not have an onboard memory module installed, or if the onboard memory module on the system motherboard has a serious hardware error and is unusable. It also eliminates the need to open the system motherboard and install memory. It only needs to use the processor cache of the system processor to first initialize the extended memory module (the extended memory module plugged into the system motherboard, or a separate external extended memory module). After that, the initialized extended memory module can be used to initialize all memory modules and start the system, which improves system startup efficiency and user experience.

[0148] The system startup method disclosed in this embodiment, when it is determined that an extended memory module is plugged into the system, divides the extended memory module plugged into the system into two parts, namely a first part of the extended memory module and a second part of the extended memory module. First, the first part of the extended memory module is initialized using the processor cache of the system processor. After the initialization of the first part of the extended memory module is completed, the second part of the extended memory module is initialized using the initialized first part of the extended memory module. This achieves that even if the processor cache is small, it is possible to initialize a part of the extended memory module first, and then use the initialized part of the extended memory module as the main memory to initialize the remaining extended memory modules, which ensures the efficiency of memory module initialization and improves the system startup speed.

[0149] This embodiment discloses an electronic device, the structural schematic diagram of which is shown below. Figure 7 As shown, it includes:

[0150] Extended memory module 71 and system processor 72.

[0151] The system processor 72 is used to determine whether the electronic device has an extended memory module plugged in; if it is determined that an extended memory module 71 is plugged in, the system processor initializes the extended memory module 71 using the processor cache of the system processor; updates the memory mapping information based on the initialized extended memory module 71; and starts the electronic device based on the initialized extended memory module 71 and the updated memory mapping information.

[0152] The electronic device disclosed in this embodiment is implemented based on the system startup method disclosed in the above embodiments, and will not be described again here.

[0153] The electronic device disclosed in this embodiment, upon determining that an extended memory module is plugged into the system, initializes the extended memory module using the system processor's cache and updates the memory mapping information based on the initialized extended memory module, so that the system can start smoothly. In this solution, as long as it is determined that an extended memory module is plugged into the system, it can be initialized using the system processor's cache to ensure that the extended memory module can successfully complete initialization during the system startup process, and further complete the system startup.

[0154] This embodiment discloses a system startup device, the structural schematic diagram of which is shown below. Figure 8 As shown, it includes:

[0155] The system includes a determination unit 81, an initialization unit 82, an update unit 83, and a startup unit 84.

[0156] Among them, the determining unit 81 is used to determine whether the system has an extended memory module plugged in;

[0157] The initialization unit 82 is used to initialize the extended memory module using the processor cache of the system processor when it is determined that an extended memory module has been plugged into the system.

[0158] Update unit 83 is used to update memory mapping information based on the expanded memory module after initialization;

[0159] The startup unit 84 is used to start the system based on the initialized extended memory module and the updated memory mapping information.

[0160] Furthermore, the initialization unit is used for:

[0161] Determine whether the system has a target memory module, which is a non-removable memory module installed on the system; if it is determined that the system has a target memory module, initialize the target memory module using the system processor's processor cache, and initialize the extended memory module using the system processor's processor cache.

[0162] Furthermore, the startup unit is used for:

[0163] If the extended memory module is initialized but the target memory module is not, the system is started based on the initialized extended memory module; if the target memory module is determined to be initialized, the system continues to start based on the initialized target memory module and the initialized extended memory module.

[0164] Furthermore, the update unit is used for:

[0165] If the extended memory module is initialized but the target memory module is not initialized, the memory mapping information is updated based on the initialized extended memory module to obtain the first memory mapping information; if the target memory module is initialized, the first memory mapping information is updated based on the initialized target memory module to obtain the second memory mapping information.

[0166] Furthermore, the initialization unit is used for:

[0167] If it is determined that a target memory module is set on the system, the first processing thread and other processing threads of the system processor are determined. The other processing threads are the processing threads of the system processor other than the first processing thread. The first processing thread initializes the target memory module using the processor cache of the system processor. The other processing threads initialize the extended memory module using the processor cache of the system processor.

[0168] Furthermore, the initialization unit is also used for:

[0169] If it is determined that the target memory module is not configured on the system, the extended memory module is initialized using the processor cache of the system processor through the processing threads of the system processor.

[0170] Furthermore, the initialization unit is used for:

[0171] The system identifies a first set of extended memory modules from among multiple extended memory modules connected to the system. The first set of extended memory modules is at least a portion of the multiple extended memory modules. The system processor's processor cache is used to initialize the first set of extended memory modules. The initialized first set of extended memory modules is used to initialize a second set of extended memory modules, which are the other extended memory modules among the multiple extended memory modules besides the first set of extended memory modules.

[0172] Furthermore, the initialization unit is used for:

[0173] Determine the cache parameters of the processor cache; determine the target number based on the cache parameters; determine the target number of extended memory modules from multiple extended memory modules plugged into the system, and define the target number of extended memory modules as the first part of the extended memory modules.

[0174] The system startup device disclosed in this embodiment is based on the system startup method disclosed in the above embodiment, and will not be described again here.

[0175] The system startup apparatus disclosed in this embodiment, upon determining that an extended memory module is plugged into the system, initializes the extended memory module using the system processor's cache and updates the memory mapping information based on the initialized extended memory module, so that the system can start smoothly. In this solution, as long as it is determined that an extended memory module is plugged into the system, the system processor's cache can be used to initialize it, ensuring that the extended memory module can successfully complete initialization during the system startup process, and further complete the system startup.

[0176] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0177] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0178] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0179] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A system startup method, comprising: Determine if an expansion memory module is connected to the system; If it is determined that an expansion memory module is plugged into the system, the expansion memory module is initialized using the processor cache of the system processor; Update the memory mapping information based on the completed initialization of the extended memory module; The system is started based on the initialized extended memory module and the updated memory mapping information.

2. The method according to claim 1, wherein initializing the extended memory module using the system processor's processor cache includes: Determine whether the system is equipped with a target memory module, wherein the target memory module is a non-removable memory module installed on the system; If it is determined that a target memory module is configured on the system, the target memory module is initialized using the processor cache of the system processor, and the extended memory module is initialized using the processor cache of the system processor.

3. The method according to claim 2, wherein starting the system based on the initialized extended memory module and the updated memory mapping information includes: If the expansion memory module has been initialized but the target memory module has not been initialized, the system is started based on the expanded memory module that has been initialized. If it is determined that the target memory module has been initialized, the system continues to start based on the initialized target memory module and the initialized extended memory module.

4. The method according to claim 3, wherein updating the memory mapping information based on the completed initialization of the extended memory module includes: If the initialization of the extended memory module is completed but the initialization of the target memory module is not completed, the memory mapping information is updated based on the initialized extended memory module to obtain the first memory mapping information; If the target memory module is determined to be initialized, the first memory mapping information is updated based on the initialized target memory module to obtain the second memory mapping information.

5. The method according to claim 2, wherein if it is determined that a target memory module is provided on the system, initializing the target memory module using the processor cache of the system processor, and initializing the extended memory module using the processor cache of the system processor, comprises: If it is determined that a target memory module is installed on the system, the first processing thread and other processing threads of the system processor are determined, wherein the other processing threads are the processing threads of the system processor other than the first processing thread; The target memory module is initialized using the processor cache of the system processor through the first processing thread; The extended memory module is initialized using the processor cache of the system processor through the other processing threads.

6. The method according to claim 2, further comprising: If it is determined that the target memory module is not configured on the system, the extended memory module is initialized using the processor cache of the system processor through each processing thread of the system processor.

7. The method according to claim 1, wherein initializing the extended memory module using the system processor's processor cache includes: A first portion of extended memory modules is determined from a plurality of extended memory modules plugged into the system, wherein the first portion of extended memory modules is at least a portion of the plurality of extended memory modules; The first part of the extended memory module is initialized using the processor cache of the system processor; The second part of the extended memory module is initialized using the first part of the extended memory module that has been initialized. The second part of the extended memory module is the other extended memory modules among the plurality of extended memory modules besides the first part of the extended memory module.

8. The method of claim 7, wherein determining the first portion of extended memory modules from a plurality of extended memory modules plugged into the system comprises: Determine the cache parameters of the processor cache; The target quantity is determined based on the cache parameters; A target number of extended memory modules are determined from the multiple extended memory modules plugged into the system, and the target number of extended memory modules are determined as the first part of the extended memory modules.

9. An electronic device, comprising: Extended memory module; The system processor is used to determine whether an electronic device has an expansion memory module plugged in. If it is determined that an extended memory module is plugged into the electronic device, the extended memory module is initialized using the processor cache of the system processor; the memory mapping information is updated based on the initialized extended memory module. The electronic device is started based on the initialized extended memory module and the updated memory mapping information.

10. A system startup device, comprising: The determination unit is used to determine whether the system has an expansion memory module plugged in; An initialization unit is used to initialize the extended memory module using the processor cache of the system processor when it is determined that an extended memory module is plugged into the system. An update unit is used to update the memory mapping information based on the expanded memory module after initialization. A startup unit is used to start the system based on the initialized extended memory module and the updated memory mapping information.