CN117785249A - Firmware processing method, chip, system and electronic equipment - Google Patents

Firmware processing method, chip, system and electronic equipment Download PDF

Info

Publication number
CN117785249A
CN117785249A CN202311547745.5A CN202311547745A CN117785249A CN 117785249 A CN117785249 A CN 117785249A CN 202311547745 A CN202311547745 A CN 202311547745A CN 117785249 A CN117785249 A CN 117785249A
Authority
CN
China
Prior art keywords
sensor
firmware
identification
manufacturer
flash
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311547745.5A
Other languages
Chinese (zh)
Inventor
相超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311547745.5A priority Critical patent/CN117785249A/en
Publication of CN117785249A publication Critical patent/CN117785249A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/13Sensors therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a processing method, a chip, a system and electronic equipment of firmware, wherein in the method, the electronic equipment can acquire the firmware corresponding to an FP sensor in the electronic equipment based on the identification of the FP sensor when the electronic equipment is powered on, and further the firmware corresponding to the FP sensor is adopted to drive the FP sensor to acquire fingerprint information of a user, so that the problem that the electronic equipment cannot drive the FP sensor to acquire fingerprint information of the user when the user replaces the FP sensor of the electronic equipment is solved, and user experience is improved.

Description

Firmware processing method, chip, system and electronic equipment
The present application is a divisional application, the original application number is 202110963741.X, the original application date is 2021, month 08, 20, the entire contents of which are incorporated herein by reference.
Technical Field
The embodiment of the application relates to terminal technology, in particular to a processing method, a chip, a system and electronic equipment of firmware.
Background
With the development of notebook computers, the existing notebook computers can realize fingerprint and power supply integration, and users can trigger the notebook computers to start up through the fingerprints.
At present, a fingerprint sensor and a firmware of the fingerprint sensor are arranged on a notebook computer, and the firmware of the fingerprint sensor can drive the fingerprint sensor to collect fingerprint information of a user. However, if the user changes the fingerprint sensor into the fingerprint sensor of other manufacturers in the process of using the notebook computer, the firmware of the fingerprint sensor cannot drive the fingerprint sensor to work, and then the fingerprint sensor cannot collect fingerprint information of the user.
Disclosure of Invention
The embodiment of the application provides a processing method, a chip, a system and electronic equipment of firmware, which can solve the problems that a user can replace an FP sensor and the electronic equipment can not drive the FP sensor to collect fingerprint information of the user.
In a first aspect, an embodiment of the present application provides a method for processing firmware, where the method is applied to an electronic device. Wherein the method may comprise: when the fingerprint sensor FP sensor in the electronic equipment is a first FP sensor, the first firmware of the first FP sensor is operated to drive the first FP sensor to collect fingerprint information of a user. When the FP sensor in the electronic equipment is a second FP sensor, running second firmware of the second FP sensor to drive the second FP sensor to collect fingerprint information of a user, wherein the first FP sensor and the second FP sensor are different.
According to the embodiment of the application, the electronic device can run the firmware corresponding to the FP sensor based on the FP sensor in the electronic device, and further the firmware corresponding to the FP sensor is adopted to drive the FP sensor to collect fingerprint information of the user, so that the problem that the electronic device cannot drive the FP sensor to collect fingerprint information of the user when the user replaces the FP sensor of the electronic device is solved, and user experience is improved.
Wherein the first firmware and the second firmware are preset in the electronic device; alternatively, the first firmware and/or the second firmware is obtained by the electronic device from a server. It should be understood that when the first firmware and the second firmware are preset in the electronic device, the electronic device does not need to interact with the server, so that the efficiency of driving the FP sensor by the electronic device can be improved. When the first firmware and/or the second firmware are obtained from the server by the electronic device, the storage space of the electronic device can be saved.
In one possible implementation, when the electronic device is powered on, in response to powering on the electronic device, the electronic device may query whether the electronic device includes the first firmware based on the identification of the first FP sensor. Wherein, in response to the first firmware being included in the electronic device, the electronic device may run the first firmware. Alternatively, in response to the first firmware not being included in the electronic device, the electronic device may request a file of the first firmware from the server, receive the file of the first firmware from the server; and running the first firmware according to the file of the first firmware.
It should be understood that the electronic device may send the identifier of the first FP sensor to the server, where the server may obtain, based on the mapping relationship between the identifier of the FP sensor and the file of the firmware stored in the server and the identifier of the first FP sensor, the file of the first firmware corresponding to the first FP sensor.
In one possible implementation manner, when the fingerprint sensor FP sensor in the electronic device is the first FP sensor, the electronic device further adopts a driver of a first fingerprint application corresponding to the first FP sensor to drive the fingerprint application, so as to verify fingerprint information of the user acquired by the first FP sensor. When the FP sensor in the electronic equipment is the second FP sensor, the electronic equipment also adopts the drive of the second fingerprint application program corresponding to the second FP sensor to drive the fingerprint application program so as to verify the fingerprint information of the user acquired by the second FP sensor.
It should be understood that fingerprint information of users collected by different FP sensors is different, and in this embodiment of the present invention, an electronic device may use different driving of a fingerprint application program to drive the fingerprint application program, and use a verification mode corresponding to the FP sensor to verify the fingerprint information of the users collected by the FP sensor, so as to solve the problem that the fingerprint application program cannot verify the fingerprint information of the users due to mismatching between the driving of the fingerprint application program and the FP sensor.
In a second aspect, an embodiment of the present application provides a firmware processing method, applied to a micro processing unit MCU chip, where the method may include: when the electronic equipment is started, the MCU chip is electrified, and in response to the electrification of the MCU chip, the MCU chip acquires the identification of the first fingerprint sensor FP sensor. The MCU chip can acquire the first firmware of the first FP sensor based on the identification of the first FP sensor, and then the first firmware is adopted to drive the first FP sensor to acquire fingerprint information of a user.
In the embodiment of the application, when the electronic equipment is started, the MCU chip can acquire and adopt the firmware corresponding to the FP sensor to drive the FP sensor to acquire the fingerprint information of the user based on the identification of the FP sensor in the electronic equipment, so that the problem that the firmware in the electronic equipment cannot drive the FP sensor to acquire the fingerprint information of the user when the user replaces the FP sensor of the electronic equipment is solved, and the user experience is improved.
In one possible implementation manner, in response to the MCU chip powering up, the MCU chip may send a command to the first FP sensor to access a first register in the first FP sensor, where an identifier of the first FP sensor is stored; an identification of a first FP sensor from the first FP sensor is received.
Or when the electronic equipment is started, the first FP sensor is electrified, the first FP sensor responds to the first FP sensor electrification, a first signal can be sent to the MCU chip, and the first signal indicates the MCU chip to acquire the identification of the first FP sensor. The MCU chip, in response to receiving the first signal, may send a command to the first FP sensor to access a first register in the first FP sensor to receive an identification of the first FP sensor from the first FP sensor.
In one possible implementation manner, the MCU chip may obtain the identity of the manufacturer of the first FP sensor based on the identity of the first FP sensor and the first mapping relationship between the identity of the FP sensor and the identity of the manufacturer of the FP sensor, and further obtain the first firmware based on the identity of the manufacturer of the first FP sensor.
The following describes a method for acquiring a first firmware by the MCU chip based on the identification of a manufacturer of the first FP sensor:
firstly, the MCU chip can inquire whether the manufacturer identification of the first FP sensor is written in the second register of the MCU chip. If the manufacturer identification of the first FP sensor is not written in the second register, the MCU chip can determine that the first firmware of the first FP sensor is not stored in the flash of the MCU chip, and the MCU chip can send the manufacturer identification of the first FP sensor to the CPU, so that the file of the first firmware from the CPU is received.
If the manufacturer identification of the first FP sensor is written in the second register, the MCU chip can determine that the flash of the MCU chip stores the first firmware of the first FP sensor, and the MCU chip can determine the first firmware in the flash memory of the MCU chip.
In this implementation, first, the process of the MCU chip requesting the CPU for the file of the first firmware is introduced:
the MCU chip may write the identity of the manufacturer of the first FP sensor to a second register in the MCU chip and then send a second signal to the CPU. The second signal indicates the CPU to obtain the identity of the manufacturer of the first FP sensor, and the CPU can send a command for accessing the second register to the MCU chip in response to receiving the second signal. Accordingly, the MCU chip may receive a command from the CPU to access the second register, and thus, the MCU chip may send the identity of the manufacturer of the first FP sensor written in the second register to the CPU in response to the command from the CPU to access the second register.
The MCU chip responds to the received file of the first firmware from the CPU, and writes the first firmware into the flash according to the file of the first firmware, namely, stores the first firmware in the flash. The MCU chip responds to the successful writing of the first firmware and can send a message of successful upgrading to the CPU.
In this implementation, the process of the MCU chip requesting the CPU for the file of the first firmware is described next:
the flash may store a firmware, which is the firmware used by the electronic device when it is started up last time. If the manufacturer identifier of the first FP sensor is written in the second register, the MCU chip may determine that the firmware used by the electronic device last boot is the first firmware, and may use the firmware stored in the flash as the first firmware.
The second mapping relation between the firmware of the manufacturer and the identifier of the manufacturer is stored in the flash, that is, the firmware mapped by the identifier of the manufacturer of the first FP sensor in the flash can be used as the first firmware if the identifier of the manufacturer of the first FP sensor is written in the second register, and the MCU chip can determine that the firmware used by the last boot of the electronic device is stored in the flash.
And secondly, the flash memory flash of the MCU chip stores at least two firmware of manufacturers and identifiers of each manufacturer, wherein the identifiers of the manufacturers stored in the flash memory can comprise identifiers of manufacturers of the first FP sensor.
In this implementation manner, the MCU chip may use, as the first firmware, firmware mapped by the vendor identifier of the first FP sensor in the flash based on the vendor identifier of the first FP sensor.
And thirdly, storing at least two firmware of manufacturers and the identification of each manufacturer in a flash memory flash of the MCU chip.
In this implementation manner, the MCU chip may query whether the flash has the first firmware stored therein based on the identification of the vendor of the first FP sensor. If the first firmware is stored in the flash, the MCU chip can take the firmware corresponding to the manufacturer identification of the first FP sensor in the flash as the first firmware.
If the flash does not store the first firmware, the MCU chip can send the identification of the manufacturer of the first FP sensor to the CPU of the CPU and receive the file of the first firmware from the CPU. The process of the MCU chip requesting the CPU for the file of the first firmware may refer to the related description in one of the above.
Based on the above description, the MCU chip may write the first firmware of the first FP sensor into the flash, or determine the first firmware in the flash. Therefore, the MCU chip can read the first firmware in the flash into the RAM in the MCU chip so as to drive the first FP sensor to collect fingerprint information of the user.
In a third aspect, an embodiment of the present application provides a method for processing firmware, where the method is applied to a central processing unit CPU, and the method includes: receiving an identification of a manufacturer of a first fingerprint sensor FP sensor from a micro-processing unit MCU chip; acquiring a file of a first firmware of the first FP sensor according to the identification of a manufacturer of the first FP sensor; and sending the file of the first firmware to the MCU chip.
In one possible implementation manner, a mapping relationship between a file of firmware of a manufacturer and an identifier of the manufacturer is stored in a CPU, and the file of the first firmware of the first FP sensor is obtained according to the identifier of the manufacturer of the first FP sensor, including: and acquiring the file of the first firmware according to the identification of the manufacturer of the first FP sensor and the mapping relation.
In one possible implementation manner, according to the identity of the manufacturer of the first FP sensor, obtaining the file of the first firmware of the first FP sensor includes: sending the identity of the manufacturer of the first FP sensor to a firmware server; a file of a first firmware is received from a firmware server.
In one possible implementation, before receiving the identification of the manufacturer of the first fingerprint sensor FP sensor from the micro-processing unit MCU chip, the method further comprises: receiving a second signal from the MCU chip, wherein the second signal indicates the CPU to acquire the manufacturer identification of the first FP sensor, and the second signal is transmitted after the MCU chip writes the manufacturer identification of the first FP sensor into a second register in the MCU chip; in response to receiving the second signal, a command to access the second register is sent to the MCU chip.
In one possible implementation manner, after the file of the first firmware is sent to the MCU chip, the method further includes: and receiving a successful upgrading message from the MCU chip, wherein the successful upgrading message indicates that the MCU chip writes the first firmware into a flash memory flash of the MCU chip based on the file of the first firmware.
In one possible implementation manner, after receiving the message from the MCU chip that the upgrade is successful, the method further includes: acquiring a driver of a first fingerprint application program of the first FP sensor according to the identification of a manufacturer of the first FP sensor; the fingerprint application is driven using the driving of the first fingerprint application.
In a fourth aspect, an embodiment of the present application provides a firmware processing method applied to a first fingerprint sensor FP sensor, where the method may include: after the first FP sensor is powered on, a command for accessing a first register in the first FP sensor from the MCU chip can be received, and the first register stores an identifier of the first FP sensor. The first FP sensor sends an identification of the first FP sensor to the MCU chip.
In one possible implementation, before receiving the command from the micro-processing unit MCU chip to access the first register in the first FP sensor, the method further includes: the first FP sensor responds to the first FP sensor to be electrified and sends a first signal to the MCU chip, and the first signal indicates the MCU chip to acquire the identification of the first FP sensor.
In one possible implementation, the method further includes: the first FP sensor receives a reset instruction from the MCU chip; in response to the reset instruction, a reset may be performed.
In a fifth aspect, embodiments of the present application provide a chip on which a computer program is stored, which, when executed by the chip, can perform the method of the second aspect described above.
In a sixth aspect, embodiments of the present application provide a chip on which a computer program is stored, which, when executed by the chip, can perform the method of the third aspect described above.
In a seventh aspect, embodiments of the present application provide a fingerprint sensor FP sensor, where the FP sensor may include: a processor, a register, the processor being capable of performing the method as in the fourth aspect above.
In an eighth aspect, embodiments of the present application provide a firmware processing system, which may include: an MCU chip for performing the method in the second aspect, and an FP sensor for performing the method in the fourth aspect as above. In one embodiment, the firmware processing system may further comprise: a CPU for performing the method in the third aspect.
In a ninth aspect, embodiments of the present application provide an electronic device, which may include: a processor and a memory. The memory is for storing computer executable program code, the program code comprising instructions; the instructions, when executed by a processor, cause the electronic device to perform the method as in the first aspect.
Wherein the electronic device may comprise a firmware processing system as in the eighth aspect above.
In a tenth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
In an eleventh aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the method in the first aspect described above.
The advantages of each possible implementation manner of the second aspect to the eleventh aspect may be referred to above in the first aspect and the advantages of the second aspect, and are not described herein.
The embodiment of the application provides a processing method, a chip, a system and electronic equipment of firmware, wherein in the method, the electronic equipment can acquire the firmware corresponding to an FP sensor in the electronic equipment based on the identification of the FP sensor when the electronic equipment is powered on, and further the firmware corresponding to the FP sensor is adopted to drive the FP sensor to acquire fingerprint information of a user, so that the problem that the electronic equipment cannot drive the FP sensor to acquire fingerprint information of the user when the user replaces the FP sensor of the electronic equipment is solved, and user experience is improved.
Drawings
Fig. 1A is a schematic view of a scenario suitable for use in the embodiments of the present application;
FIG. 1B is a schematic diagram of a fingerprint identifier;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an embodiment of a method for processing firmware according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another embodiment of a firmware processing method according to an embodiment of the present application;
FIG. 5A is a flowchart illustrating another embodiment of a firmware processing method according to an embodiment of the present application;
FIG. 5B is a flowchart illustrating another embodiment of a firmware processing method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another embodiment of a firmware processing method according to an embodiment of the present application;
fig. 7 is a flowchart of another embodiment of a firmware processing method according to an embodiment of the present application.
Detailed Description
With the development of notebook computers, the existing notebook computers can realize two-in-one of fingerprint and power supply, and a user can trigger the notebook computers to be started by one key through the fingerprint. Fig. 1A is a schematic view of a scenario suitable for the embodiment of the present application. Referring to fig. 1A, a fingerprint identifier 10 is provided on a notebook computer, when a user touches the fingerprint identifier 10, the fingerprint identifier 10 can collect fingerprint information of the user, the notebook computer can verify the fingerprint information of the user, and after the fingerprint information of the user is verified, the notebook computer can be controlled to be started.
Fig. 1B is a schematic diagram of a fingerprint identifier. The fingerprint identifier 10 may include: fingerprint sensor (fingerprint sensor, FP sensor) 11, micro control unit (micro controller unit, MCU) 12, circuit board 13, metal bracket 14, first cover plate 15, and second cover plate 16. The micro control unit 12 may be referred to as an MCU chip 12, and in one embodiment, the MCU chip 12 may be replaced by other types of integrated circuit chips (integrated circuit chip, IC chips), such as integrated IC modules of the MCU chip and embedded controllers (embedded controller, EC). The circuit board 13 may be, but is not limited to: a flexible circuit board (flexible printed circuit, FPC) or a printed circuit board (printed circuit board, PCB). In one embodiment, the first cover plate 15 may be a sapphire cover plate and the second cover plate 16 may be a metal cover plate.
The FP sensor11 and the MCU chip 12 may be connected through a serial peripheral interface (serial peripheral interface, SPI) bus, and the MCU chip 12 may be connected through a universal serial bus (universal serial bus, USB) to a motherboard, and further to a central processing unit (central processing unit, CPU) (not shown in fig. 1B). The FP sensor11 and the MCU chip 12 are disposed on the circuit board 13, and the FP sensor11 is disposed on a side of the circuit board 13 near the first cover plate 15, and in fig. 1B, an example is illustrated where the MCU chip 12 is disposed on a side of the circuit board 13 near the second cover plate 16, and in this embodiment, the position where the MCU chip 12 is disposed on the circuit board 13 is not limited.
When the user touches the first cover plate 15, the FP sensor11 may collect fingerprint information of the user. The MCU chip 12 can acquire fingerprint information acquired by the FP sensor11 in real time. In one embodiment, the MCU chip 12 may verify the user's fingerprint information, and when the user's fingerprint information is verified, the MCU chip 12 may send a message to the CPU that the verification was successful. Alternatively, in one embodiment, the MCU chip 12 may send the user's fingerprint information to the CPU, which may verify the user's fingerprint information. In the two modes, the CPU responds to the fingerprint information verification passing of the user, and can execute the starting operation.
It should be appreciated that a user may set a fingerprint-boot password on an electronic device, and the electronic device may store the fingerprint-boot password in a memory of the electronic device, such as a hard disk. Taking the example that the CPU checks the fingerprint information of the user, the CPU can acquire the fingerprint startup password set by the user from the hard disk, and based on the fingerprint startup password, the fingerprint information acquired by the FP sensor11 is checked. In this embodiment, a specific verification process and a process of executing a boot operation by a CPU are not described in detail, and in the following embodiment, fingerprint information of a user is verified by the CPU as an example.
The FP sensor11 can collect fingerprint information of the user because: firmware (FW) of the FP sensor11 is included in the MCU chip 12. And the firmware of the FP sensor11 is used for driving the FP sensor11 to collect fingerprint information of the user. It should be understood that the firmware may drive the corresponding hardware to operate, such as an optical disc drive, a recorder, etc. all have corresponding firmware, and, by way of example, the optical disc drive may be driven to operate by the corresponding firmware of the optical disc drive.
If the FP sensor11 and the MCU chip 12 are manufactured by the manufacturer a, and the FP sensor11 is FP sensor a, and the MCU chip 12 is MCU chip a, in the manufacturing stage, the manufacturer a may burn the firmware of the FP sensor a into the MCU chip a, package the FP sensor a and the MCU chip a, attach the FP sensor a and the MCU chip a to the circuit board 13, and connect the MCU chip a with the CPU. Because the firmware for driving the FP sensor A is stored in the MCU chip A, namely the FP sensor A is matched with the MCU chip A (or the firmware in the MCU chip A), the MCU chip A can adopt the firmware of the FP sensor A to drive the FP sensor A to collect fingerprint information of a user. If the FP sensor ra is damaged during the process of using the notebook computer by the user, the FP sensor ra is replaced with the FP sensor B manufactured by the manufacturer B, because the firmware matched with the FP sensor ra is stored in the MCU chip 12, the MCU chip 12 cannot drive the FP sensor B, so that the FP sensor B cannot work, and the fingerprint of the user cannot be acquired.
Based on the problem, the embodiment of the application provides a processing method of firmware, which can burn the firmware of the FP sensor11 of a plurality of manufacturers in the MCU chip 12 in advance, or the MCU chip 12 can request the CPU to download the firmware matched with the FP sensor11, so that the MCU chip 12 can adopt the firmware matched with the FP sensor11 to drive the FP sensor11 to collect the fingerprint of the user.
It should be understood that the firmware processing method provided in the embodiments of the present application may be applied not only to a notebook computer, but also to other electronic devices including an "MCU chip and an FP sensor", for example, the electronic devices may be a tablet (portable android device, PAD), a personal digital assistant (personal digital assistant, PDA), a handheld device with a wireless communication function, a computing device, a vehicle-mounted device, or a wearable device, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self), a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), and so on. The form of the electronic device in the embodiment of the present application is not particularly limited.
Before describing the processing method of the firmware provided in the embodiment of the present application, a description is first given of the structure of the electronic device. Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 2, the electronic device includes: the system comprises a first memory, a first sensor, a display screen, a power supply, a CPU, an MCU chip and an FP sensor. It is to be understood that the configuration illustrated in this embodiment does not constitute a specific limitation on the electronic apparatus. In other embodiments of the present application, the electronic device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Wherein the first memory may be used to store one or more computer programs, the one or more computer programs comprising instructions. The first memory may include a stored program area and a stored data area. The storage program area can store an operating system; the storage area may also store one or more applications (e.g., gallery, contacts, etc.), and so forth. The storage data area may store data created during use of the electronic device, etc. Further, the first memory may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), or the like.
In one embodiment, the first memory may be a hard disk, where a fingerprint boot password set by the user and firmware of the FP sensor of each manufacturer may be stored.
The first sensor may include, but is not limited to: pressure sensor, gyroscope sensor, acceleration sensor, temperature sensor, ambient light sensor etc., the embodiment of the application does not make redundant description to the function of first sensor.
The display screen is used for displaying images, videos and other contents. The display screen includes a display panel, which may be a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like.
And the power supply is used for supplying power to all components in the electronic equipment.
The CPU can cause the electronic device to execute various functional applications, data processing, and the like by executing the above-described instructions stored in the first memory. The CPU may include: a fingerprint application (fingerprint application, FP APP) and a driver (fingerprint application driver, FP driver) for the fingerprint application. The FP driver can drive the FP APP to work and also can serve the FP APP, so that the FP APP can verify fingerprint information of a user based on a fingerprint startup password set by the user.
In one embodiment, the MCU chip 12 may include therein: the general firmware module, the register, the second memory, and the controller may be described with reference to the following related descriptions in fig. 3 and 5A. In one embodiment, the registers in MCU chip 12 may be referred to as second registers.
The second memory may include: flash memory flash. In one embodiment, the second memory may be disposed independently of the MCU chip 12 and connected to the MCU chip 12, and the manner of disposing the second memory is not limited in this embodiment. The following embodiments will be described by taking an example in which the second memory is provided in the MCU chip.
flash, which can be used to store the firmware of the FP sensor. In one embodiment, if the MCU chip 12 can verify the fingerprint information of the user, the flash may also store the fingerprint boot password set by the user.
The MCU chip 12 is configured to, after power-on, read firmware of the FP sensor from the flash into a random access memory (random access memory, RAM) in the MCU chip 12, so as to run the firmware, so that the firmware drives the FP sensor to collect fingerprint information of the user.
And the controller is used for powering on the MCU chip when the electronic equipment is started, so that the MCU chip works.
And the FP sensor is used for collecting fingerprint information of the user. The FP sensor may include a register, where the register is used to store the identifier of the FP sensor, and reference may be made to the related description in fig. 3. In one embodiment, the registers in the FP sensor may be referred to as first registers.
It should be understood that, when the MCU chip is replaced with "integrated IC module of the MCU chip and the embedded controller (embedded controller, EC)", the processing method of the MCU chip to implement the firmware in the embodiments of the present application may be the same as the process in which the MCU chip is separately provided, and reference may be made to the description in the embodiments described below.
The processing method of the firmware provided in the embodiment of the present application is described below with reference to fig. 3 and 4 on the basis of the electronic device shown in fig. 2. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 3 is a flow chart of an embodiment of a processing method of firmware provided in an embodiment of the present application, and fig. 4 is another flow chart of a processing method of firmware provided in an embodiment of the present application. Referring to fig. 3, the processing method of firmware provided in the embodiment of the present application may include:
S301, when the electronic device is started, the first FP sensor sends a first signal to the universal firmware module.
When the electronic equipment is started, the power supply can supply power to the MCU chip and the first FP sensor, and the universal firmware module in the MCU chip and the first FP sensor are electrified. After the first FP sensor is powered up, a first signal may be sent to the generic firmware module. The first signal is used for indicating the general firmware module to acquire the identification of the first FP sensor.
The first signal is an SPI interrupt signal, which may be a high level signal, for example.
S302, the general firmware module sends a command for accessing a register to the first FP sensor.
The first FP sensor comprises a register, and the register stores an identification of the first FP sensor. Illustratively, the identity of the first FP sensor is an identification number (identity document, ID) of the first FP sensor, such as 0X1234.
S303, the first FP sensor feeds back the identification of the first FP sensor to the general firmware module.
In one embodiment, the identity of the first FP sensor of different vendors may be stored in different locations of the register. Illustratively, the identity of the first FP sensor of vendor A is stored in register location 1, the identity of the first FP sensor of vendor B is stored in register location 2, the identity of the first FP sensor of vendor C is stored in register location 3, and the identity of the first FP sensor of vendor D is stored in register location 4.
The general firmware module may send a command to the first FP sensor to access the location a of the register, and if the identification of the first FP sensor from the first FP sensor can be received, the general firmware module may execute S304. If the generic firmware module fails to receive the identifier of the first FP sensor from the first FP sensor, the generic firmware module may continue to send a command to the first FP sensor to access the location B of the register, and if the generic firmware module fails to receive the identifier of the first FP sensor from the first FP sensor, the generic firmware module may execute S304. If the generic firmware module fails to receive the identification of the first FP sensor from the first FP sensor, then the command to access the location C of the register may continue to be sent to the first FP sensor.
Wherein S303 may be as in step (1) of fig. 4. It should be understood that, in the embodiment of the present application, the general firmware module supports downloading firmware corresponding to the FP sensor a-FP sensor d from the CPU, and the FP sensor with a solid frame characterizes the first FP sensor as the FP sensor installed on the electronic device, as represented by the FP sensor-FP sensor shown in fig. 4. It should be appreciated that the general firmware module is characterized in fig. 4 by an MCU chip.
In one embodiment, S301-S303 may be replaced with S301A as above: and the universal firmware module responds to the MCU chip to be electrified to acquire the identification of the first fingerprint sensor FP sensor. In this embodiment, the general firmware module detects that the MCU chip is powered on, and may read the identifier of the first FP sensor from the first FP sensor.
In one embodiment, the manner in which the generic firmware module reads the identifier of the first FP sensor from the first FP sensor in S301A may be: the generic firmware module sends a command to the first FP sensor to access a first register in the first FP sensor, and the first FP sensor, in response to the command, may send an identification of the first FP sensor to the generic firmware module.
S304, the universal firmware module queries whether the manufacturer identification of the first FP sensor is written into the register of the MCU chip according to the identification of the first FP sensor. If not, S305 is executed, and if yes, S312 is executed.
In one embodiment, a mapping relationship between the identifier of the FP sensor and the identifier of the vendor is stored in the generic firmware module, and the generic firmware module may obtain the identifier of the vendor of the first FP sensor based on the identifier of the first FP sensor and the mapping relationship. In one embodiment, the mapping relationship between the FP sensor identification and the vendor identification may be referred to as a first mapping relationship. Alternatively, in one embodiment, the identity of the first FP sensor may be the same as the identity of the manufacturer of the first FP sensor, and the generic firmware module may use the identity of the first FP sensor from the first FP sensor as the identity of the manufacturer of the first FP sensor.
After the universal firmware module obtains the manufacturer's identification of the first FP sensor, the universal firmware module can inquire whether the manufacturer's identification of the first FP sensor is written into the register of the MCU chip. It should be appreciated that the identity of the manufacturer of the FP sensor that has been written in the registers of the MCU chip may be the same as or different from the identity of the manufacturer of the first FP sensor. If the user does not replace the FP sensor all the time in the process of using the electronic device, the manufacturer identifier of the FP sensor written in the register of the MCU chip is the manufacturer identifier of the first FP sensor. If the user replaces the FP sensor on the electronic device before the electronic device is started up, the manufacturer identification of the written FP sensor in the register of the MCU chip is different from the manufacturer identification of the first FP sensor.
The general firmware module queries a register of the MCU chip, and if the written manufacturer identification in the register of the MCU chip is the same as the manufacturer identification of the first FP sensor, the written manufacturer identification of the first FP sensor in the register of the MCU chip is determined. If the written manufacturer identification in the register of the MCU chip is different from the manufacturer identification of the first FP sensor, determining that the manufacturer identification of the first FP sensor is not written in the register of the MCU chip.
S305, the universal firmware module writes the identification of the manufacturer of the first FP sensor into a register of the MCU chip.
The universal firmware module may delete the manufacturer's identification of the written FP sensor and write the manufacturer's identification of the first FP sensor into the register of the MCU chip. It should be appreciated that the generic firmware module may write the identity of the manufacturer of the first FP sensor to a preset location in the register of the MCU chip.
In one embodiment, S305 may be replaced with S305A: and the universal firmware module writes the identification of the manufacturer of the first FP sensor and the identification of the first FP sensor into a register of the MCU chip. The universal firmware module may write the manufacturer identification of the first FP sensor and the identification of the first FP sensor into a preset location in a register of the MCU chip.
S306, the universal firmware module sends a second signal to the CPU.
After the universal firmware module writes the manufacturer identification of the first FP sensor into the register of the MCU chip, a second signal can be sent to the CPU. And the second signal is used for indicating the general CPU to read the manufacturer identification of the first FP sensor in the register of the MCU chip or indicating the general firmware module to update the manufacturer identification of the first FP sensor in the register of the MCU chip. Wherein the second signal may be a high level signal.
S307, the CPU sends a command for accessing the registers of the MCU chip to the general firmware module.
The manufacturer's identification of the first FP sensor is stored at a preset location of the register of the MCU chip, and the CPU may send a command to the general-purpose firmware module to access the preset location of the register of the MCU chip.
S308, the universal firmware module feeds back the identification of the manufacturer of the first FP sensor to the CPU.
Wherein S308 may be as in step (2) of fig. 4.
In one embodiment, if the manufacturer identifier written in the preset location of the register of the MCU chip is the manufacturer identifier of the first FP sensor and the identifier of the first FP sensor, S308 may be replaced with S308A: the universal firmware module feeds back the manufacturer identification of the first FP sensor and the identification of the first FP sensor to the CPU.
S309, the CPU sends the file of the first firmware of the first FP sensor to the universal firmware module according to the identification of the manufacturer of the first FP sensor.
In one embodiment, the firmware of the FP sensor may be stored in the CPU in the form of a binary file, a data compression ZIP file, or the like, and the description of S309 characterizes the file of the firmware stored in the CPU with "firmware".
In one embodiment, the hard disk of the CPU may have at least one vendor of firmware stored therein, and in particular, the hard disk of the CPU may have at least one vendor of firmware stored therein, as well as each vendor of firmware. In other words, the CPU has a mapping relationship between a file of the firmware of the vendor and an identification of the vendor stored in the hard disk. The CPU may query the hard disk for the first firmware of the first FP sensor based on the identity of the vendor of the first FP sensor. Fig. 4 illustrates an example in which firmware of at least one vendor is stored in a hard disk of the CPU.
In one embodiment, for the same manufacturer, multiple firmware may be stored in the hard disk of the CPU correspondingly, and the FP sensor model applicable by each firmware is different. Therefore, based on the above S308A, the CPU may query the hard disk for at least one firmware corresponding to the manufacturer of the first FP sensor according to the identifier of the manufacturer of the first FP sensor, further determine the model of the first FP sensor based on the identifier of the first FP sensor, and further obtain the first firmware applicable to the first FP sensor from the at least one firmware corresponding to the manufacturer of the first FP sensor.
As above, the CPU may obtain the first firmware of the first FP sensor in the hard disk as shown in step (3) in fig. 4.
In one embodiment, the firmware is not stored in the hard disk of the CPU, and the CPU may request the first firmware of the first FP sensor from the firmware server in response to receiving the identification of the vendor of the first FP sensor. The firmware server may store at least one vendor's firmware, and each vendor's identifier, the CPU may send a firmware request to the firmware server, where the firmware request may include the identifier of the vendor of the first FP sensor, and the firmware server may send the first firmware of the first FP sensor to the CPU based on the identifier of the vendor of the first FP sensor. Accordingly, the CPU may also acquire the first firmware of the first FP sensor.
As in the above example, in the firmware server, a plurality of firmware can be stored correspondingly for the same vendor, and the FP sensor model to which each firmware is applicable is different. Thus, based on S308A above, the CPU may obtain the identity of the vendor of the first FP sensor, as well as the identity of the first FP sensor. In this embodiment, the firmware request may include an identification of the first FP sensor in addition to the identification of the vendor of the first FP sensor. Therefore, the firmware server can obtain at least one firmware corresponding to the manufacturer of the first FP sensor according to the identification of the manufacturer of the first FP sensor, further determine the model of the first FP sensor based on the identification of the first FP sensor, and further obtain the first firmware applicable to the first FP sensor from the at least one firmware corresponding to the manufacturer of the first FP sensor. In one embodiment, after the CPU obtains the first firmware of the first FP sensor, the first firmware of the first FP sensor may be sent to the general-purpose firmware module, that is, after the CPU obtains the file of the first firmware of the first FP sensor, the file of the first firmware of the first FP sensor may be sent to the general-purpose firmware module.
In order to improve the security of the file of the first firmware and avoid the CPU from sending malicious files by being invaded by a malicious terminal, in one embodiment, after obtaining the file of the first firmware of the first FP sensor, the CPU may encrypt the file of the first firmware to obtain the encrypted file of the first firmware, and send the encrypted file of the first firmware to the general firmware module. Alternatively, the CPU may encrypt the file of the first firmware using a fifth version of the message digest algorithm (message digest algorithm-5, MD5), a hash algorithm (hash), or the like.
It should be understood that whether the CPU encrypts the file of the first firmware and the encryption algorithm adopted is preset.
The CPU may send the file of the first firmware to the general-purpose firmware module as shown in step (4) in fig. 4.
To reduce the interaction signaling between the CPU and the generic firmware module, in one embodiment, S305-S309 may be replaced with S305A: the universal firmware module sends the identification of the manufacturer of the first FP sensor to the CPU so as to receive the file of the first firmware from the CPU. The manner in which the CPU obtains the file of the first firmware may be referred to the above-mentioned related description.
S310, the universal firmware module upgrades the firmware in the flash of the MCU chip based on the file of the first firmware.
The general firmware module upgrade firmware can be understood as: the general firmware module deletes the written firmware in the flash, and writes the first firmware in the flash. The general firmware module can send a deleting instruction to the flash, wherein the deleting instruction indicates the firmware written in a preset position in the flash. The Flash responds to the receiving of the deleting instruction, the written firmware in the Flash can be deleted, and a message of successful deletion is fed back to the universal firmware module. The general firmware module can send a writing instruction to the flash in response to receiving the message of successful deletion, the writing instruction can comprise first firmware, and the flash writes the first firmware into a preset position of the flash in response to the writing instruction. It should be understood that the flash successfully writes the first firmware into the preset position of the flash, and the message of the successful writing can be fed back to the general firmware module.
In order to prevent the first firmware from being damaged in the process of writing the flash into the first firmware, the universal firmware module can read the residual electric quantity from the power supply in advance, and under the condition that the residual electric quantity is greater than or equal to the preset electric quantity, when the flash fails to write the first firmware, the universal firmware module can interact with the flash to repeatedly attempt to write the first firmware. For example, if the flash fails to write the first firmware, the message of the write failure may be fed back to the general firmware module, and the general firmware module may continue to send a write instruction to the flash, so that the flash continues to write the first firmware until the flash is successfully written into the first firmware.
In one embodiment, if the CPU sends the encrypted first firmware to the general-purpose firmware module, the general-purpose firmware module may decrypt the first firmware using a preset decryption algorithm, and write the decrypted first firmware into the flash.
It should be appreciated that the firmware of FP sensor a, which is a dashed box in the MCU chip, characterizes in fig. 4 that the generic firmware module has written the first firmware into the flash.
S311, the general firmware module sends a message of successful upgrading to the CPU.
After the first firmware is written into the flash, the general firmware module can send a successful upgrading message to the CPU. It should be understood that the general firmware module performs S312 after performing S311.
S312, the general firmware module runs the first firmware.
Both S311 and S312 have no distinction of the order, and may be performed simultaneously.
The general firmware module running the first firmware can be understood as: and the universal firmware module reads the first firmware written in the flash into the RAM. The general firmware module reads the first firmware written in the flash into the RAM, specifically, copies the first firmware from the flash, and writes the first firmware into the RAM to run the first firmware.
S313, the first firmware sends a reset instruction to the first FP sensor.
And the reset instruction is used for indicating the first FP sensor to reset, and the reset can be also understood as initialization.
Taking the first FP sensor as an example of a capacitive fingerprint sensor, the resetting of the first FP sensor can be understood as: initializing the electrical characteristics of the first FP sensor to enable the first FP sensor to be in a low-power-consumption scanning state, so that when the fingerprint of a user presses the surface of the first FP sensor, the first FP sensor can obtain a fingerprint image according to the charge difference generated by the peaks and the troughs of the fingerprint, and the fingerprint image is the fingerprint information of the user acquired by the first FP sensor.
And S314, the first firmware responds to the detection of the completion of the reset of the first FP sensor and drives the first FP sensor to collect fingerprint information of the user.
The first FP sensor receives the reset instruction and may perform reset. After the first FP sensor is reset, the level value of a register in the first FP sensor is a preset value. The first firmware can access the register in real time to acquire the level value of the register, and the first firmware can determine that the first FP sensor is reset to be completed in response to detecting that the level value of the register reaches a preset value, and then the first FP sensor is driven to acquire fingerprint information of a user.
Wherein S314 may be as in step (5) of fig. 4.
In the embodiment of the application, when the universal firmware module detects that the identity of the manufacturer of the first FP sensor is not written into the register of the MCU chip, the replacement of the FP sensor on the electronic device can be determined, the universal firmware module can request the CPU for the first firmware matched with the first FP sensor, after the universal firmware module successfully installs the first firmware, the first firmware can drive the first FP sensor to collect fingerprint information of a user, and the problem that the FP sensor cannot work due to the replacement of the FP sensor of the electronic device can be solved.
In one embodiment, in the manufacturing stage, the firmware of the FP sensor of a plurality of different manufacturers may be burned in the flash of the MCU chip in advance, and in this embodiment, when the electronic device is turned on, the general firmware module may obtain the first firmware of the first FP sensor from the flash based on the identifier of the manufacturer of the first FP sensor, which is higher in driving efficiency compared with the method shown in fig. 3, without requesting the CPU to obtain the first firmware.
The following describes a processing method of firmware provided in the embodiment of the present application with reference to fig. 5A and 6. Referring to fig. 5A, S304-S312 described above may be replaced with:
S304A, the universal firmware module runs the first firmware of the first FP sensor in the flash according to the identification of the first FP sensor.
The generic firmware module may obtain the identity of the vendor of the first FP sensor based on the identity of the first FP sensor, with reference to the related description in S304.
The flash stores the second mapping relation between the firmware of the FP sensor of different manufacturers and the identification of the manufacturer. The universal firmware module can determine the firmware corresponding to the identification of the manufacturer of the first FP sensor in the flash based on the identification of the manufacturer of the first FP sensor, namely the first firmware of the first FP sensor.
The general firmware module may run the first firmware of the first FP sensor in the flash, that is, the general firmware module writes the first firmware of the first FP sensor in the flash into the RAM, which may be described with reference to the related description in the foregoing embodiment.
The steps of the embodiments of the present application may be as shown in (1A) and (1B) in fig. 6.
In the embodiment of the application, the firmware of the FP sensor of a plurality of different manufacturers can be burnt in the flash of the MCU chip in advance, and when the electronic equipment is started, the universal firmware module can obtain the first firmware of the first FP sensor from the flash based on the identification of the first FP sensor, so that the purpose of driving the first FP sensor to work by the first firmware can be achieved, and the efficiency of driving the first FP sensor can be improved.
In one embodiment, the FP sensor may be updated, and the firmware of the manufacturer burned in advance in the generic firmware module may not match the FP sensor, and in this embodiment, referring to fig. 5B, S304 in the above embodiment may be replaced by:
S304B, the universal firmware module inquires whether the flash comprises first firmware of the first FP sensor according to the identification of the first FP sensor. If yes, S312-S314 are executed, and if no, S305-S314 are executed.
The generic firmware module may obtain the identity of the vendor of the first FP sensor based on the identity of the first FP sensor, with reference to the related description in S304.
The flash stores the firmware of the FP sensor of different manufacturers and the identification of the manufacturer corresponding to each firmware. The universal firmware module can query whether firmware corresponding to the identification of the manufacturer of the first FP sensor is stored in the flash based on the identification of the manufacturer of the first FP sensor. And if the firmware corresponding to the manufacturer identification of the first FP sensor is stored in the flash, taking the firmware stored in the flash as the first firmware. If the firmware corresponding to the vendor identifier of the first FP sensor is not stored in the flash, the general firmware module may request the CPU to obtain the first firmware in the manner shown in fig. 3.
If the flash includes the first firmware of the first FP sensor, step S304A in fig. 6 may be referred to. If the flash does not include the first firmware of the first FP sensor, steps S305 to S312 in fig. 4 may be referred to.
In the embodiment of the application, the firmware of the FP sensor of a plurality of different manufacturers can be burned in the flash of the MCU chip in advance, and when the electronic device is started, the general firmware module can obtain the first firmware of the first FP sensor from the flash based on the identification of the first FP sensor, or if the first firmware is not burned in the flash, the CPU can request the first firmware first, so that the purpose that the first firmware drives the first FP sensor to work can be achieved.
As depicted in fig. 2, the CPU includes an FP driver, where the FP driver may drive the FP APP to work on the one hand, and may serve the FP APP on the other hand, such as the FP driver may serve the FP APP, so that the FP APP may verify fingerprint information of the user. Taking the FP sensor before the replacement of the electronic equipment as the FP sensor B and the FP sensor after the replacement as the FP sensor rA as an example, when the FP sensor in the electronic equipment is replaced, the fingerprint information of a user acquired by the FP sensor rA is different from the FP sensor B because the working principle of the FP sensor rA and the FP sensor B is different, and the fingerprint information of the user is checked by the FP APP correspondingly.
Illustratively, the FP sensor is an optical fingerprint sensor, fingerprint information of a user collected by the optical fingerprint sensor is a fingerprint image, and the FP APP can verify the fingerprint information of the user by using an image of a fingerprint boot password set by the user and a fingerprint image collected by the optical fingerprint sensor. The FP sensor B is a semiconductor fingerprint sensor, fingerprint information of a user collected by the semiconductor fingerprint sensor is a capacitance value or an inductance value, and the FP APP can verify the fingerprint information of the user through the capacitance value or the inductance value of a fingerprint startup password set by the user and the capacitance value or the inductance value collected by the optical fingerprint sensor.
In such an embodiment, after the FP sensor in the electronic device is replaced, the FP driver also needs to be updated, so as to achieve the purpose that the FP APP can verify the fingerprint information of the user acquired by the FP sensor in a verification manner matched with the FP sensor.
First, referring to fig. 3 and 5B, after S311, it may include:
s315, the CPU upgrades the FP driver.
The CPU is connected with the hard disk, the hard disk connected with the CPU can store at least one manufacturer's FP driver, and specifically, the hard disk connected with the CPU can store at least one manufacturer's FP driver and the firmware of each manufacturer. The CPU may determine a first FP driver of the first FP sensor according to the identity of the vendor of the first FP sensor.
In one embodiment, the hard disk connected by the CPU does not store the FP driver, and the CPU may request, from the driver server, the first FP driver that matches the first FP sensor in response to receiving the message that the upgrade is successful. The driver server may store FP drivers of at least one vendor, and an identifier of each vendor, and the CPU may send a driver request to the driver server, where the driver request may include an identifier of a vendor of the first FP sensor, and the driver server may send the first FP driver to the CPU based on the identifier of the vendor of the first FP sensor.
S316, the CPU adopts a first FP driver service FP APP.
After determining the first FP driver or acquiring the first FP driver from the driver server, the CPU may use the first FP driver to serve the FP APP, so that the FP APP may verify fingerprint information of the user acquired by the first FP sensor.
It should be appreciated that S315-S316 may be performed concurrently without a sequential distinction from S312-S314.
For FIG. 3, if the manufacturer 'S identifier of the first FP sensor has been written into the register of the MCU chip, the characterization CPU has updated the FP driver based on the manufacturer' S identifier of the first FP sensor, without executing S315-S316 as above. With respect to fig. 5B, if the flash includes the first firmware of the first FP sensor, but because the CPU does not know that the first FP sensor is currently used, the following S315A may be executed, which is not shown in fig. 5B.
Accordingly, in this embodiment, after S314, it may further include:
S314A, the first FP sensor sends fingerprint information of the user to the first firmware.
After the first FP sensor collects fingerprint information of the user, the fingerprint information of the user may be sent to the first firmware.
S317, the first firmware sends fingerprint information of the user acquired by the first FP sensor to the CPU.
S318, the CPU checks fingerprint information of the user.
The CPU checks fingerprint information of a user, and specifically comprises the following steps: the first FP driver serves the FP APP, so that the FP APP adopts a mode of matching with the first FP sensor to verify fingerprint information of the user.
Second, referring to fig. 5A, in this embodiment, after S304A, it may include:
S315A, the general firmware module sends the identification of the manufacturer of the first FP sensor to the CPU.
After S315A, S315-S318 (including S314A) may be performed. Wherein, S315A-S316 and S313-S314 (or S312-S314) are not distinguished in sequence, and can be executed simultaneously.
In the embodiment of the application, after the FP sensor in the electronic equipment is replaced, the CPU can upgrade the FP driver to obtain the first FP driver matched with the first FP sensor, so that the first FP driver serves the FP APP, the FP APP is verified in a verification mode matched with the first FP sensor, and fingerprint information of a user acquired by the first FP sensor is verified.
The electronic device includes the components shown in fig. 2, and in an embodiment, with reference to fig. 7, for the electronic device, a processing method of firmware provided in an embodiment of the present application may include:
s701, when a fingerprint sensor FP sensor in the electronic equipment is a first FP sensor, running first firmware of the first FP sensor to drive the first FP sensor to collect fingerprint information of a user.
S702, when the FP sensor in the electronic equipment is a second FP sensor, running second firmware of the second FP sensor to drive the second FP sensor to collect fingerprint information of a user, wherein the first FP sensor and the second FP sensor are different.
It should be understood that S701 and S702 are not sequentially distinguished, and are steps executed alternatively by the electronic device. In one embodiment, if at least two FP sensors are included in the electronic device, S701 and S702 may be performed simultaneously.
Based on the related description in fig. 3, 5A and 5B above, it can be derived that: when the electronic equipment is powered on, based on the identification of the FP sensor in the electronic equipment, the firmware corresponding to the FP sensor is obtained, and then the FP sensor is driven by the firmware corresponding to the FP sensor to collect fingerprint information of a user. That is, when the fingerprint sensor FP sensor in the electronic device is the first FP sensor, the electronic device may run the first firmware of the first FP sensor to drive the first FP sensor to collect fingerprint information of the user. When the FP sensor in the electronic device is the second FP sensor, the electronic device may run the second firmware of the second FP sensor to drive the second FP sensor to collect fingerprint information of the user. Wherein the first FP sensor and the second FP sensor are different.
In one embodiment, the first firmware and the second firmware as in S701 and S702 above are preset in the electronic device, such as pre-stored in a hard disk of the electronic device, or in a flash of the MCU chip. Alternatively, in one embodiment, the first firmware and/or the second firmware is obtained by the electronic device from a server, which may be a firmware server, as described in the above embodiments.
When the electronic device is started, whether the electronic device comprises the first firmware or not can be queried based on the identification of the first FP sensor in response to the powering-on of the electronic device. If the electronic device includes the first firmware, the electronic device may run the first firmware. If the electronic device does not include the first firmware, the electronic device may request the file of the first firmware from the server, and further receive the file of the first firmware from the server. The electronic device may run the first firmware based on the file of the first firmware. The electronic device may first write the first firmware into the flash of the MCU chip according to the file of the first firmware, and then read the first firmware written in the flash into the RAM of the MCU chip for operation, which may be described specifically with reference to the related description in the foregoing embodiments.
In this embodiment, because the electronic device runs the first firmware of the first FP sensor to drive the first FP sensor to gather fingerprint information of the user. Accordingly, the electronic device may adopt the driver of the first fingerprint application program corresponding to the first FP sensor to drive the fingerprint application program to verify the fingerprint information of the user collected by the first FP sensor, and specifically, reference may be made to the related description in the above embodiment.
In the embodiment of the application, when the electronic equipment is powered on, the firmware corresponding to the FP sensor can be acquired based on the identification of the FP sensor in the electronic equipment, and further the firmware corresponding to the FP sensor is adopted to drive the FP sensor to acquire the fingerprint information of the user, so that the problem that the electronic equipment cannot drive the FP sensor to acquire the fingerprint information of the user when the user replaces the FP sensor of the electronic equipment is solved, and the user experience is improved.
The embodiment of the application also provides a firmware processing system, which comprises the MCU chip and the first FP sensor. In one embodiment, the system may further include a CPU in the above embodiment.
It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (application specific integrated circuit, ASIC), or one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general purpose processor, such as a central processing unit (central processing unit, CPU) or other processor that may invoke the program code, such as a controller. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
The term "plurality" herein refers to two or more. The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship; in the formula, the character "/" indicates that the front and rear associated objects are a "division" relationship.
In addition, it should be understood that in the description of this application, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not for indicating or implying any relative importance or order.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present application are merely for ease of description and are not intended to limit the scope of the embodiments of the present application. In the embodiments of the present application, the sequence number of each process does not mean the sequence of execution sequence, and the execution sequence 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.

