CN111930575A - Firmware acquisition method and device and electronic equipment - Google Patents

Firmware acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN111930575A
CN111930575A CN202010628443.0A CN202010628443A CN111930575A CN 111930575 A CN111930575 A CN 111930575A CN 202010628443 A CN202010628443 A CN 202010628443A CN 111930575 A CN111930575 A CN 111930575A
Authority
CN
China
Prior art keywords
firmware data
memory
firmware
data
basic input
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.)
Granted
Application number
CN202010628443.0A
Other languages
Chinese (zh)
Other versions
CN111930575B (en
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202010628443.0A priority Critical patent/CN111930575B/en
Publication of CN111930575A publication Critical patent/CN111930575A/en
Application granted granted Critical
Publication of CN111930575B publication Critical patent/CN111930575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a firmware acquisition method, a firmware acquisition device and electronic equipment; the method comprises the following steps: in the power-on self-test process, at least firmware data written in a basic input and output system of the electronic equipment in advance is loaded to a memory, wherein the firmware data at least comprises firmware data of components of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory. By adopting the method and the device, the plug-in chip can be omitted, the equipment cost is saved, and the safety of firmware data storage is improved; the efficiency of firmware data acquisition can also be improved.

Description

Firmware acquisition method and device and electronic equipment
Technical Field
The present disclosure relates to computer technologies, and in particular, to a firmware obtaining method and apparatus, and an electronic device.
Background
Many parts all can store the firmware chip of oneself by the plug-in own firmware chip in the present electronic equipment, and these outside firmware chips not only can increase electronic equipment's cost, when the part needs to obtain its corresponding firmware data, need read from corresponding firmware chip, acquire inefficiency.
Disclosure of Invention
The application provides a technical scheme for acquiring firmware.
According to an aspect of the present application, there is provided a firmware acquisition method including:
in the power-on self-test process, at least firmware data written in a basic input and output system of the electronic equipment in advance is loaded to a memory, wherein the firmware data at least comprises firmware data of components of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory.
In a possible implementation manner, the loading, to a memory, at least firmware data that is written in advance to a basic input output system of an electronic device includes:
and loading a basic input and output system file which is written into a serial peripheral interface memory of the basic input and output system in advance into the memory, wherein the basic input and output system file at least comprises basic input and output system data, embedded controller data and a file which is integrated by firmware data of at least one part.
In a possible implementation manner, the loading, to a memory, at least firmware data that is written in advance to a basic input output system of an electronic device includes:
initializing memory resources to assign all memory units in the memory resources to 0;
loading at least firmware data pre-written into the at least one component of the basic input output system of the electronic device into the initialized memory resource.
In a possible implementation manner, during the process of loading the firmware data to the memory, the method further includes:
and recording the part identification corresponding to the firmware data and/or the storage address of the firmware data in the memory.
In a possible implementation manner, recording a storage address of the firmware data in a memory includes:
setting a variable name in a high-level configuration and power management interface table, and recording the storage address of the firmware data in a memory through the variable name; or the like, or, alternatively,
determining a starting address for storing the firmware data according to the determined memory resource, and recording a corresponding storage address of the firmware data in the memory according to the starting address.
In one possible implementation manner, recording a component identifier corresponding to the firmware data includes:
determining a termination address for storing the firmware data according to the determined memory resource, and recording a component identifier corresponding to the firmware data according to the termination address; or the like, or, alternatively,
and recording the part identification corresponding to the firmware data to a specified register.
In one possible implementation, the loading, by the target component, corresponding target firmware data by accessing the memory includes:
and the target component loads corresponding target firmware data from the memory at least through the storage address and/or the component identifier.
In one possible implementation, the loading, by the target component, corresponding target firmware data by accessing the memory includes:
when the electronic equipment runs in a basic input and output system stage, the target component can access the memory to load corresponding target firmware data through a corresponding basic input and output system driver;
when the electronic device runs in the operating system stage, the target component can access the memory to load corresponding target firmware data through a corresponding operating system driver.
According to an aspect of the present application, there is provided a firmware acquisition apparatus, the apparatus including:
the acquisition module is used for loading firmware data which is written into a basic input/output system of the electronic equipment in advance to a memory in the power-on self-test process, wherein the firmware data at least comprises firmware data of components of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory.
According to an aspect of the present application, there is provided a firmware acquisition apparatus including:
a processor;
a memory for storing processor-executable instructions;
the target component loads corresponding target firmware data by accessing the memory;
wherein the processor is configured to: performing the method of any of the above.
According to an aspect of the application, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement performing the method of any one of the above.
In the embodiment of the application, the firmware data of the components of the electronic equipment is stored in the basic input and output system, so that compared with the traditional technology that the firmware data of the components is stored in the plug-in chip, the device cost is saved due to the fact that the plug-in chip is omitted; moreover, as the firmware data of the components of the electronic equipment is stored in the basic input and output system, the basic input and output system has a relatively sound safety mechanism and a recovery mechanism, the safety of the firmware data storage is improved; due to the fact that the firmware data are loaded to the memory in the power-on self-checking process, the corresponding target firmware data can be directly acquired by the target component, and the efficiency of acquiring the firmware data is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
Fig. 1A is a schematic flowchart of an alternative firmware acquisition method according to an embodiment of the present disclosure;
fig. 1B is a schematic diagram illustrating firmware data acquisition according to an embodiment of the present disclosure;
fig. 2A is an alternative flowchart of a firmware obtaining method according to an embodiment of the present disclosure;
FIG. 2B is a diagram illustrating a firmware data storage according to an embodiment of the present application;
fig. 3 is an alternative flowchart of a firmware acquisition method according to an embodiment of the present disclosure;
fig. 4 is an alternative flowchart of a firmware acquisition method according to an embodiment of the present disclosure;
fig. 5 is an alternative flowchart of a firmware obtaining method according to an embodiment of the present disclosure;
fig. 6 is an alternative flowchart of a firmware acquisition method according to an embodiment of the present disclosure;
fig. 7 is an alternative flowchart of a firmware acquisition method according to an embodiment of the present application;
fig. 8 is an alternative flowchart of a firmware acquisition method according to an embodiment of the present application;
FIG. 9A is a schematic flow chart of an alternative firmware acquisition method according to an embodiment of the present disclosure;
fig. 9B is a schematic diagram illustrating loading of firmware data into a memory according to an embodiment of the present disclosure;
FIG. 10 is a schematic partial structure diagram of an alternative firmware acquisition apparatus according to an embodiment of the present application;
fig. 11 is a schematic partial structural diagram of a firmware acquisition device according to an embodiment of the present application.
Detailed Description
Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present application. It will be understood by those skilled in the art that the present application may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present application.
Fig. 1A is an optional flowchart of a firmware obtaining method provided in an embodiment of the present application, and taking application of the method to an electronic device as an example, the method will be described with reference to the steps shown in fig. 1A.
In S101, in a power-on self-test process, at least firmware data written in advance in a basic input/output system of an electronic device is loaded to a memory, where the firmware data at least includes firmware data of a component of the electronic device.
In one embodiment of the present application, the BIOS of the electronic device is a set of programs that are fixed on a ROM chip on a motherboard of a computer, and store the most important BIOS programs of the computer, system setting information, self-test after power-on, and system self-boot programs. Its primary function is to provide the lowest level, most direct hardware setup and control for the computer. When the electronic equipment is in a closed state and receives a starting-up instruction sent by a user through triggering a switch power key of the electronic equipment or through a remote controller and the like, the BIOS starts to operate, the electronic equipment enters a starting-up process, and the BIOS is responsible for initializing hardware, detecting hardware functions and guiding an operating system in the starting-up process.
After the electronic device is powered On, each internal device is checked first, and a general complete POS T (Power On Self Test) will include information such as a CPU, a memory, a ROM, a motherboard, a memory, a serial-parallel port, a display card, a hard-and-soft disk subsystem, and a keyboard of a Test and Test computer.
In one embodiment of the present application, the firmware data of the components of the electronic device has been written into the bios in advance, that is, the firmware data of the components of the electronic device is solidified and saved into one ROM chip on the motherboard of the electronic device together with the data of the bios itself. The components of the electronic device may include Lan (Local Area Network), SATA (Serial advanced Technology Attachment) raid (Redundant Arrays of Independent Disks), VGA (Video Graphics Array), SPD (SERIAL PRESENCE DETECT, Serial detection), camera (camera component), and IC (Integrated Circuit) chips, which is not limited in this application.
In S102, the target component can load the corresponding target firmware data by accessing the memory.
In an embodiment of the present application, when a target component needs to use corresponding target firmware data, the target firmware data corresponding to the target component is searched in a memory through a driver, and the target firmware data is loaded.
It should be noted that, after the electronic device is powered on and initialized, the firmware data is loaded into the memory, and the firmware data is stored in the memory until the power is turned off.
Referring to fig. 1B, which shows a firmware data obtaining diagram provided in the embodiment of the present application, it can be seen that a basic input/output system in the embodiment of the present application is written in a memory corresponding to the basic input/output system in an electronic device in advance, and firmware data of a component in the electronic device is also written in the basic input/output system, during a power-on self-test process, the firmware data in the input/output system is released to a memory first, and the component can obtain corresponding firmware data in the memory.
In the firmware acquisition method provided by the embodiment of the application, the firmware data of the components of the electronic equipment are stored in the basic input/output system, so that when the data of the basic input/output system are stored in the corresponding memory, the firmware data of the components of the electronic equipment are simultaneously stored in the memory, and compared with the traditional technology that the firmware data of the components are stored in a plug-in chip, the firmware acquisition method saves equipment cost due to the fact that the plug-in chip is omitted; moreover, as the firmware data of the components of the electronic equipment is stored in the basic input and output system, the basic input and output system has a relatively sound safety mechanism and a recovery mechanism, the safety of the firmware data storage is improved; due to the fact that the firmware data are loaded to the memory in the power-on self-checking process, the corresponding target firmware data can be directly acquired by the target component, and the efficiency of acquiring the firmware data is improved.
Fig. 2A is an optional flowchart of the firmware obtaining method according to the embodiment of the present application, based on fig. 1A, step S101 in fig. 1A may be updated to step S201, and the description will be made with reference to the step shown in fig. 2A.
In S201, in the power-on self-test process, a bios file pre-written into a serial peripheral interface memory of the bios is loaded into the memory, where the bios file is a file that at least includes bios data, embedded controller data, and firmware data of at least one component and is subjected to integration processing.
In an embodiment of the present application, when generating the bios file, the bios data, the embedded controller data, and the firmware data of the at least one component are integrated, the bios file is generated, and the integrated bios file is burned/stored in the serial peripheral interface memory of the bios. The FV (firmware volume) of the basic input/output system is a partition of various types of data in the basic input/output system file, such as SEC (Security), PEI (Pre-EFI Initialization, E FI Initialization), DXE (Driver Execution Environment), NVRA M (Non-Volatile Random Access Memory). The firmware data is integrated into one area of the bios file, FV.
In an embodiment of the present application, the bios file may include firmware data of one component, or may include firmware data of a plurality of components, which is not limited in this application.
Referring to fig. 2B, which illustrates a firmware data storage diagram provided in the embodiment of the present application, it can be seen that the bios file in the embodiment of the present application is an integrated file including bios data, embedded controller data, and firmware data; the firmware data includes firmware data of at least one component, and the bios file is written to the spi memory of the bios.
In the firmware acquisition method provided by the embodiment of the application, the firmware data of the components of the electronic equipment are stored in the basic input and output system, and compared with the traditional technology that the firmware data of the components are stored in the plug-in chip, the device cost is saved due to the fact that the plug-in chip is omitted; moreover, the firmware data of the components of the electronic equipment are stored in the basic input and output system, and the basic input and output system has a relatively sound safety mechanism and a recovery mechanism, so that the safety of firmware data storage is improved.
Fig. 3 is an optional flowchart of the firmware obtaining method according to the embodiment of the present application, based on fig. 1A, step S101 in fig. 1A may be updated to S301 to S302, which will be described with reference to the step shown in fig. 3.
In S301, a memory resource is initialized to assign all storage units in the memory resource to 0.
In S302, at least the firmware data pre-written into the at least one component of the bios of the electronic device is loaded into the initialized memory resource.
In one embodiment of the present application, during the power-on self-test, a new memory resource needs to be applied to the system to load the firmware data of the at least one component. When a new memory resource is applied to the system, the original value in the memory resource may be relatively cluttered, so that the newly applied memory resource needs to be initialized, and all memory cells included in the newly applied memory resource are assigned to 0, so as to facilitate subsequent calling and storage.
In an embodiment of the present application, a continuous memory area may be applied to load firmware data of all components, and a corresponding memory area may be applied to firmware data of each component.
Fig. 4 is an optional flowchart of the firmware obtaining method according to the embodiment of the present application, based on fig. 1A, step S101 in fig. 1A may further include step S401, which will be described with reference to the step shown in fig. 4.
In S401, a component identifier corresponding to the firmware data and/or a storage address of the firmware data in a memory are recorded.
In an embodiment of the present application, in a process that an electronic device loads firmware data, which is written in advance in a basic input/output system of the electronic device, to a memory, only a component identifier corresponding to the firmware data may be recorded; the storage address of the firmware data in the memory can be recorded; and simultaneously recording the part identification corresponding to the firmware data and the storage address of the firmware data in the memory.
In the firmware acquisition method provided by the embodiment of the application, the part identifier corresponding to the firmware data and/or the storage address of the firmware data in the memory are recorded, so that a target part can conveniently search the corresponding target firmware data in the memory, and the acquisition efficiency of the firmware is improved.
Fig. 5 is an optional flowchart of the firmware acquiring method according to the embodiment of the present application, based on fig. 4, step S401 in fig. 4 may be updated to step S501, which will be described with reference to the step shown in fig. 5.
In S501, a variable name is set in the advanced configuration and power management interface table, and a storage address of the firmware data in the memory is recorded by the variable name; or determining a starting address for storing the firmware data according to the determined memory resource, and recording a corresponding storage address of the firmware data in the memory according to the starting address.
In an embodiment of the application, during the process of loading the firmware data which is written into the basic input output system of the electronic device in advance into the memory, the storage address of the firmware data in the memory may be obtained, and a variable name is set in the advanced configuration and power management interface table, and the storage address of the firmware data in the memory is recorded by the variable name. That is, the storage address of the firmware data in the memory is stored in the advanced configuration and power management interface table.
In an embodiment of the present application, in a process of loading firmware data, which is written in a basic input output system of an electronic device in advance, into a memory, because the basic input output system includes firmware data of at least one component, when the firmware data of each component is loaded into the memory, memory addresses corresponding to each component are different, a variable name corresponding to each component needs to be set in a high-level configuration and power management interface table, and the memory address corresponding to each component is recorded by the variable name corresponding to each component.
In an embodiment of the present application, during a process of loading firmware data, which is written into a basic input output system of an electronic device in advance, into a memory, a continuous memory area may be applied to load the firmware data of all components, so that a start address for storing the firmware data may be determined according to a determined memory resource, and a corresponding storage address of the firmware data in the memory may be recorded according to the start address. For example, the first firmware data is written from a start address 00, the storage address is 00-04, the storage address of the second firmware data can be 04-06, and so on, and the storage addresses corresponding to the components are continuous.
In the firmware acquisition method provided by the embodiment of the application, the storage address is recorded through the variable name and/or the storage address is recorded through the start address of the firmware data, so that a target component can conveniently search the corresponding target firmware data in the memory through the storage address of the target firmware data, and the acquisition efficiency of the firmware is improved.
Fig. 6 is an optional flowchart of the firmware obtaining method according to the embodiment of the present application, based on fig. 4, step S401 in fig. 4 may be updated to step S601, which will be described with reference to the step shown in fig. 6.
In S601, determining a termination address for storing the firmware data according to the determined memory resource, and recording a component identifier corresponding to the firmware data according to the termination address; or recording the part identification corresponding to the firmware data to a specified register.
In an embodiment of the present application, in a process of loading firmware data, which is written in advance in a basic input/output system of an electronic device, to a memory, an end address of a memory resource that is applied for may be obtained, and a component identifier corresponding to the firmware data is recorded according to the end address. The end address is used to store the component identifier in the memory, and optionally, the component identifier of at least one component may be written in the memory in order from the end address to the start address.
In an embodiment of the present application, in a process of loading firmware data, which is written in advance in a basic input output system of an electronic device, into a memory, a component identifier corresponding to each firmware data may be directly recorded in a specified register. Wherein the component identification may be a unique identification code of the component.
In the firmware acquisition method provided by the embodiment of the application, the part identifier corresponding to the firmware data is recorded through the termination address, or the part identifier corresponding to the firmware data is recorded through the register, so that the target part can conveniently search the corresponding target firmware data in the memory through the part identifier of the target firmware data, and the acquisition efficiency of the firmware is improved.
Fig. 7 is an optional flowchart of the firmware obtaining method according to the embodiment of the present application, based on fig. 4, step S102 in fig. 4 may be updated to S701, which will be described with reference to the step shown in fig. 7.
In S701, the target component loads corresponding target firmware data from the memory at least through the storage address and/or the component identifier.
In an embodiment of the application, the target component may first obtain a storage address and/or a component identifier corresponding to the target firmware data, and when accessing the memory, search for the corresponding target firmware data according to the storage address and/or the component identifier.
In an embodiment of the application, when a target component loads corresponding target firmware data from a memory through a storage address, the target component obtains the storage address in an advanced configuration and power management interface table according to a variable name corresponding to the target component, and then the target component searches the target firmware data in the memory according to the storage address; the target component can also obtain a start address for storing the firmware data, and search the target firmware data in the memory through the start address.
In one embodiment of the present application, when the firmware data of a plurality of components is included in the memory, the storage address of each component may be determined according to the data amount and the start address of the firmware data of each component. For example, if the start address is 00 and the data size of the first firmware data is 4, the corresponding storage address of the first firmware data is 00-04, and then according to the data size 2 of the second firmware data, it can be known that the storage address of the second firmware data can be 04-06, and so on.
In an embodiment of the present application, in a case that a target component loads corresponding target firmware data from a memory through the component identifier, the target component searches the target firmware data in the memory through the component identifier by obtaining the component identifier stored in the register; the target component can also obtain the termination address corresponding to the firmware data through the component identifier, search the component identifier corresponding to the target component, and further obtain the corresponding target firmware data.
In an embodiment of the application, when a target component loads corresponding target firmware data from a memory through a component identifier and a storage address, the target component obtains the storage address in an advanced configuration and power management interface table according to a variable name corresponding to the target component, and obtains the component identifier corresponding to the target component, and from the storage address, the target component can find a memory area (an area where applied memory resources exist in the memory) where the firmware data is stored, where firmware data of at least one component is loaded in the memory area, and the target component searches for component firmware data matching the component identifier in the at least one component firmware data as the target firmware data according to the component identifier. The target component also determines a boundary address according to the memory address and the range information of the memory resource; and stopping finding the device firmware of the target component when the target component inquires the boundary address.
In the firmware acquisition method provided by the embodiment of the application, because the corresponding target firmware data is loaded from the memory through the storage address and/or the component identifier, the accuracy of firmware data acquisition can be improved, the situation of firmware data acquisition errors is reduced, the efficiency of firmware data acquisition is further improved, and the operating efficiency of the electronic device is improved.
Fig. 8 is an optional flowchart of the firmware obtaining method according to the embodiment of the present application, based on fig. 1A and the above embodiment, step S102 in fig. 1A may further include steps S801 and S802, which will be described with reference to the steps shown in fig. 8.
In S801, when the electronic device operates in the bios stage, the target component can access the memory to load corresponding target firmware data through a corresponding bios driver.
In S802, when the electronic device runs in the operating system phase, the target component can access the memory to load the corresponding target firmware data through the corresponding operating system driver.
In an embodiment of the application, because the target component has different ways of acquiring the target firmware data when the electronic device operates at different stages, the target component acquires the current driver corresponding to the stage according to the stage where the electronic device is currently located, and accesses the memory to load the corresponding target firmware data through the current driver.
When the electronic equipment runs in a basic input and output system stage, the target component accesses the memory to load corresponding target firmware data through a basic input and output system driver; and when the electronic equipment runs in the operating system stage, the target component accesses the memory to load corresponding target firmware data through an operating system driver.
In the firmware acquisition method provided by the embodiment of the application, because the corresponding driving program is acquired according to the current running condition of the electronic device, and the target firmware data corresponding to the memory loading is accessed according to the acquired driving program, the speed of acquiring the firmware data can be increased, and the running efficiency of the electronic device is improved.
Fig. 9A is an optional flowchart of the firmware obtaining method according to the embodiment of the present application, based on fig. 1A and the above embodiment, step S101 in fig. 1A may further include step S901, step S102 may be updated to steps S902 to S903, and step S904 is further included after step S903, which will be described with reference to the step shown in fig. 9A.
In S901, a start address of the firmware data in the memory is recorded.
In an embodiment of the present application, the firmware data includes firmware data corresponding to a plurality of components, and in a process of loading the firmware data into a memory, a start address of the firmware data in the memory needs to be obtained and recorded in an advanced configuration and power management interface table.
Referring to fig. 9B, which is a schematic diagram illustrating firmware data loaded into a memory according to an embodiment of the present disclosure, it can be seen that the firmware data is already loaded in the memory, that is, the firmware data corresponding to a plurality of components is loaded, and the firmware data has a start address in the memory. The start address is recorded by the advanced configuration and power management interface table.
In S902, the target component acquires a start address.
In an embodiment of the present application, if the target component needs to obtain corresponding target firmware data, a start address of the firmware data in the memory needs to be looked up from the advanced configuration and power management interface table.
In S903, starting from the start address, the target component searches, according to the component identifier, the firmware data matching the component identifier in the memory as the target firmware data.
In one embodiment of the present application, the target component may first obtain its own component identifier (including the component unique identification code), and then search downward for firmware data matching the component identifier from the initial address until the firmware data matching the component identifier is found.
In S904, the target component determines a firmware boundary address according to the start address and the data amount of the firmware data; and stopping searching the target firmware data under the condition of inquiring the firmware boundary address.
In one embodiment of the present application, after the target device starts the search, the firmware boundary address of the firmware data in the memory is further determined according to the start address and the data size of the firmware data. Such as the firmware boundary addresses shown in fig. 9B. The memory area between the start address and the firmware boundary address is the memory area where the firmware data is located, and the firmware data does not exist after the firmware boundary address. Thus, in the event that the target component queries the firmware boundary address, the target firmware data is stopped from being looked up.
In the firmware acquisition method provided by the embodiment of the application, by recording the start address, when the target component searches for the target firmware data, the firmware boundary address can be obtained according to the start address and the data volume of the firmware data, so as to determine the search cutoff condition. And the searching is stopped in time under the condition that the target firmware data is not normally loaded to the memory, so that the operating pressure of the electronic equipment is reduced, and the working efficiency is improved.
Next, an exemplary application of the embodiment of the present application in a practical application scenario will be described.
In the conventional technology, many devices of the current computer are externally hung with their own firmware chip to store the device firmware. For example, some Lan, SATA raid, VGA, SPD, camera, and some IC chips, these add-on chips will firstly increase the cost, secondly update them more troublesome, and in addition, Secure level is also lower.
In view of the above technical problem, the present application provides a firmware obtaining method, including:
after BIOS Image (BIOS Image) is put, the (Memory of) SPI (serial peripheral interface) rom generally has some remaining space to separately partition an FV area in the BIOS, and then store firmware data of an external device in the firmware volume area of the BIOS, the BIOS uniformly loads the firmware data to a certain fixed Memory Address at a Post stage, and a device driver (driver corresponding to a target external component) needs to load the firmware data only by searching its own identifier from the certain Memory Address.
The advantages of the scheme are as follows:
(1) the BIOS SPI rom space is fully utilized, and the cost of some plug-in chips is saved.
(2) The BIOS has a relatively robust security mechanism to secure the plug-in data. (Security mechanisms may include secure flash, RPMC, compress, etc.).
(3) The recovery mechanism of the BIOS can ensure that the firmware data of the plug-in component cannot be lost.
In some possible embodiments, a firmware obtaining method proposed by the present application includes:
(1) when the Build BIOS image (basic input output system image file is generated), the plug-in firmware data to be integrated is saved in a fixed BIOS FV area (basic input output system firmware volume area).
(2) Initializing memory variables in the BIOS post process, and then releasing the plug-in firmware data into the memory block.
(3) A variable name is agreed in an ACPI table (advanced configuration and power management interface table) to record a memory address (memory address) loaded in the BIOS post process.
(4) The Device (target external component) can find its corresponding FW image (target firmware data) by a BIOS driver/OS driver in a search signature.
The embodiment of the application also provides a firmware acquisition device, which is used for implementing the firmware acquisition method. Fig. 10 is a schematic partial structural diagram of a firmware acquisition apparatus according to an embodiment of the present application. As shown in fig. 10, the firmware acquisition apparatus includes: an acquisition module 1001; wherein:
an obtaining module 1001, configured to load, in a power-on self-test process, at least firmware data that is written in advance in a basic input/output system of an electronic device to a memory, where the firmware data at least includes firmware data of a component of the electronic device, so that a target component can load corresponding target firmware data by accessing the memory.
In one embodiment of the present application, the acquisition module 1001 includes a write submodule 1011, an initialization submodule 1012, a record submodule 1013, and an acquisition submodule 1014. Wherein:
the write-in sub-module 1011 is configured to load a basic input/output system file, which is pre-written into the serial peripheral interface memory of the basic input/output system, into the memory, where the basic input/output system file is a file that at least includes basic input/output system data, embedded controller data, and at least one component of firmware data that is subjected to integration processing.
An initialization submodule 1012, configured to initialize a memory resource, so as to assign all storage units in the memory resource to 0; loading at least firmware data pre-written into the at least one component of the basic input output system of the electronic device into the initialized memory resource.
The recording sub-module 1013 is configured to record a component identifier corresponding to the firmware data and/or a storage address of the firmware data in the memory.
The recording sub-module 1013 is specifically configured to set a variable name in the advanced configuration and power management interface table, and record a storage address of the firmware data in the memory by using the variable name; or determining a starting address for storing the firmware data according to the determined memory resource, and recording a corresponding storage address of the firmware data in the memory according to the starting address.
The recording sub-module 1013 is further specifically configured to determine, according to the determined memory resource, an end address for storing the firmware data, and record, according to the end address, a component identifier corresponding to the firmware data; or recording the part identification corresponding to the firmware data to a specified register.
The obtaining sub-module 1014 is configured to load corresponding target firmware data from the memory at least through the storage address and/or the component identifier.
The obtaining sub-module 1014 is specifically configured to, when the electronic device operates in a bios stage, enable the target component to access the memory through a corresponding bios driver to load corresponding target firmware data; when the electronic device runs in the operating system stage, the target component can access the memory to load corresponding target firmware data through a corresponding operating system driver.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the firmware obtaining method is implemented in the form of a software functional module and sold or used as a standalone product, the firmware obtaining method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a firmware acquiring device (for example, a computer device, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Fig. 11 is a schematic partial structural diagram of a firmware acquisition device according to an embodiment of the present application. As shown in fig. 11, the firmware acquisition apparatus 11 includes: a memory 111, a processor 112 and a target component 114, the memory 111 and the processor 112 being connected by a bus 113; the target component 114 is connected to the bus 113 and is used for accessing the memory to load corresponding target firmware data; a memory 111 for storing executable data instructions; the processor 112 is configured to implement the above firmware acquisition method when executing the executable instructions stored in the memory.
The embodiment of the present application further provides a computer-readable storage medium, which stores executable instructions for causing a processor to implement the firmware obtaining method in the foregoing method embodiment when executed.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present application may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry can execute computer-readable program instructions to implement aspects of the present application by utilizing state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. A firmware acquisition method, comprising:
in the power-on self-test process, at least firmware data written in a basic input and output system of the electronic equipment in advance is loaded to a memory, wherein the firmware data at least comprises firmware data of components of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory.
2. The method of claim 1, wherein loading at least firmware data previously written to a basic input output system of an electronic device into a memory comprises:
and loading a basic input and output system file which is written into a serial peripheral interface memory of the basic input and output system in advance into the memory, wherein the basic input and output system file at least comprises basic input and output system data, embedded controller data and a file which is integrated by firmware data of at least one part.
3. The method of claim 1, wherein loading at least firmware data previously written to a basic input output system of an electronic device into a memory comprises:
initializing memory resources to assign all memory units in the memory resources to 0;
loading at least firmware data pre-written into the at least one component of the basic input output system of the electronic device into the initialized memory resource.
4. The method of claim 1, wherein in loading the firmware data into memory, further comprising:
and recording the part identification corresponding to the firmware data and/or the storage address of the firmware data in the memory.
5. The method of claim 4, wherein recording the storage address of the firmware data in the memory comprises:
setting a variable name in a high-level configuration and power management interface table, and recording the storage address of the firmware data in a memory through the variable name; or the like, or, alternatively,
determining a starting address for storing the firmware data according to the determined memory resource, and recording a corresponding storage address of the firmware data in the memory according to the starting address.
6. The method of claim 4, recording component identifications corresponding to the firmware data, comprising:
determining a termination address for storing the firmware data according to the determined memory resource, and recording a component identifier corresponding to the firmware data according to the termination address; or the like, or, alternatively,
and recording the part identification corresponding to the firmware data to a specified register.
7. The method of any of claims 4 to 6, wherein the target component loading the corresponding target firmware data by accessing the memory comprises:
and the target component loads corresponding target firmware data from the memory at least through the storage address and/or the component identifier.
8. The method of any of claims 1 to 6, the target component loading corresponding target firmware data by accessing the memory, comprising:
when the electronic equipment runs in a basic input and output system stage, the target component can access the memory to load corresponding target firmware data through a corresponding basic input and output system driver;
when the electronic device runs in the operating system stage, the target component can access the memory to load corresponding target firmware data through a corresponding operating system driver.
9. A firmware acquisition apparatus comprising:
the acquisition module is used for loading firmware data which is written into a basic input/output system of the electronic equipment in advance to a memory in the power-on self-test process, wherein the firmware data at least comprises firmware data of components of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory.
10. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
the target component loads corresponding target firmware data by accessing the memory;
wherein the processor is configured to: performing the method of any one of claims 1 to 6.
CN202010628443.0A 2020-07-01 2020-07-01 Firmware acquisition method and device and electronic equipment Active CN111930575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010628443.0A CN111930575B (en) 2020-07-01 2020-07-01 Firmware acquisition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010628443.0A CN111930575B (en) 2020-07-01 2020-07-01 Firmware acquisition method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111930575A true CN111930575A (en) 2020-11-13
CN111930575B CN111930575B (en) 2024-06-18

Family

ID=73316930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010628443.0A Active CN111930575B (en) 2020-07-01 2020-07-01 Firmware acquisition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111930575B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925569A (en) * 2021-02-24 2021-06-08 深圳市信锐网科技术有限公司 Firmware data processing method, device, equipment and storage medium
CN113282442A (en) * 2021-07-22 2021-08-20 翱捷科技(深圳)有限公司 Method and system for automatically calibrating and downloading preset firmware at high speed in chip mass production

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714106A (en) * 2008-09-30 2010-05-26 英特尔公司 Disabling cache portions during low voltage operations
US7861119B1 (en) * 2007-12-07 2010-12-28 American Megatrends, Inc. Updating a firmware image using a firmware debugger application
CN105630422A (en) * 2015-12-28 2016-06-01 飞天诚信科技股份有限公司 Method and device for achieving multiple applications based on small-capacity processor
CN105830059A (en) * 2014-11-28 2016-08-03 华为技术有限公司 Fine pitch connector socket
CN109766057A (en) * 2019-01-07 2019-05-17 成都中电熊猫显示科技有限公司 Firmware data processing method and system
CN110673898A (en) * 2019-09-30 2020-01-10 联想(北京)有限公司 Equipment management method, first equipment and interaction system
WO2020066552A1 (en) * 2018-09-28 2020-04-02 Necプラットフォームズ株式会社 Bmc and method for determining bmc firmware

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7861119B1 (en) * 2007-12-07 2010-12-28 American Megatrends, Inc. Updating a firmware image using a firmware debugger application
CN101714106A (en) * 2008-09-30 2010-05-26 英特尔公司 Disabling cache portions during low voltage operations
CN105830059A (en) * 2014-11-28 2016-08-03 华为技术有限公司 Fine pitch connector socket
CN105630422A (en) * 2015-12-28 2016-06-01 飞天诚信科技股份有限公司 Method and device for achieving multiple applications based on small-capacity processor
WO2020066552A1 (en) * 2018-09-28 2020-04-02 Necプラットフォームズ株式会社 Bmc and method for determining bmc firmware
CN109766057A (en) * 2019-01-07 2019-05-17 成都中电熊猫显示科技有限公司 Firmware data processing method and system
CN110673898A (en) * 2019-09-30 2020-01-10 联想(北京)有限公司 Equipment management method, first equipment and interaction system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925569A (en) * 2021-02-24 2021-06-08 深圳市信锐网科技术有限公司 Firmware data processing method, device, equipment and storage medium
CN113282442A (en) * 2021-07-22 2021-08-20 翱捷科技(深圳)有限公司 Method and system for automatically calibrating and downloading preset firmware at high speed in chip mass production

Also Published As

Publication number Publication date
CN111930575B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
CN101421701B (en) Direct boot arrangement using a nand flash memory
US9563439B2 (en) Caching unified extensible firmware interface (UEFI) and/or other firmware instructions in a non-volatile memory of an information handling system (IHS)
CN105739961B (en) Starting method and device of embedded system
US20150154033A1 (en) Computer system and boot method thereof
US20100241815A1 (en) Hybrid Storage Device
US10866881B1 (en) Firmware debug trace capture
US8180930B2 (en) Information processing device, and device initialization method in the information processing device
US10664598B1 (en) Firmware security patch deployment
US20190065300A1 (en) Method of retrieving debugging data in uefi and computer system thereof
CN107135462B (en) Bluetooth pairing method of UEFI firmware and computing system thereof
CN111930575B (en) Firmware acquisition method and device and electronic equipment
US20180157475A1 (en) System and method for updating a uefi image in an information handling system
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
CN102053848A (en) Automatic installation method for Linux operating system
US10203893B2 (en) Memory channel storage device detection
US20130097412A1 (en) Performing A Boot Sequence In A Multi-Processor System
US9003172B2 (en) Intelligently controlling loading of legacy option ROMs in a computing system
US9778936B1 (en) Booting a computing system into a manufacturing mode
US10838737B1 (en) Restoration of memory content to restore machine state
US10372661B1 (en) Firmware debug trace capture using serial peripheral interface
US9104558B2 (en) Preventing out-of-space errors for legacy option ROM in a computing system
US8918582B2 (en) Simulating EEPROM in virtual distributed switches
TWI670580B (en) Computer program product, computer system and computer implemented method for clock comparator sign control
US8756409B2 (en) System, method and computer program product for retrieving data at boot time
CN106502847B (en) Server diagnosis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant