A dynamic updating method for running program, embedded controller and electronic device

By implementing a dynamic update method of running programs in electronic devices, the embedded controller automatically updates the running program based on chip type information, which solves the problem that the embedded controller cannot adaptively select a suitable running program, and improves the degree of automation and production efficiency.

CN113778482BActive Publication Date: 2024-10-15CHINA GREATWALL TECH GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110921204.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-11
Publication Date
2024-10-15
Estimated Expiration
2041-08-11

AI Technical Summary

Technical Problem

During the notebook assembly process, the embedded controller cannot adaptively select a suitable running program, resulting in a low degree of automation and the need for human intervention.

Method used

By implementing a dynamic update method of running programs in electronic devices, the embedded controller obtains the chip type information after receiving the boot command, obtains the corresponding running program based on matching, and automatically updates the running program of the embedded controller.

Benefits of technology

It realizes running program updates without human intervention, improves the automation of embedded controllers, simplifies the notebook assembly process, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113778482B_ABST
    Figure CN113778482B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of computer technology, and provides a method for dynamically updating a running program, an embedded controller and an electronic device, which are applied to the embedded controller in the electronic device. The method comprises: in response to a first power-on instruction, obtaining a first running program, wherein the first running program is any running program stored in the electronic device that can start the electronic device, running the first running program, obtaining type information of a chip controlled by the embedded controller, and when the first running program does not match the type information of the chip, obtaining a second running program that matches the type information of the chip. The present application obtains the type information of the chip, and then determines the required running program based on the type information, without the need for human intervention and selection, thereby achieving automatic updating of the running program in the embedded controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular relates to a method for dynamically updating a running program, an embedded controller, and an electronic device. Background Art

[0002] An embedded controller is a control system that is used to perform specified independent control functions and has the ability to process data in a complex manner. It can complete various automated processing tasks such as monitoring and control.

[0003] In the notebook manufacturing process, due to the lack of a certain type of chip, other chips need to be used instead. If the notebook is manufactured with a replacement chip, the operating program of the embedded controller needs to be changed accordingly. When assembling the notebook, it is necessary to manually select the appropriate operating program of the embedded controller according to the type of chip used, and the degree of automation is low. Summary of the invention

[0004] The embodiments of the present application provide a method for dynamically updating a running program, an embedded controller, and an electronic device, which can solve the problem that the embedded controller cannot adaptively select a suitable running program when assembling a notebook.

[0005] In a first aspect, an embodiment of the present application provides a method for dynamically updating a running program, which is applied to an embedded controller in an electronic device, comprising:

[0006] In response to the first power-on instruction, obtaining a first operating program, wherein the first operating program is any operating program stored in the electronic device that can start the electronic device;

[0007] Running the first running program to obtain type information of the chip controlled by the embedded controller;

[0008] When the first operating program does not match the type information of the chip, a second operating program matching the type information of the chip is obtained, wherein the electronic device stores operating programs corresponding to different types of chips, and the second operating program is used to implement the embedded controller's control of the chip.

[0009] In a second aspect, an embodiment of the present application provides an embedded controller, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the dynamic update method of the running program described in any one of the first aspects above when executing the computer program.

[0010] In a third aspect, an embodiment of the present application provides an embedded controller, including:

[0011] A first program running module, configured to obtain a first running program in response to a first startup instruction, wherein the first running program is any running program stored in the electronic device that can start the electronic device;

[0012] A type information determination module, used for running the first running program to obtain type information of the chip controlled by the embedded controller;

[0013] The target running program determination module is used to obtain a second running program that matches the type information of the chip when the first running program does not match the type information of the chip, wherein the electronic device stores running programs corresponding to different types of chips, and the second running program is used to implement the embedded controller's control of the chip.

[0014] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: the embedded controller and basic input and output system chip described in the second aspect above;

[0015] The basic input and output system chip is used to store operating programs respectively matched with at least two types of chips, wherein the at least two types of chips are chips controlled by the embedded controller.

[0016] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and wherein when the computer program is executed by a processor, the method for dynamically updating a running program as described in any one of the first aspects above is implemented.

[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method for dynamically updating a running program as described in any one of the above-mentioned first aspects.

[0018] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0019] The beneficial effects of the embodiments of the present application compared with the prior art are: the embedded controller responds to a first power-on instruction, obtains a first operating program, runs the first operating program, obtains the type information of the chip controlled by the embedded controller, and when the first operating program does not match the type information of the chip, obtains a second operating program that matches the type information of the chip; the present application obtains the type information of the chip and then determines the required operating program based on the type information, without the need for human intervention and selection, thereby achieving automatic updating of the operating program in the embedded controller. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0022] Figure 2 It is a flowchart of a method for dynamically updating a running program provided in an embodiment of the present application;

[0023] Figure 3 is a flowchart of a method for obtaining a second running program provided in an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of the structure of an embedded controller provided by an embodiment of the present application;

[0025] Figure 5 It is a schematic diagram of the structure of an embedded controller provided in another embodiment of the present application. DETAILED DESCRIPTION

[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0027] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0028] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0029] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0030] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0031] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0032] Figure 1 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application, referring to Figure 1 The electronic device includes: an embedded controller 10 and a basic input and output system chip 20.

[0033] The basic input and output system chip 20 is used to store operating programs respectively matched with at least two types of chips, wherein the at least two types of chips are chips controlled by the embedded controller.

[0034] In this embodiment, the BIOS (Basic Input Output System) is stored in the BIOS chip 20, and the BIOS stores operating programs matching at least two types of chips, which are controlled by an embedded controller and involve material replacement.

[0035] For example, if the chips controlled by the embedded controller 10 include chips of project A and project B, where project A can be divided into α material chips and β material chips, and project B can include α material chips and β material chips, then the basic input and output system can include the operating program of the α material chip of project A, the operating program of the β material chip of project A, the operating program of the α material chip of project B, and the operating program of the β material chip of project B.

[0036] The embedded controller 10 (embedded controller-EC) is used to implement the following method for dynamically updating the running program.

[0037] In this embodiment, the running programs in the embedded controller 10 are all in the form of bin files, and each bin file can be called a firmware. The embedded controller 10 obtains the firmware from the BIOS.

[0038] In this embodiment, the electronic device may be a notebook, or other devices having an embedded controller 10 and a basic input / output system chip 20. For ease of description, the electronic device is described as a notebook in this application.

[0039] The following combination Figure 1 The dynamic update method of the running program in the embodiment of the present application is described in detail.

[0040] Figure 2 A schematic flow chart of a method for dynamically updating a running program provided by the present application is shown, referring to Figure 2 , the method is described in detail as follows:

[0041] S101, in response to a first power-on instruction, obtaining a first operating program, wherein the first operating program is any operating program stored in the electronic device that can start the electronic device.

[0042] In this embodiment, after receiving the first startup instruction, the embedded controller obtains the first operating program from the basic input and output system. The first start instruction may be a startup instruction when the notebook is operated for the first time. The first operating program may be any operating program stored in the basic input and output system.

[0043] In this embodiment, the first operating program may be any operating program that matches the chip.

[0044] For example, if the BIOS stores an operating program for the α material chip of Project A and an operating program for the β material chip of Project A, the first operating program may be an operating program for the α material chip of Project A or an operating program for the β material chip of Project A.

[0045] Specifically, after receiving the first power-on instruction, the EC can send a program acquisition instruction to the BIOS. After the BIOS obtains the program acquisition instruction sent by the EC, it arbitrarily assembles a running program, which is recorded as the first running program in this application, and sends the first running program to the EC, or after the EC assembles the first running program in the BIOS, the EC obtains the first running program from the BIOS.

[0046] S102: Run the first running program to obtain type information of the chip controlled by the embedded controller.

[0047] In this embodiment, the first operating program may include a first subprogram and a second subprogram, wherein the first subprogram is used to start the electronic device and read the type information of the chip, and the second subprogram is used to configure the chip and control the operation of the chip.

[0048] Specifically, when the first running program is run, the first subprogram is run first, and the second subprogram is not run first. The level signal of the general input / output port pin in the embedded controller is read by running the first subprogram in the first running program, and then the type information of the chip is determined according to the level signal.

[0049] In this embodiment, the embedded controller includes at least one general purpose input / output port pin, and the general purpose input / output port pin in the embedded controller is connected to the chip. Different level signals of the general purpose input / output port pin represent different type information of the chip, which can be specifically configured as needed. The type information of the chip may include the project type of the chip and the material of the chip, and the project type can be used to characterize the function of the chip, etc. Different level signals of a general purpose input / output port pin can correspond to different materials of a chip of a project.

[0050] In this embodiment, different types of chips correspond to different level signals of the universal input / output port pins. Specifically, different types of chips pull down or up the level signal of the universal input / output port pins. For example, the A-project α material chip pulls up the level signal of the universal input / output port pin 1 to a high level signal, and the A-project β material chip pulls down the level signal of the universal input / output port pin 1 to a low level signal.

[0051] For example, if the embedded controller includes two general input / output pins, which are respectively recorded as the first pin and the second pin, the high level of the first pin can be used to characterize the α material chip of project A, the low level of the first pin can be used to characterize the β material chip of project A, the high level of the second pin can be used to characterize the α material chip of project B, and the low level of the second pin can be used to characterize the β material chip of project B.

[0052] S103, when the first operating program does not match the type information of the chip, obtain a second operating program that matches the type information of the chip, wherein the electronic device stores operating programs corresponding to different types of chips, and the second operating program is used to implement the embedded controller's control of the chip.

[0053] In this embodiment, after obtaining the type information of the chip, it can be determined whether the first running program matches the type information of the chip. If the first running program does not match the type information, the first running program is not a program for running the chip, and the chip cannot be controlled. It is necessary to find a running program that matches the chip again to achieve the purpose of controlling the operation of the chip. Which type information the specific first running program matches has been obtained when the EC obtains the program from the BIOS.

[0054] In this embodiment, if the type information of the running program does not match that of the chip, it means that the running program is not a program for running the chip and cannot achieve the effect of running the chip. Otherwise, it can be determined that the running program is a program for running the chip.

[0055] For example, if the first running program is a program for running a chip made of α material of Project A, and the type information of the chip obtained is β material of Project A, then the first running program does not match the type information.

[0056] In this embodiment, the second operating program can be obtained from BIOS.

[0057] In this embodiment, if the first operating program matches the type information of the chip, the second subroutine in the first operating program is executed to configure the chip and control the operation of the chip.

[0058] In an embodiment of the present application, the embedded controller responds to a first power-on instruction, obtains a first operating program, runs the first operating program, obtains the type information of the chip controlled by the embedded controller, and when the first operating program does not match the type information of the chip, obtains a second operating program that matches the type information of the chip; the present application obtains the type information of the chip, and then determines the required operating program according to the type information, without the need for human intervention and selection, thereby realizing automatic updating of the operating program in the embedded controller. The present application stores the operating programs of multiple chips in the BIOS, completes the normalization of the program, and when assembling the notebook, the same BIOS can be used to complete the assembly, without the need to replace the BIOS according to the type of chip, thereby improving the production efficiency of the notebook.

[0059] like Figure 3 As shown, in a possible implementation manner, the implementation process of step S103 may include:

[0060] S1031, sending the chip type information to the basic input output system, wherein the chip type information is used to instruct the basic input output system to obtain the second operating program based on the chip type information, and to send a completion notification to the embedded controller after obtaining the second operating program.

[0061] In this embodiment, after the EC obtains the chip type information, it is necessary to obtain the operating program that matches the chip type information from the BIOS, which is recorded as the second operating program in this application. Specifically, after the BIOS obtains the chip type information sent by the EC, it can search or assemble the second operating program corresponding to the type information based on the chip type information. After the BIOS finds the second operating program, it can delete all other operating programs in the BIOS, leaving only the second operating program in the BIOS, so that the data stored in the BIOS is reduced and storage space is saved.

[0062] S1032: After receiving the completion notification sent by the basic input and output system, obtain the second running program from the basic input and output system, and overwrite the first running program with the second running program.

[0063] In this embodiment, after receiving the completion notification sent by BIOS, the EC obtains the second running program through the software mirroring method and saves the second running program to ensure that the second running program can be directly run when the notebook is turned on next time. During each subsequent operation of the notebook, there is no need to update the running program in the embedded controller.

[0064] In a possible implementation, after step S103, the method may further include:

[0065] In response to a second power-on instruction, the second operating program is executed, and the second power-on instruction is any power-on instruction after the first power-on instruction.

[0066] In this embodiment, the notebook can be restarted after the second running program is obtained, and the notebook can run the second running program after the notebook is restarted.

[0067] Specifically, the second operating program may include a third subprogram and a fourth subprogram. The first subprogram may be the same as the first subprogram in the first operating program, and the third subprogram and the first subprogram are both programs for starting the notebook and reading the type information of the chip. The fourth subprogram is used to configure the corresponding chip and control the operation of the chip.

[0068] Specifically, after receiving the second power-on instruction, the third subroutine in the second operating program is run to obtain the type information of the chip controlled by the embedded controller. Since the second operating program is an operating program that matches the chip type information, the chip can be configured and the chip operation can be controlled based on the second operating program, that is, the fourth subroutine can be directly run to configure the chip and control the chip operation.

[0069] This application only needs to update the running program in the EC when the laptop is turned on for the first time. After the first startup, the correct running program has been found. There is no need to update the running program in the EC during the subsequent operation of the laptop, which saves the laptop operation time.

[0070] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0071] Corresponding to the dynamic update method of the running program described in the above embodiment, Figure 4 A structural block diagram of an embedded controller provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0072] Reference Figure 4 The embedded controller 200 may include: a first program running module 210, a type information determining module 220 and a target running program determining module 230.

[0073] The first program running module 210 is used to obtain a first running program in response to a first startup instruction, wherein the first running program is any running program stored in the electronic device that can start the electronic device;

[0074] A type information determination module 220, configured to run the first running program to obtain type information of a chip controlled by the embedded controller;

[0075] The target running program determination module 230 is used to obtain a second running program that matches the type information of the chip when the first running program does not match the type information of the chip, wherein the electronic device stores running programs corresponding to different types of chips, and the second running program is used to implement the control of the chip by the embedded controller.

[0076] In a possible implementation, the first program execution module 210 may be specifically used for:

[0077] The first operating program is obtained from a basic input-output system in the electronic device, wherein the basic input-output system stores operating programs matching different types of chips.

[0078] In a possible implementation, the category information determination module 220 may be specifically used to:

[0079] Reading a level signal of a general input / output port pin in the embedded controller through the first running program, wherein the general input / output port pin is connected to the chip, and the level signals of the general input / output port pins corresponding to different types of chips are different;

[0080] Based on the level signal, the type information of the chip is determined.

[0081] In a possible implementation, the target running program determination module 230 may be specifically used to:

[0082] Sending the type information of the chip to the basic input and output system, wherein the type information of the chip is used to instruct the basic input and output system to obtain the second operating program based on the type information of the chip, and to send a completion notification to the embedded controller after obtaining the second operating program;

[0083] After receiving the completion notification sent by the basic input and output system, the second operating program is obtained from the basic input and output system, and the first operating program is overwritten by the second operating program.

[0084] In a possible implementation, the type information determination module 220 is also connected to:

[0085] A program running module is used to configure the chip and control the operation of the chip based on the first running program when the first running program matches the type information of the chip.

[0086] In a possible implementation, the target running program determination module 230 is also connected to:

[0087] The second running module is used to run the second running program in response to a second startup instruction, where the second startup instruction is any startup instruction after the first startup instruction.

[0088] In a possible implementation, the second operation module may be specifically used for:

[0089] Running the second running program to obtain type information of the chip controlled by the embedded controller;

[0090] When the second operation program corresponds to the type information of the chip, the chip is configured based on the second operation program and the operation of the chip is controlled.

[0091] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0092] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0093] The present application also provides an embedded controller. Figure 5 The embedded controller 400 may include: at least one processor 410, a memory 420, and a computer program stored in the memory 420 and executable on the at least one processor 410. When the processor 410 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, for example: Figure 2 Steps S101 to S103 in the illustrated embodiment. Alternatively, when the processor 410 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 4 The functions of the modules 210 to 230 are shown.

[0094] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 420, and executed by the processor 410 to complete the present application. The one or more modules / units may be a series of computer program segments capable of completing specific functions, and the program segments are used to describe the execution process of the computer program in the embedded controller 400.

[0095] Those skilled in the art will understand that Figure 5This is only an example of an embedded controller and does not constitute a limitation of the embedded controller, which may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.

[0096] The processor 410 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0097] The memory 420 may be an internal storage unit of the embedded controller, or an external storage device of the embedded controller, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. The memory 420 is used to store the computer program and other programs and data required by the embedded controller. The memory 420 may also be used to temporarily store data that has been output or is to be output.

[0098] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0099] The dynamic update method of the running program provided in the embodiment of the present application can be applied to terminal devices such as computers, tablet computers, laptops, netbooks, personal digital assistants (PDAs), etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.

[0100] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each embodiment of the method for dynamically updating a running program can be implemented.

[0101] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal implements the steps in each embodiment of the method for dynamically updating the running program described above.

[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0103] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0104] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0105] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0106] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for dynamically updating a running program, characterized in that: Embedded controllers used in electronic devices include: In response to the first power-on instruction, obtaining a first operating program, wherein the first operating program is any operating program stored in the electronic device that can start the electronic device; Running the first running program to obtain type information of the chip controlled by the embedded controller; When the first operating program does not match the type information of the chip, obtaining a second operating program that matches the type information of the chip, wherein the electronic device stores operating programs corresponding to different types of chips, and the second operating program is used to implement control of the chip by the embedded controller; The running of the first running program to obtain the type information of the chip controlled by the embedded controller includes: Reading a level signal of a general input / output port pin in the embedded controller through the first running program, wherein the general input / output port pin is connected to the chip, and the level signals of the general input / output port pins corresponding to different types of chips are different; Based on the level signal, the type information of the chip is determined, wherein the type information includes the project type of the chip and the material of the chip, and the project type is used to characterize the function of the chip.

2. The method for dynamically updating a running program according to claim 1, characterized in that: The obtaining of the first running program comprises: The first operating program is obtained from a basic input-output system in the electronic device, wherein the basic input-output system stores operating programs matching different types of chips.

3. The method for dynamically updating a running program as claimed in claim 2, characterized in that: The obtaining of a second operating program matching the type information of the chip includes: Sending the type information of the chip to the basic input and output system, wherein the type information of the chip is used to instruct the basic input and output system to obtain the second operating program based on the type information of the chip, and to send a completion notification to the embedded controller after obtaining the second operating program; After receiving the completion notification sent by the basic input and output system, the second operating program is obtained from the basic input and output system, and the first operating program is overwritten by the second operating program.

4. The method for dynamically updating a running program according to claim 1, wherein: After obtaining the type information of the chip controlled by the embedded controller, the method further comprises: When the first operating program matches the type information of the chip, the chip is configured based on the first operating program and the operation of the chip is controlled.

5. The method for dynamically updating a running program according to claim 1, characterized in that: After acquiring the second running program corresponding to the type information of the chip, the method further comprises: In response to a second power-on instruction, the second operating program is executed, and the second power-on instruction is any power-on instruction after the first power-on instruction.

6. The method for dynamically updating a running program as claimed in claim 5, characterized in that: The running of the second running program includes: Running the second running program to obtain type information of the chip controlled by the embedded controller; When the second operation program corresponds to the type information of the chip, the chip is configured based on the second operation program and the operation of the chip is controlled.

7. An embedded controller, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for dynamically updating a running program as described in any one of claims 1 to 6 is implemented.

8. An electronic device, characterized in that: include: The embedded controller and basic input and output system chip as claimed in claim 7; The basic input and output system chip is used to store operating programs respectively matched with at least two types of chips, wherein the at least two types of chips are chips controlled by the embedded controller.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for dynamically updating a running program as claimed in any one of claims 1 to 6 is implemented.