Claims (34)

1. A method of processing firmware for application to an electronic device, the method comprising:
when a fingerprint sensor FP sensor in the electronic equipment is a first FP sensor and an identifier of the first FP sensor is not written in a second register of a micro-processing unit MCU chip in the electronic equipment, writing first firmware of the first FP sensor in a flash memory flash of the MCU chip, and running the first firmware in the flash to drive the first FP sensor to acquire fingerprint information of a user;
when a fingerprint sensor FP sensor in the electronic equipment is a first FP sensor and the identifier of the first FP sensor is written in the second register, the first firmware in the flash is operated to drive the first FP sensor to collect fingerprint information of a user.
2. The method of claim 1, wherein the identifier of the first FP sensor is written in the second register, and is used to indicate that the flash stores the first firmware.
3. The method according to claim 1 or 2, wherein before writing the first firmware of the first FP sensor in the flash memory flash of the MCU chip, further comprising:
And acquiring the first firmware by a Central Processing Unit (CPU) in the electronic equipment.
4. A method according to any of claims 1-3, characterized in that the identity of the first FP sensor is the identity of the manufacturer of the first FP sensor.
5. The method according to any one of claims 1-4, further comprising:
when the FP sensor in the electronic equipment is a second FP sensor, running second firmware of the second FP sensor to drive the second FP sensor to collect fingerprint information of a user, wherein the first FP sensor and the second FP sensor are different.
6. The method of claim 4, wherein when the identification of the first FP sensor has been written in the second register, before the running the first firmware in the flash, further comprising:
and determining the first firmware in the flash according to the manufacturer identification of the first FP sensor and the second mapping relation between the firmware of the manufacturer and the identifier of the manufacturer.
7. The method of claim 3, wherein the obtaining, by a central processing unit CPU in the electronic device, the first firmware comprises:
The MCU chip sends the identification of the manufacturer of the first FP sensor to the CPU;
the CPU obtains a file of a first firmware of the first FP sensor according to the identification of a manufacturer of the first FP sensor;
the CPU sends a file of the first firmware to the MCU chip;
and the MCU chip determines the first firmware according to the file of the first firmware.
8. The method of claim 7, wherein before the MCU chip sends the CPU the identity of the manufacturer of the first FP sensor, further comprising:
and obtaining the manufacturer identification of the first FP sensor according to the identification of the first FP sensor and the first mapping relation between the identification of the FP sensor and the manufacturer identification of the FP sensor.
9. The method of any of claims 1-8, wherein when the fingerprint sensor FP sensor in the electronic device is a first FP sensor, the method further comprises:
and driving the fingerprint application program by adopting the driving of the first fingerprint application program corresponding to the first FP sensor so as to verify the fingerprint information of the user acquired by the first FP sensor.
10. A method for processing firmware, which is applied to a micro-processing unit MCU chip, the method comprising:
Acquiring an identification of a first fingerprint sensor FP sensor in response to the MCU chip being electrified;
when the identifier of the first FP sensor is not written into the second register of the MCU chip, writing first firmware of the first FP sensor into a flash memory flash of the MCU chip, and running the first firmware in the flash to drive the first FP sensor to acquire fingerprint information of a user;
and when the identifier of the first FP sensor is written in the second register, running the first firmware in the flash to drive the first FP sensor to collect fingerprint information of a user.
11. The method of claim 10, wherein the identifier of the first FP sensor is written in the second register, and is used to indicate that the flash has the first firmware stored therein.
12. The method according to claim 10 or 11, wherein before writing the first firmware of the first FP sensor in the flash memory flash of the MCU chip, further comprising:
and acquiring the first firmware through a Central Processing Unit (CPU).
13. The method of any of claims 10-12, wherein the identity of the first FP sensor is an identity of a vendor of the first FP sensor.
14. The method of claim 13, wherein after the obtaining the identity of the first fingerprint sensor FP sensor, further comprising:
and obtaining the manufacturer identification of the first FP sensor based on the identification of the first FP sensor obtained during power-on and a first mapping relation between the identification of the FP sensor and the manufacturer identification of the FP sensor.
15. The method according to any of claims 10-14, wherein said obtaining an identification of the first fingerprint sensor FP sensor comprises:
sending a command for accessing a first register in the first FP sensor to the first FP sensor, wherein the first register stores an identifier of the first FP sensor;
and receiving the identification of the first FP sensor from the first FP sensor.
16. The method of claim 15, wherein before sending the command to the first FP sensor to access the first register in the first FP sensor, further comprising:
and receiving a first signal from the first FP sensor, wherein the first signal indicates the MCU chip to acquire the identification of the first FP sensor, and the first signal is sent by the first FP sensor in response to the first FP sensor being electrified.
17. The method of any of claims 10-16, wherein only one firmware is stored in the flash, and wherein running the first firmware in the flash when the identification of the first FP sensor has been written in the second register comprises:
and running the firmware stored in the flash.
18. The method according to claim 13 or 14, wherein the flash has a second mapping relationship between firmware of a vendor and an identifier of the vendor stored therein, and when the identifier of the first FP sensor has been written in the second register, before the running the first firmware in the flash, the method further comprises:
and determining whether firmware corresponding to the manufacturer identification of the first FP sensor is stored in the flash according to the manufacturer identification of the first FP sensor and the second mapping relation.
19. The method of claim 18, wherein if firmware corresponding to the identity of the vendor of the first FP sensor is stored in the flash, the running the first firmware in the flash comprises:
running firmware corresponding to the identification of the manufacturer of the first FP sensor;
If the firmware corresponding to the identification of the manufacturer of the first FP sensor is not stored in the flash, the method further includes:
and acquiring the first firmware through a Central Processing Unit (CPU).
20. The method according to claim 12 or 19, wherein said obtaining, by a central processing unit CPU, said first firmware comprises:
sending the identification of the manufacturer of the first FP sensor to the CPU;
receiving a file of the first firmware from the CPU;
and determining the first firmware according to the file of the first firmware.
21. The method of claim 20, wherein prior to sending the CPU the identity of the vendor of the first FP sensor, further comprising:
writing the identification of the manufacturer of the first FP sensor into the second register;
sending a second signal to the CPU, wherein the second signal indicates the CPU to acquire the identity of the manufacturer of the first FP sensor;
a command from the CPU to access the second register is received.
22. The method of claim 20 or 21, wherein after receiving the file of the first firmware from the CPU, further comprising:
writing the first firmware into the flash according to the file of the first firmware;
And in response to the successful writing of the first firmware, sending a message of successful upgrading to the CPU.
23. The method of any of claims 10-22, wherein the running the first firmware in the flash to drive the first FP sensor to collect fingerprint information of a user comprises:
and reading the first firmware in the flash to a Random Access Memory (RAM) in the MCU chip to drive the first FP sensor to collect fingerprint information of a user.
24. A method for processing firmware, applied to a central processing unit CPU, the method comprising:
under the condition that the identification of the first fingerprint sensor FP sensor is not written in the second register of the MCU chip of the micro-processing unit in the electronic equipment, acquiring a file of a first firmware of the first FP sensor;
and sending the file of the first firmware to the MCU chip.
25. The method of claim 24 wherein the identity of the first FP sensor is an identity of a manufacturer of the first FP sensor.
26. The method of claim 25, wherein prior to the obtaining the file of the first firmware of the first FP sensor, further comprising:
Receiving an identification of a manufacturer of the first FP sensor from the MCU chip, wherein the identification of the manufacturer of the first FP sensor is obtained by the MCU chip based on the identification of the first FP sensor and a first mapping relation between the identification of the FP sensor and the identification of the manufacturer of the FP sensor;
the file for obtaining the first firmware of the first FP sensor comprises the following steps:
and acquiring a file of the first firmware of the first FP sensor according to the identification of the manufacturer of the first FP sensor.
27. The method of claim 26 wherein the CPU stores a third mapping between a file of firmware of a vendor and an identifier of the vendor, and wherein the obtaining the file of the first firmware of the first FP sensor according to the identifier of the vendor of the first FP sensor comprises:
and acquiring the file of the first firmware according to the identification of the manufacturer of the first FP sensor and the third mapping relation.
28. The method of claim 26, wherein the obtaining the file of the first firmware of the first FP sensor according to the identity of the vendor of the first FP sensor comprises:
sending the identity of the manufacturer of the first FP sensor to a firmware server;
A file of the first firmware is received from the firmware server.
29. The method according to any one of claims 26-28, wherein after said sending the file of the first firmware to the MCU chip, further comprises:
and receiving a message of successful upgrading from the MCU chip, wherein the message of successful upgrading indicates that the MCU chip has written the first firmware into a flash memory of the MCU chip.
30. The method of claim 29, wherein after receiving the message from the MCU chip that the upgrade was successful, further comprising:
acquiring a driver of a first fingerprint application program of the first FP sensor according to the identification of a manufacturer of the first FP sensor;
and driving the fingerprint application program by adopting the driving of the first fingerprint application program.
31. A chip, characterized in that the chip has stored thereon a computer program which, when executed by the chip, implements the method according to any of claims 10-23.
32. A chip, characterized in that the chip has stored thereon a computer program which, when executed by the chip, implements the method according to any of claims 24-30.
33. A firmware processing system, comprising: a first fingerprint sensor FP sensor, a micro-processing unit MCU chip for performing the method of any of claims 10-23.
34. An electronic device, comprising: a central processing unit CPU, and a firmware processing system as claimed in claim 33.
CN202311547745.5A 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment Pending CN117785249A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311547745.5A CN117785249A (en) 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311547745.5A CN117785249A (en) 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment
CN202110963741.XA CN115712446B (en) 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110963741.XA Division CN115712446B (en) 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment

Publications (1)

Publication Number Publication Date
CN117785249A true CN117785249A (en) 2024-03-29

Family

ID=85230147

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110963741.XA Active CN115712446B (en) 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment
CN202311547745.5A Pending CN117785249A (en) 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110963741.XA Active CN115712446B (en) 2021-08-20 2021-08-20 Firmware processing method, chip, system and electronic equipment

Country Status (2)

Country Link
CN (2) CN115712446B (en)
WO (1) WO2023020073A1 (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9177152B2 (en) * 2010-03-26 2015-11-03 Maxlinear, Inc. Firmware authentication and deciphering for secure TV receiver
KR102396514B1 (en) * 2015-04-29 2022-05-11 삼성전자주식회사 Fingerprint information processing method and electronic device supporting the same
KR102465249B1 (en) * 2016-02-19 2022-11-11 삼성전자주식회사 Electronic device for authenticating based on biometric data and operating method thereof
CN105744083A (en) * 2016-04-29 2016-07-06 努比亚技术有限公司 Mobile terminal fingerprint self-adaption method and device
CN106527660B (en) * 2016-10-31 2019-11-08 珠海市魅族科技有限公司 The driving method and associated electronic device of electronic equipment
CN107463407B (en) * 2017-08-10 2020-11-06 青岛海信移动通信技术股份有限公司 Fingerprint chip initialization method and device
CN107589975A (en) * 2017-09-29 2018-01-16 惠州Tcl移动通信有限公司 Detection method, mobile terminal and the storage medium of fingerprint sensor drive load
CN111506886A (en) * 2019-01-31 2020-08-07 陕西坤同半导体科技有限公司 Full-screen touch fingerprint unlocking induction component, mobile terminal and method
CN110445871A (en) * 2019-08-14 2019-11-12 益逻触控系统公司 The operating method and self-service terminal of self-service terminal
CN111125664B (en) * 2019-11-30 2022-07-12 华为技术有限公司 Electronic equipment and method for logging in operating system

Also Published As

Publication number Publication date
CN115712446B (en) 2023-10-20
CN115712446A (en) 2023-02-24
WO2023020073A1 (en) 2023-02-23

Similar Documents

Publication Publication Date Title
US8824673B2 (en) Machine, machine management apparatus, system, and method, and recording medium
US7929706B2 (en) Encryption key restoring method, information processing apparatus, and encryption key restoring program
US10701061B2 (en) Methods for blocking unauthorized applications and apparatuses using the same
US7480905B2 (en) Interface device, and method and computer readable product for updating firmware in the interface device
US9959125B2 (en) Field update of boot loader using regular device firmware update procedure
US11138295B2 (en) Method for securely updating firmware components and docking station using the same
US20040199911A1 (en) Apparatus and method for upgrading execution code of the portable memory device
US11416601B2 (en) Method and system for improved data control and access
CN115712446B (en) Firmware processing method, chip, system and electronic equipment
US20230266914A1 (en) Storage device including memory controller, and non-volatile memory system including the same and operating method thereof
US20100169554A1 (en) Terminal apparatus
EP3291092B1 (en) Data recovery method, device and terminal
US20050228979A1 (en) Stored-program device
US20090187898A1 (en) Method for securely updating an autorun program and portable electronic entity executing it
CN112905495A (en) Storage device, operation method thereof and non-volatile memory system
JP7118212B1 (en) Server device, information processing system, information processing device, and information processing method
US20100250494A1 (en) Peripheral device and portable electronic device
CN117272350B (en) Data encryption key management method, device, storage control card and storage medium
CN116028100B (en) Software version upgrading method and electronic equipment
CN115795519B (en) Data encryption and decryption processing method and device, electronic equipment and storage medium
CN111953753B (en) Communication device connection method, device, computer device and storage medium
JP7452207B2 (en) Display device, display method and program
US20230237162A1 (en) Systems and methods for remote secure erasure of fingerprint data from information handling systems
CN117707629A (en) System startup method, readable storage medium, and electronic device
JP2010157112A (en) Ic card, data control method and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication