Program updating method and electronic device

By leveraging the collaborative mechanism between the baseboard management controller and the unified scalable firmware interface module, the system management interrupt handler is dynamically updated, resolving the issue of needing to restart the device for updates in existing technologies. This enables a seamless program update process, improving system availability and maintenance efficiency.

CN122363721APending Publication Date: 2026-07-10LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LENOVO (BEIJING) LTD
Filing Date
2026-03-31
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In the existing technology, updating the system management interrupt handler requires restarting the electronic device, which affects user services and reduces system availability and maintenance efficiency.

Method used

The system obtains software update packages through the baseboard management controller, compiles them into target format files and updates them to the target file volume, sends notification messages to the unified extensible firmware interface module, and dynamically updates the system management interrupt handler entry list to avoid system restarts.

Benefits of technology

It enables seamless updates of system management interrupt handlers during system operation, avoiding business interruptions and improving the availability and maintenance efficiency of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363721A_ABST
    Figure CN122363721A_ABST
Patent Text Reader

Abstract

The application discloses a program updating method and an electronic device. The method comprises the following steps: a baseboard management controller acquires a software updating package of a target system management interrupt processing program; the software updating package is compiled into a corresponding target format file, and is updated into a target file volume to obtain an updated target file volume; the target file volume is used for storing the target format file corresponding to each system management interrupt processing program in the electronic device; a notification message is sent to a unified extensible firmware interface module based on the updated target file volume, so that the unified extensible firmware interface module updates the target system management interrupt processing program in a system management interrupt processing program entry list in the unified extensible firmware interface module based on the notification message and the updated target file volume; and the system management interrupt processing program entry list is used for recording the system management interrupt processing program that has been registered to the unified extensible firmware interface module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of program update technology, and in particular to a program update method and electronic device. Background Technology

[0002] Currently, System Management Interrupt (SMI) handlers are scattered across various SMI drivers. When an electronic device boots up, the Unified Extensible Firmware Interface (UEFI) module loads these SMI drivers and registers the SMI handlers in the SMI entry list. This SMI entry list cannot be modified after the electronic device boots up and the operating system boots. Updating the SMI handlers requires a restart of the electronic device, which may impact user services. Summary of the Invention

[0003] In view of this, embodiments of this application provide a program update method and an electronic device.

[0004] According to a first aspect of this application, this application provides a method for updating a program, comprising:

[0005] The baseboard management controller obtains the software update package for the target system management interrupt handler; The software update package is compiled into the corresponding target format file and updated to the target file volume to obtain the updated target file volume; the target file volume is used to store the target format files corresponding to the various system management interrupt handlers in the electronic device; A notification message is sent to the Unified Extensible Firmware Interface Module (UEIMIM) based on the updated target file volume. This allows the UEIMIM to update the target system management interrupt handlers in its system management interrupt handler entry list based on the notification message and the updated target file volume. The system management interrupt handler entry list records the system management interrupt handlers that have been registered with the UEIMIM.

[0006] Furthermore, this application also proposes sending a notification message to the Unified Extensible Firmware Interface module based on the updated target file volume, including: If it is determined that the updated target file format file exists in the updated target file volume, a notification message is sent to the Unified Extensible Firmware Interface module.

[0007] Furthermore, this application also proposes sending notification messages to the Unified Extensible Firmware Interface module, including: Calculate the verification information corresponding to the updated target file volume; The target software sends a notification message to the Unified Extensible Firmware Interface Module (UEIMMT). The notification message includes verification information. The target software is a system management interrupt handler of the target type and is registered with the UEIMMT. The UEIMMT receives the notification message based on the port corresponding to the target software, verifies the updated target file volume based on the verification information in the notification message, and updates the target system management interrupt handler in the system management interrupt handler entry list in the UEIMMT based on the updated target file volume after successful verification.

[0008] Furthermore, this application also proposes that the target software register with the unified extensible firmware interface module, including: During the startup phase, the unified and extensible firmware interface module obtains the target format file corresponding to the target software. The Unified Extensible Firmware Interface Module (UEMI) sets the port of the target software and inserts the target format file into the system management interrupt handler entry list to register the target software with the UEMI.

[0009] Furthermore, this application also proposes that the Unified Extensible Firmware Interface Module (UEIMI) updates the target system management interrupt handler in the list of system management interrupt handler entries in the UEIMI based on the notification message and the updated target file volume, including: The Unified Extensible Firmware Interface Module removes all target format files corresponding to system management interrupt handlers from the list of system management interrupt handler entries based on notification messages; Reinsert all target format files in the updated target file volume into the system management interrupt handler entry list to update the target system management interrupt handlers in the system management interrupt handler entry list of the Unified Extensible Firmware Interface module.

[0010] Furthermore, this application also proposes that the Unified Extensible Firmware Interface Module, based on notification messages, removes all target format files corresponding to system management interrupt handlers from the system management interrupt handler entry list, including: The Unified Extensible Firmware Interface module removes the target format files corresponding to other system management interrupt handlers besides the target software from the list of system management interrupt handler entries based on notification messages.

[0011] Furthermore, this application also proposes compiling the software package into a corresponding target format file and updating it to the target file volume, including: Determine the registration type information corresponding to the target system's management interrupt handler; Compile the software package into the corresponding target format file; Update the target format file and its corresponding registration type information to the target file volume; so that the Unified Extensible Firmware Interface Module updates the target system management interrupt handler in the list of system management interrupt handler entries in the Unified Extensible Firmware Interface Module based on the target format file and its corresponding registration type information in the updated target file volume.

[0012] According to a second aspect of this application, this application proposes an electronic device comprising: The baseboard management controller is used to acquire the software update package of the target system management interrupt handler; compile the software update package into the corresponding target format file and update it to the target file volume to obtain the updated target file volume; the target file volume is used to store the target format files corresponding to each system management interrupt handler in the electronic device; and sends a notification message to the unified extensible firmware interface module based on the updated target file volume. The Unified Extensible Firmware Interface Module (UEIMI) is used to update the target system management interrupt handlers in the UEIMI's list of system management interrupt handler entries based on notification messages and the updated target file volume. The system management interrupt handler entry list records the system management interrupt handlers that have been registered to the UEIMI.

[0013] Furthermore, this application also proposes that the electronic device further includes: The Unified and Extensible Firmware Interface Module (UEMI) is a serial peripheral interface used to store target file volumes.

[0014] Furthermore, this application also proposes that the electronic device further includes: System-managed memory; The Unified Extensible Firmware Interface Module (UEIMI) is used to load updated target file volumes into system management memory based on notification messages; and to update the target system management interrupt handlers in the system management interrupt handler entry list in the UEIMI based on the updated target file volumes in system management memory.

[0015] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating a program update method according to an embodiment of this application; Figure 2 This is a flowchart illustrating another program update method in an embodiment of this application; Figure 3This is a flowchart illustrating the process of updating the system management interrupt handler entry list using the unified extensible firmware interface module in an embodiment of this application. Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] During the firmware operation of electronic devices, the list of system management interrupt handler entries remains static after the Unified Extensible Firmware Interface (UEMI) module boots into the operating system, making dynamic updates impossible. The system management interrupt handlers are registered during the UEMI startup phase, forming a fixed entry list structure that remains unchanged during operating system operation. This means that when a target system management interrupt handler needs a software update, a system reboot is required to re-register the handler, causing service interruptions. Furthermore, this problem stems from the fact that system management interrupt handlers are scattered across individual drivers. The UEMI module only loads the drivers during startup to build the entry list. After the operating system takes over control, the entry list registration mechanism is locked, limiting the feasibility of runtime firmware updates and impacting system availability and service continuity.

[0019] If the above issues are not resolved, updates to the system management interrupt handler will always rely on system reboots, making dynamic updates during system operation impossible. Furthermore, this limitation will prevent timely application of critical fixes during firmware maintenance, increasing system downtime and potentially triggering business interruption risks.

[0020] In response, this application proposes a program update method, such as... Figure 1 As shown, it includes: S101, the baseboard management controller obtains the software update package of the target system management interrupt handler.

[0021] In this embodiment, the Baseboard Management Controller (BMC) is a dedicated microcontroller, typically integrated on the motherboard of an electronic device, used to monitor the physical state of the electronic device, such as temperature, fan speed, and power status, and to provide remote management functions. In this program update method, the Baseboard Management Controller is responsible for initiating the software update process.

[0022] A target system management interrupt handler is a specific software module that executes in System Management Mode (SMM) to respond to System Management Interrupts (SMIs). These handlers typically perform low-level hardware operations or provide system-level services.

[0023] A software update package is a collection of code and data used to update the target system's management interrupt handlers. This update package is typically provided in a specific format and requires processing before it can be deployed to the target system.

[0024] In this embodiment, the baseboard management controller is configured to acquire the software update package of the target system management interrupt handler. This acquisition process can be implemented in various ways. For example, the baseboard management controller can periodically download the update package from a preset network server or receive the update package via local storage media (such as a USB drive). In another implementation, the baseboard management controller can be designed to proactively acquire the software update package from a designated location when a specific event is detected (e.g., a system administrator uploads an update file via a remote management interface).

[0025] S102, compile the software update package into the corresponding target format file and update it to the target file volume to obtain the updated target file volume; the target file volume is used to store the target format files corresponding to the various system management interrupt handlers in the electronic device.

[0026] In this embodiment, the target format file is an executable or loadable file formed by compiling or converting the software update package, and its format is compatible with the target runtime environment (e.g., a unified extensible firmware interface module). The target format is, for example, the .efi format.

[0027] An object file volume is a storage area used to store the object format files corresponding to various system management interrupt handlers in an electronic device. This file volume can be a logical partition, a file system, or a specific storage area.

[0028] In this embodiment, the compilation process of the acquired software update package can be performed by the baseboard management controller itself or by an auxiliary processing unit. For example, the software update package can be a source code file or an intermediate code file, which is converted by the compilation tool into a binary file that the Unified Extensible Firmware Interface Module (UEIMIM) can directly load and execute, such as a ".efi" format file. In another implementation, the software update package may already be a pre-compiled binary file, in which case only format conversion or direct copying to the target file volume is required. The target file volume can be a specific area located on the Serial Peripheral Interface (SPI) flash memory of the UEIMIM, or a logical volume located in System Management Memory (SMRAM).

[0029] Furthermore, this target file volume is used to store the target format files corresponding to various system management interrupt handlers in the electronic device. This storage method can involve storing all target format files directly in the root directory of the target file volume, or organizing them according to a specific directory structure. For example, each target format file can be assigned a unique identifier and stored along with that identifier in the target file volume for easy retrieval and management later.

[0030] S103, a notification message is sent to the Unified Extensible Firmware Interface Module based on the updated target file volume, so that the Unified Extensible Firmware Interface Module updates the target system management interrupt handler in the system management interrupt handler entry list in the Unified Extensible Firmware Interface Module based on the notification message and the updated target file volume; the system management interrupt handler entry list is used to record the system management interrupt handlers registered to the Unified Extensible Firmware Interface Module.

[0031] In this embodiment, the Unified Extensible Firmware Interface Module (UEFI module) is the firmware interface in modern computer systems that replaces the traditional BIOS. It provides hardware initialization and boot services before the operating system starts and supports the execution of system management interrupt handlers at runtime.

[0032] A notification message is a signal or data packet sent by the baseboard management controller to the Unified Scalable Firmware Interface Module (USIMM) to inform the USIMM that a new software update is available and to trigger the USIMM to perform the corresponding update operation.

[0033] The System Management Interrupt Handler Entries List (SMI Entries List) is a data structure maintained internally by the Unified Extensible Firmware Interface (UMI) module. It records all system management interrupt handlers registered with the module. This list enables the UMI module to schedule and execute the appropriate system management interrupt handler based on the type of received system management interrupt.

[0034] In this embodiment, the sending of the notification message can be triggered by the baseboard management controller through a specific communication interface (e.g., System Management Bus (SMBus) or General Purpose Input / Output (GPIO)). For example, the baseboard management controller can send a simple interrupt signal to the Unified Extensible Firmware Interface (UESI) module or write a specific register value to indicate that an update operation has occurred.

[0035] Therefore, based on the notification message and the updated target file volume, the Unified Extensible Firmware Interface (UEMI) module updates the target system management interrupt handler in its internal system management interrupt handler entry list. This update process may include the UEMI module receiving the notification message, directly loading the new target format file from the target file volume, and replacing the corresponding old handler in the entry list. For example, the UEMI module may iterate through the system management interrupt handler entry list, find the entry that matches the target system management interrupt handler, and then replace the old version pointed to by that entry with the new version from the target file volume.

[0036] The system management interrupt handler entry list is used to record system management interrupt handlers registered with the Unified Extensible Firmware Interface (UEMI) module. Therefore, by updating the target system management interrupt handler in the system management interrupt handler entry list, a new target system management interrupt handler is registered with the UEMI module.

[0037] Through the aforementioned update mechanism, the system management interrupt handlers in the system management interrupt handler entry list are updated in real time without interrupting the operation of the entire system. Therefore, when a new system management interrupt occurs subsequently, the unified extensible firmware interface module will schedule and execute the updated, defect-free system management interrupt handler, thereby resolving the original software defects and minimizing the impact on the services running on the electronic device.

[0038] The program update method provided in this embodiment introduces a collaborative update mechanism between the baseboard management controller and the unified extensible firmware interface module. The baseboard management controller is responsible for obtaining the update package, compiling and updating the target file volume, and then sending a notification to the unified extensible firmware interface module. After receiving the notification, the unified extensible firmware interface module can directly update its internal system management interrupt handler entry list based on the updated target file volume. This design allows the system management interrupt handler update process to be completed while the system is running, realizing real-time updates of the system management interrupt handler without restarting the electronic device. This avoids business interruptions caused by system restarts, significantly improves the availability and maintenance efficiency of electronic devices, and provides a guarantee for the continuous operation of critical services.

[0039] In an optional embodiment, this application further proposes that step S103, sending a notification message to the Unified Extensible Firmware Interface module based on the updated target file volume, includes: S1031, If ​​it is determined that the updated target file volume contains an updated target format file, a notification message is sent to the Unified Extensible Firmware Interface Module.

[0040] In this embodiment, after the baseboard management controller compiles the software update package into the corresponding target format file, it can update the software update, including the corresponding target format file, to the target file volume of the UEFI Serial Peripheral Interface (SPI) flash memory by flashing the SPI flash memory. After updating the software update, including the corresponding target format file, to the target file volume, the target file volume needs to be checked to determine whether it contains a target format file that has undergone substantial changes compared to the previous version. This determination aims to avoid sending redundant notifications to the Unified Extensible Firmware Interface module when there is no actual update content. Specifically, this can be determined in several ways. For example, the baseboard management controller can calculate the checksum or hash value of the updated target format file and compare it with the checksum and / or hash value of the corresponding file stored before the update. If a difference exists, it indicates that the file has been updated. Alternatively, the file's modification timestamp or version number can also be compared to determine whether the file has been updated.

[0041] In one specific implementation, after the baseboard management controller compiles the software update package of the target system management interrupt handler into the corresponding target format file and updates it to the target file volume, the baseboard management controller can calculate the content digest of each target format file in the target file volume, for example, by generating a unique hash value using an MD5 or SHA-256 algorithm. Subsequently, the baseboard management controller compares these newly generated hash values ​​with the hash values ​​of the corresponding target format files that were previously present (or since the last successful update) in the target file volume. If a change is found in the hash value of any target format file, it can be determined that the target format file has been updated. Only when at least one target format file is determined to be updated will the baseboard management controller proceed to the step of sending a notification message to the Unified Extensible Firmware Interface Module.

[0042] Through the above technical solution, the baseboard management controller first determines whether the target file volume contains an actual target format file to be updated before sending a notification message to the unified scalable firmware interface module. This effectively avoids the unified scalable firmware interface module receiving unnecessary notifications and performing redundant update operations when there is no substantial update content, thereby significantly reducing the load on the unified scalable firmware interface module, saving system resources, and improving the efficiency and response speed of the entire program update process.

[0043] In an optional embodiment, this application further proposes sending a notification message to the Unified Extensible Firmware Interface Module (UEIMIM) module, including: calculating the verification information corresponding to the updated target file volume; sending the notification message to the UEIMIM module through the target software; the notification message including the verification information; the target software being a system management interrupt handler of the target type and registered to the UEIMIM module; enabling the UEIMIM module to receive the notification message based on the port corresponding to the target software, verify the updated target file volume based on the verification information in the notification message, and, after successful verification, update the target system management interrupt handler in the system management interrupt handler entry list of the UEIMIM module based on the updated target file volume.

[0044] In this embodiment, the verification information is a data fingerprint used to verify the integrity of the target file volume data. Its calculation method may include, but is not limited to, cyclic redundancy check (CRC), message digest algorithms (such as MD5, SHA-256), etc. Calculating the verification information provides a foundation for subsequent verification of the target file volume data integrity.

[0045] In this embodiment, the target software can be a firmware component pre-installed in the system. This target software itself is a System Management Interrupt (SMI) handler, and it has already become one of the trusted SMI handlers through the registration mechanism of the Unified Extensible Firmware Interface Module (UEIMIM). This pre-registration mechanism ensures the legitimacy and trustworthiness of the target software, providing security for subsequent communication and update operations. This allows the UEIMIM to receive notification messages based on the port corresponding to the target software. The port can be a logical port, such as a specific SMI command code, a memory-mapped register address, or a specific I / O port. By listening to or polling this specific port, the UEIMIM can identify and receive notification messages from the registered target software, thereby achieving controlled and targeted communication.

[0046] The notification message includes verification information. Embedding this verification information within the notification message allows the Unified Extensible Firmware Interface (UEMI) module to obtain critical data for verifying the integrity of the target file volume data simultaneously with the update notification. This ensures synchronized transmission of verification information and update notifications, avoiding the risk of information mismatch. Upon receiving the notification message, the UEMI module extracts the verification information and independently performs the same verification calculation on the updated target file volume. Then, it compares the calculated verification result with the verification information carried in the notification message. Only when the verification results match, confirming that the updated target file volume has not been tampered with or corrupted, will the UEMI module execute the actual update operation. This involves updating the target system management interrupt handler in the UEMI module's system management interrupt handler entry list based on the updated target file volume.

[0047] Through the above technical solution, when preparing the updated target file volume, the baseboard management controller calculates the verification information of the file volume. This verification information, serving as the "digital fingerprint" of the file volume, effectively reflects the integrity of its content. Subsequently, the baseboard management controller does not directly send a bare update notification, but instead sends a notification message through a target software pre-registered with the Unified Extensible Firmware Interface Module (UEIMIM). This target software, as a trusted system management interrupt handler of the UEIMIM, enjoys higher privileges and security in its communication. The notification message contains not only the update instruction but also the previously calculated verification information. Upon receiving the notification message from the corresponding port of this specific target software, the UEIMIM extracts the verification information. To verify the legitimacy of the update, the UEIMIM independently performs verification calculations on the updated target file volume and compares the result with the verification information in the notification message. Only when the two are completely consistent, indicating that the updated content has not been tampered with or corrupted, will the UEIMIM execute the subsequent update operation, i.e., update the target system management interrupt handler in its system management interrupt handler entry list. This mechanism introduces a strict verification mechanism and a trusted communication path during the program update process, which significantly improves the security, reliability and stability of the system management interrupt handling program update process, avoids system crashes or security vulnerabilities caused by illegal or damaged update packages, and thus ensures the robustness of the electronic device firmware environment.

[0048] In an optional embodiment, this application further proposes registering target software to a unified extensible firmware interface module, including: during the startup phase, the unified extensible firmware interface module obtains a target format file corresponding to the target software; the unified extensible firmware interface module sets the port of the target software and inserts the target format file into the system management interrupt handler entry list to register the target software to the unified extensible firmware interface module.

[0049] In this embodiment, the Unified Extensible Firmware Interface (UEMI) module acquiring the target format file corresponding to the target software during the startup phase means that the UEMI module actively identifies and loads the executable code or data of the target software during system initialization. This "startup phase" can refer to the system power-on self-test (POST) or any early stage during the initialization of the UEMI module's internal components. Acquiring the target format file can be done by scanning a preset storage area (e.g., a specific partition or file system within the UEMI module's firmware volume) or by parsing the configuration table or manifest within the UEMI module to locate and load the binary file of the target software.

[0050] The Unified Extensible Firmware Interface Module (UEMI) assigns a port to the target software, meaning it allocates a dedicated communication identifier or channel for the target software. This "port" can be a logical address, an SMM (System Management Mode) communication buffer index, or a specific range of I / O ports used by the target software to send and receive messages within the SMM environment. Port assignment can be done dynamically, selecting an unused port from the pool of available ports maintained by the UEMI, or based on predefined port information in the target software's metadata.

[0051] Inserting the target format file into the system management interrupt handler entry list means formally bringing the target software into the SMM management scope of the Unified Extensible Firmware Interface Module, enabling it to respond to specific SMI events.

[0052] In some implementations, during system startup, system management interrupt handlers scattered across various drivers are consolidated into a designated SMI file volume (SMI_FV, target file volume). Each driver does not need to register the SMI handler via code; instead, it compiles the system management interrupt handler into an independent target format file, such as a ".efi" file, and stores this file and its corresponding SMI type (HandleType GUID) in the SMI_FV. During the startup phase, the Unified Extensible Firmware Interface (UEMI) module inserts the target software as the first node into the SMI entry list. Then, the UEMI module verifies and loads the SMI_FV into system managed memory (SMRAM) based on the target software; next, it inserts all SMI handlers from the SMI_FV into the SMI entry list; and finally, it boots into the operating system (OS).

[0053] The above technical solution completes the registration of the target software during the system startup phase, ensuring that the target software, as a system management interrupt handler, can be recognized and managed by the Unified Extensible Firmware Interface Module (UEIMIM). By setting a dedicated port and inserting it into the system management interrupt handler entry list, a stable communication channel and a clear execution entry point are provided for the target software. This enables the target software to reliably execute its functions. For example, during subsequent program updates, it can send notification messages containing verification information to the UEIMIM based on its registered identity and port, thus ensuring the smoothness and security of the entire update process. This avoids update failures caused by incorrect registration or inability to communicate with the target software, significantly improving the robustness and reliability of the system management interrupt handler update mechanism.

[0054] In an optional embodiment, such as Figure 3 As shown, the Unified Extensible Firmware Interface (UEMI) module updates the target system management interrupt handlers in the system management interrupt handler entry list within the UEMI module based on the notification message and the updated target file volume. This includes: S301, the Unified Extensible Firmware Interface Module, removes all target format files corresponding to system management interrupt handlers from the system management interrupt handler entry list based on notification messages.

[0055] S302, re-insert all target format files in the updated target file volume into the system management interrupt handler entry list to update the target system management interrupt handler in the system management interrupt handler entry list of the unified extensible firmware interface module.

[0056] In this embodiment, the system management interrupt handler entry list is a data structure maintained internally by the Unified Extensible Firmware Interface (UEMI) module to record all registered system management interrupt handlers. When a system management interrupt occurs, the UEMI module calls the corresponding handler based on this list. Removing the target format files corresponding to all system management interrupt handlers from the system management interrupt handler entry list aims to clear all registered system management interrupt handlers in the current UEMI module. This ensures that during the update process, old, potentially invalid, or incompatible system management interrupt handlers will not interfere with new system management interrupt handlers, thus providing a clean update environment. This can be achieved by directly resetting or clearing the entire list data structure, restoring it to its initial empty state. Re-inserting all target format files from the updated target file volume into the system management interrupt handler entry list involves re-registering all target format files in the target file volume containing the latest system management interrupt handlers into the UEMI module's system management interrupt handler entry list. This ensures that all the latest system management interrupt handlers can be correctly recognized and called by the UEMI module.

[0057] Through the above technical solution, the unified extensible firmware interface module, upon receiving an update notification, no longer simply replaces or modifies individual system management interrupt handler entries, but instead performs a comprehensive clearing and rebuild operation. This "remove all first, then reinsert all" strategy effectively avoids problems such as old version remnants, data inconsistencies, or list fragmentation in the system management interrupt handler entry list. Especially when there are complex dependencies between system management interrupt handlers or strict execution order requirements, this overall update method ensures that all system management interrupt handlers are registered and managed in a completely new and consistent state, thereby significantly improving the reliability, stability, and security of system management interrupt handler updates and reducing the risk of system anomalies or security vulnerabilities caused by incomplete updates.

[0058] In an optional embodiment, this application further proposes a unified extensible firmware interface module that removes the target format files corresponding to other system management interrupt handlers besides the target software from the system management interrupt handler entry list based on notification messages.

[0059] Specifically, the target software is a special system management interrupt handler. When other system management interrupt handlers are updated, they all need to send a notification message to the Unified Extensible Firmware Interface Module (UEIMIM) through this target software. Therefore, this target software is dedicated to system management interrupt handler updates, allowing the UEIMIMIM to selectively remove the target format files corresponding to all other system management interrupt handlers in the list, except for this target software, upon receiving the notification message.

[0060] By employing the aforementioned technical solution, the unified and extensible firmware interface module avoids indiscriminate uninstallation and reloading of the target software when updating the system management interrupt handler entry list. This significantly reduces unnecessary system resource consumption and the potential risk of software update interruption during the update process. Especially when updating the target software is not required, this solution effectively maintains the continuity and stability of the target software's operation, thereby improving the efficiency of program updates and the overall reliability of the system.

[0061] In an optional embodiment, this application further proposes the steps of compiling the software package into a corresponding target format file and updating it to the target file volume, including: determining the registration type information corresponding to the target system management interrupt handler; updating the target format file and the corresponding registration type information to the target file volume; and enabling the Unified Extensible Firmware Interface Module to update the target system management interrupt handler in the list of system management interrupt handler entries in the Unified Extensible Firmware Interface Module based on the target format file and the corresponding registration type information in the updated target file volume.

[0062] In this embodiment, each entry in the system management interrupt handler entry list can correspond to an SMI type, supporting multiple types (including root SMI, software SMI (SwSmi), periodic SMI (PeriodicSmi), etc.), and users can also extend and customize SMI types; SMI types are distinguished by a globally unique identifier (GUID) for HandleType; each SMI type corresponds to an SMI handler list, and multiple SMI handlers can be registered for one type.

[0063] Registration type information is specific categorized data used to identify the target system management interrupt handler when it is registered or loaded in the Unified Extensible Firmware Interface (UEMI) module. It guides the UEMI module on how to correctly identify, initialize, manage, or invoke the handler. As one possible implementation, registration type information can be predefined in the metadata of the software update package, for example, as a field in the update package header or configuration file, which the baseboard management controller can read and extract when parsing the software update package. In another possible implementation, registration type information can also be dynamically determined or inferred by the baseboard management controller based on the characteristics of the target system management interrupt handler or its expected function in the system. For example, its registration type can be determined by analyzing the handler's code structure, entry point, or dependencies.

[0064] Updating the target format file and its corresponding registration type information to the target file volume ensures that the Unified Extensible Firmware Interface (UEMI) module can obtain complete, self-describing handler information during subsequent processing. This enables the UEMI module to perform differentiated management of different handlers based on the registration type information.

[0065] In some implementations, when the Unified Extensible Firmware Interface module receives an SMI request, it iterates through the SMI entry list and checks the corresponding HandleType; then it calls the corresponding type of system interrupt handler (e.g., for Type N type, it calls TypeNHandler1, TypeNHandler2...TypeNHandlerM in sequence); and exits after the SMI request is processed.

[0066] By employing the above technical solution, during the process of compiling the software update package into a target format file and updating it to the target file volume, the registration type information corresponding to the target system management interrupt handler is simultaneously determined. The target format file and its corresponding registration type information are then updated to the target file volume together. This allows the Unified Extensible Firmware Interface (UEMI) module to accurately identify and differentiate different system management interrupt handlers based on this registration type information when updating the list of system management interrupt handler entries. This effectively solves the classification error problem caused by insufficient context information during update processing by the UEMI module, ensuring that the updated system management interrupt handlers can be correctly loaded, initialized, and managed, thereby significantly improving the reliability of firmware updates and the stability of the system.

[0067] According to embodiments of this application, this application also provides an electronic device. This electronic device, as... Figure 4As shown, the system includes a baseboard management controller 41, which is used to acquire a software update package for a target system management interrupt handler; compile the software update package into a corresponding target format file and update it to a target file volume to obtain an updated target file volume; the target file volume is used to store the target format files corresponding to each system management interrupt handler in the electronic device; and sends a notification message to a unified extensible firmware interface module 42 based on the updated target file volume. The unified extensible firmware interface module 42 is used to update the target system management interrupt handler in the system management interrupt handler entry list in the unified extensible firmware interface module 42 based on the notification message and the updated target file volume; the system management interrupt handler entry list is used to record the system management interrupt handlers registered to the unified extensible firmware interface module 42.

[0068] In this embodiment, the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.

[0069] This embodiment combines the baseboard management controller and the unified extensible firmware interface module with a dynamic update mechanism, thereby directly updating the system management interrupt handler entry list during system runtime and avoiding service interruptions caused by system restarts. Specifically, after obtaining the software update package, the baseboard management controller compiles it into a target format file and updates it to the target file volume. It then triggers the unified extensible firmware interface module to perform a partial update operation by sending a notification message. Upon receiving the notification message, the unified extensible firmware interface module directly updates specific entries in the system management interrupt handler entry list based on the updated target file volume, without reinitializing the entire firmware environment. This design allows the firmware update process to be completed seamlessly during operating system runtime, significantly improving system availability and maintenance efficiency.

[0070] This application further proposes that the electronic device also includes a unified scalable firmware interface module serial peripheral interface for storing target file volumes.

[0071] In this embodiment, the serial peripheral interface of the Unified Extensible Firmware Interface (UEFI) module is a non-volatile memory, typically connected to the UEFI module in the form of a Serial Peripheral Interface (SPI). Its primary function is to provide persistent data storage space for the UEFI module, ensuring that critical firmware, configuration information, or update data are retained even after system power loss. This interface can be a standalone SPI flash memory chip or a specific storage area integrated on the motherboard. For example, it could be a reserved partition in an SPI flash memory chip used to store the UEFI firmware itself, or a separate SPI flash memory module dedicated to storing System Management Mode (SMM) related data. "Using it to store the target file volume" means that the UEFI module's serial peripheral interface is configured or designated to store the updated target file volume generated by the board management controller. This means that the updated target file volume, after being generated, is written to this non-volatile memory, rather than simply stored in volatile memory. For example, the baseboard management controller can write the updated target file volume to the specified address space of the serial peripheral interface of the unified extensible firmware interface module through a specific communication protocol or hardware interface; or, after receiving the update notification, the unified extensible firmware interface module can actively obtain it from the baseboard management controller and write it into its own serial peripheral interface.

[0072] By storing the updated target file volume in the serial peripheral interface of the unified extensible firmware interface module (UEIMMT), the problem of insufficient update data persistence is effectively solved. This ensures that even after a system power outage or restart, the UEIMMT can always access the latest and correct system management interrupt handler update data, thereby significantly improving the reliability and stability of the program update process. Furthermore, this storage method avoids update failures or system management interrupt handler malfunctions due to data loss on temporary storage media, guaranteeing the continuous effectiveness of electronic device system management functions.

[0073] This application further proposes an electronic device that also includes system management memory. A unified extensible firmware interface module is used to load an updated target file volume into the system management memory based on a notification message; and to update the target system management interrupt handler in the system management interrupt handler entry list within the unified extensible firmware interface module based on the updated target file volume in the system management memory.

[0074] System Management RAM (SMRAM) is a special memory area in a computer system, typically reserved and protected by the Unified Extensible Firmware Interface (UEFI) module or BIOS during system startup. It is independent of regular memory accessible by the operating system and is used to store and execute code in System Management Mode (SMM), such as system management interrupt handlers. Its main function is to provide a secure, isolated environment to prevent unauthorized access or tampering of SMM code by the operating system or other software, thereby ensuring the integrity and security of system management functions. SMRAM can be a physical memory area, with address mapping and access control by the memory controller, ensuring it can only be accessed in SMM mode; alternatively, it can be a specific area reserved within the memory controller and protected by hardware mechanisms.

[0075] Through the above technical solution, electronic devices, by introducing system management memory and utilizing its secure isolation characteristics, ensure the integrity and security of the system management interrupt handler update process. This significantly enhances the reliability of the update process and effectively prevents malware or unauthorized access from interfering with or tampering with the system management interrupt handler update. Simultaneously, performing update operations in system management memory improves update efficiency and reliability, ensuring the system can operate stably and securely after the update.

[0076] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.

[0077] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0078] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A program update method, comprising: The baseboard management controller obtains the software update package for the target system management interrupt handler; The software update package is compiled into the corresponding target format file and updated to the target file volume to obtain the updated target file volume; The target file volume is used to store the target format files corresponding to the various system management interrupt handlers in the electronic device; A notification message is sent to the Unified Extensible Firmware Interface Module (UEIMIM) based on the updated target file volume, so that the UEIMIM updates the target system management interrupt handler in the system management interrupt handler entry list in the UEIMIM based on the notification message and the updated target file volume; the system management interrupt handler entry list is used to record system management interrupt handlers registered to the UEIMIM.

2. The program update method according to claim 1, wherein a notification message is sent to the unified extensible firmware interface module based on the updated target file volume, comprising: If it is determined that an updated target format file exists in the updated target file volume, a notification message is sent to the unified extensible firmware interface module.

3. The program update method according to claim 2, sending a notification message to the unified extensible firmware interface module, including: Calculate the verification information corresponding to the updated target file volume; The target software sends a notification message to the Unified Extensible Firmware Interface module. The notification message includes the verification information; The target software is a system management interrupt handler of the target type and is registered to the Unified Extensible Firmware Interface Module; so that the Unified Extensible Firmware Interface Module receives the notification message based on the port corresponding to the target software, verifies the updated target file volume based on the verification information in the notification message, and updates the target system management interrupt handler in the system management interrupt handler entry list in the Unified Extensible Firmware Interface Module based on the updated target file volume after the verification passes.

4. The program update method according to claim 3, wherein the target software is registered to the unified extensible firmware interface module, comprising: During the startup phase, the unified and extensible firmware interface module obtains the target format file corresponding to the target software. The Unified Extensible Firmware Interface module sets the port of the target software and inserts the target format file into the system management interrupt handler entry list to register the target software with the Unified Extensible Firmware Interface module.

5. The program update method according to any one of claims 1-4, wherein the unified and extensible firmware interface module updates the target system management interrupt handler in the system management interrupt handler entry list in the unified and extensible firmware interface module based on the notification message and the updated target file volume, comprising: Based on the notification message, the unified and extensible firmware interface module removes all target format files corresponding to system management interrupt handlers from the system management interrupt handler entry list; All target format files in the updated target file volume are reinserted into the system management interrupt handler entry list to update the target system management interrupt handler in the system management interrupt handler entry list of the unified extensible firmware interface module.

6. The program update method according to claim 5, wherein the unified extensible firmware interface module, based on the notification message, removes all target format files corresponding to system management interrupt handlers from the system management interrupt handler entry list, including: Based on the notification message, the unified and extensible firmware interface module removes the target format files corresponding to other system management interrupt handlers besides the target software from the system management interrupt handler entry list.

7. The program update method according to claim 1, comprising compiling the software package into a corresponding target format file and updating it to the target file volume, including: Determine the registration type information corresponding to the target system management interrupt handler; Compile the software package into the corresponding target format file; The target format file and its corresponding registration type information are updated in the target file volume; so that the unified extensible firmware interface module updates the target system management interrupt handler in the system management interrupt handler entry list in the unified extensible firmware interface module based on the target format file and its corresponding registration type information in the updated target file volume.

8. An electronic device, comprising: The baseboard management controller is used to obtain the software update package for the target system management interrupt handler; The software update package is compiled into the corresponding target format file and updated to the target file volume to obtain the updated target file volume; The target file volume is used to store the target format files corresponding to the various system management interrupt handlers in the electronic device; A notification message is sent to the Unified Extensible Firmware Interface module based on the updated target file volume. The Unified Extensible Firmware Interface Module is used to update the target system management interrupt handler in the system management interrupt handler entry list in the Unified Extensible Firmware Interface Module based on the notification message and the updated target file volume; the system management interrupt handler entry list is used to record system management interrupt handlers that have been registered to the Unified Extensible Firmware Interface Module.

9. The electronic device according to claim 8, further comprising: A unified and scalable firmware interface module serial peripheral interface is used to store the target file volume.

10. The electronic device according to claim 8 or 9, further comprising: System manages memory; The unified and extensible firmware interface module is used to load the updated target file volume into the system management memory based on the notification message; Based on the updated target file volume in the system-managed memory, update the target system-managed interrupt handler in the list of system-managed interrupt handler entries in the unified extensible firmware interface module.