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

Firmware acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN111930575B
CN111930575B CN202010628443.0A CN202010628443A CN111930575B CN 111930575 B CN111930575 B CN 111930575B CN 202010628443 A CN202010628443 A CN 202010628443A CN 111930575 B CN111930575 B CN 111930575B
Authority
CN
China
Prior art keywords
firmware data
memory
firmware
component
target
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.)
Active
Application number
CN202010628443.0A
Other languages
Chinese (zh)
Other versions
CN111930575A (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

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-checking process, at least firmware data of a basic input/output system which is written in the electronic equipment in advance is loaded to a memory, wherein the firmware data at least comprises firmware data of a component of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory. By adopting the application, a 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 application relates to computer technologies, and in particular, to a method and an apparatus for acquiring firmware, and an electronic device.
Background
Many components in the current electronic device can plug in own firmware chips to store own firmware data, the external firmware chips not only increase the cost of the electronic device, but also need to be read from the corresponding firmware chips when the components need to acquire the corresponding firmware data, so that the acquisition efficiency is low.
Disclosure of Invention
The application provides a firmware acquisition technical scheme.
According to an aspect of the present application, there is provided a firmware acquiring method, including:
In the power-on self-checking process, at least firmware data of a basic input/output system which is written in the electronic equipment in advance is loaded to a memory, wherein the firmware data at least comprises firmware data of a component of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory.
In one possible implementation manner, the loading at least firmware data written in advance into the basic input output system of the electronic device into the memory includes:
And loading a basic input/output system file which is written into a serial peripheral interface memory of the basic input/output system in advance into the memory, wherein the basic input/output system file is at least integrated and processed by the basic input/output system data, the embedded controller data and the firmware data of at least one component.
In one possible implementation manner, the loading at least firmware data written in advance into the basic input output system of the electronic device into the memory includes:
initializing a memory resource to assign all storage units in the memory resource to 0;
and loading at least firmware data of the at least one component of the basic input/output system which is written in the electronic equipment in advance into the initialized memory resource.
In one possible implementation manner, in the process of loading the firmware data into the memory, the method further includes:
And recording a component identifier corresponding to the firmware data and/or a storage address of the firmware data in a memory.
In one possible implementation manner, recording the storage address of the firmware data in the memory includes:
Setting a variable name in an advanced configuration and power management interface table, and recording a storage address of the firmware data in a memory through the variable name; or alternatively, the first and second heat exchangers may be,
And determining a starting address for storing the firmware data according to the determined memory resource, and recording a storage address corresponding to the firmware data in a memory according to the starting address.
In one possible implementation manner, recording the 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 alternatively, the first and second heat exchangers may be,
And recording the component identification corresponding to the firmware data to a designated register.
In one possible implementation manner, the target component loads corresponding target firmware data by accessing the memory, including:
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 manner, the loading, by the target component, the corresponding target firmware data by accessing the memory includes:
When the electronic equipment operates in a basic input/output system stage, the target component can access the memory through the corresponding basic input/output system driver to load corresponding target firmware data;
When the electronic equipment runs in an operating system stage, the target component can access the memory through the corresponding operating system driver to load corresponding target firmware data.
According to an aspect of the present application, there is provided a firmware acquiring apparatus including:
And the acquisition module is used for loading at least the firmware data which is written in the basic input/output system of the electronic equipment into the memory in advance in the power-on self-checking process, wherein the firmware data at least comprises the firmware data of the component of the electronic equipment, so that the target component can load the corresponding target firmware data by accessing the memory.
According to an aspect of the present application, there is provided a firmware acquiring 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: the method of any of the above claims is performed.
According to an aspect of the present application, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method of performing any one of the above.
In 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 compared with the traditional technology that the firmware data of the components are stored in the plug-in chip, the plug-in chip is omitted, and the equipment cost is saved; in addition, the firmware data of the components of the electronic equipment are stored in the basic input/output system, and the basic input/output system is provided with a relatively sound safety mechanism and a recovery mechanism, so that the safety of the firmware data storage is improved; because the firmware data is loaded to the memory in the power-on self-checking process, the target component can directly acquire the corresponding target firmware data, 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 as claimed.
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 flow chart of an alternative firmware acquisition method according to an embodiment of the present application;
FIG. 1B is a schematic diagram of firmware data acquisition according to an embodiment of the present application;
FIG. 2A is a flowchart illustrating an alternative firmware acquisition method according to an embodiment of the present application;
FIG. 2B is a schematic diagram of firmware data storage according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an alternative firmware acquisition method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating an alternative firmware acquisition method according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating an alternative firmware acquisition method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating an alternative firmware acquisition method according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating an alternative firmware acquisition method according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating an alternative 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 application;
FIG. 9B is a diagram illustrating loading of firmware data into a memory according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a portion of an alternative firmware acquisition device according to an embodiment of the present application;
fig. 11 is a schematic diagram of a part of a firmware obtaining apparatus according to an embodiment of the present application.
Detailed Description
Various exemplary embodiments, features and aspects of the application will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used 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" 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 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, 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 illustration of the 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, well known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present application.
Fig. 1A is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, and the method is applied to an electronic device, for example, and will be described with reference to the steps shown in fig. 1A.
In S101, during a power-on self-test process, at least firmware data written in advance into a basic input/output system of an electronic device is loaded into a memory, where the firmware data includes at least 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 cured on a ROM chip on a motherboard within the computer, and that store the most important BIOS programs, system configuration information, post-boot self-test programs, and system self-start programs of the computer. Its main function is to provide the lowest, most direct hardware setup and control for the computer. After the electronic equipment is in a closed state and a startup instruction sent by a user through triggering a switch power key of the electronic equipment or through a remote controller and the like is received, the BIOS starts to run, the electronic equipment enters a startup process, and the BIOS is responsible for initializing hardware, detecting hardware functions and guiding an operating system in the startup process.
After the electronic device is powered on, each internal device is first checked, and a general complete POS T (Power On Self Test, power-on self-test) will include information such as CPU, memory, ROM, motherboard, memory, serial-parallel port, display card, hard-and-soft disk subsystem, and keyboard of the test and test computer.
In one embodiment of the application, the firmware data of the components of the electronic device have been written in the bios in advance, that is, the firmware data of the components of the electronic device and the data of the bios are solidified and stored in a ROM chip on the motherboard of the electronic device. Among other things, components of an electronic device may include Lan (Local Area Network ), SATA (SERIAL ADV ANCED Technology Attachment, serial advanced technology attachment) raid (Redundant Arrays of INDEPENDENT DISKS, disk array), VGA (Video GRAPHICS ARRAY ), SPD (SERIAL PRESENCE DETECT, serial detection), camera (imaging component) and some IC (INTEGRATED CIRCUIT ) chips, as the application is not limited in this regard.
In S102, the target component can load corresponding target firmware data by accessing the memory.
In one embodiment of the present application, when the target component needs to use the corresponding target firmware data, the driver searches the memory for the target firmware data corresponding to the target component, and loads the target firmware data.
It should be noted that, after the electronic device is powered on and initialized, firmware data is loaded into the memory, and the firmware data is kept in the memory until the electronic device is powered off.
Referring to fig. 1B, a schematic diagram of firmware data acquisition provided by an embodiment of the present application is shown, and it can be seen that, in the embodiment of the present application, a bios is written in a memory corresponding to the bios in an electronic device in advance, firmware data of a component in the electronic device is also written in the bios, during a power-on self-test process, the firmware data in the i/o system is released to a memory first, and the component can acquire corresponding firmware data in the memory.
In the firmware acquisition method provided by the embodiment of the application, by storing the firmware data of the component of the electronic equipment in the basic input/output system, the firmware data of the component of the electronic equipment can be simultaneously stored in the corresponding memory when the data of the basic input/output system is stored in the memory, and compared with the prior art, the firmware data of the component is stored in the plug-in chip, the plug-in chip is saved, and the equipment cost is saved; in addition, the firmware data of the components of the electronic equipment are stored in the basic input/output system, and the basic input/output system is provided with a relatively sound safety mechanism and a recovery mechanism, so that the safety of the firmware data storage is improved; because the firmware data is loaded to the memory in the power-on self-checking process, the target component can directly acquire the corresponding target firmware data, and the efficiency of acquiring the firmware data is improved.
Fig. 2A is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, based on fig. 1A, step S101 in fig. 1A may be updated to S201, and will be described with reference to the steps shown in fig. 2A.
In S201, in the power-on self-checking process, a bios file written in advance into a bios 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 that are subjected to integration processing.
In one embodiment of the present application, when the bios file is generated, the bios data, the embedded controller data, and the firmware data of at least one component are integrated, the bios file is generated, and the integrated bios file is burned/stored into the bios serial peripheral interface memory. The bios has a serial peripheral interface memory for storing bios file data, and FV (firmware volume) is a partition of various types of data in bios file, such as SEC (Security), PEI (Pre-EFI Initialization, E FI initialization), DXE (Driver Execution Environment, driving execution environment), NVRA M (Non-Volatile Random Access Memory, nonvolatile random access memory). The firmware data is integrated into a block area, FV, of the bios file.
In one 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 the present application.
Referring to fig. 2B, a schematic diagram of firmware data storage provided by an embodiment of the present application is shown, where a 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 a bios interface 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/output system, so that compared with the conventional technology that the firmware data of the components are stored in the plug-in chip, the plug-in chip is omitted, and the equipment cost is saved; in addition, the firmware data of the components of the electronic equipment are stored in the basic input/output system, and the basic input/output system has a relatively sound safety mechanism and a recovery mechanism, so that the safety of the firmware data storage is improved.
Fig. 3 is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, based on fig. 1A, step S101 in fig. 1A may be updated to S301 to S302, and will be described with reference to the steps shown in fig. 3.
In S301, a memory resource is initialized to assign all memory cells in the memory resource to 0.
In S302, at least firmware data of the at least one component of the bios of the electronic device, which is written in advance, is loaded into the initialized memory resource.
In one embodiment of the present application, during 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 is possibly disordered, so that the new applied memory resource needs to be initialized, and all memory units contained in the new applied memory resource are assigned to 0, so that subsequent calling and storage are convenient.
In one embodiment of the present application, a continuous memory area may be applied to load firmware data of all components, and corresponding memory areas may be applied to the firmware data of each component.
Fig. 4 is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, based on fig. 1A, step S101 in fig. 1A may further include S401, and will be described with reference to the steps 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 one embodiment of the present application, in the process of loading the firmware data of the basic input/output system written in advance into the memory of the electronic device, the electronic device may record only the component identifier corresponding to the firmware data; only the storage address of the firmware data in the memory can be recorded; the storage address of the component identification corresponding to the firmware data and the firmware data in the memory can be recorded at the same time.
In the firmware acquisition method provided by the embodiment of the application, the corresponding target firmware data can be conveniently searched in the memory by recording the component identifier corresponding to the firmware data and/or the storage address of the firmware data, so that the firmware acquisition efficiency is improved.
Fig. 5 is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, based on fig. 4, step S401 in fig. 4 may be updated to S501, and will be described with reference to the steps shown in fig. 5.
In S501, setting a variable name in an advanced configuration and power management interface table, and recording a storage address of the firmware data in a memory through the variable name; or determining a starting address for storing the firmware data according to the determined memory resource, and recording the corresponding storage address in the memory according to the starting address.
In one embodiment of the present application, in the process of loading the firmware data pre-written into the basic input/output system of the electronic device into the memory, the storage address of the firmware data in the memory may be obtained, and the 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 through the variable name. That is, the address of the firmware data in memory is stored in the advanced configuration and power management interface table.
In one embodiment of the present application, in the process of loading the firmware data of the bios of the electronic device into the memory, since the bios includes the firmware data of at least one component, when the firmware data of each component is loaded into the memory, the memory address corresponding to each component is different, and it is necessary to set a variable name corresponding to each component in the advanced configuration and power management interface table, and record the memory address corresponding to each component by the variable name corresponding to each component.
In one embodiment of the present application, in the process of loading the firmware data pre-written into the basic input/output system of the electronic device into the memory, a continuous memory area may be applied to load the firmware data of all components, so that a starting address for storing the firmware data may be determined according to the determined memory resource, and a corresponding storage address of the firmware data in the memory may be recorded according to the starting address. For example, the first firmware data is written from the start address 00, the storage address is for example 00-04, the storage address of the second firmware data can be for example 04-06, and the storage addresses corresponding to the components are continuous.
In the firmware acquisition method provided by the embodiment of the application, the corresponding target firmware data can be conveniently searched in the memory by the target component through the storage address of the target firmware data by recording the storage address of the variable name and/or recording the storage address through the starting address of the firmware data, so that the firmware acquisition efficiency is improved.
Fig. 6 is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, based on fig. 4, step S401 in fig. 4 may be updated to S601, and will be described with reference to the steps 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 component identification corresponding to the firmware data to a designated register.
In one embodiment of the present application, in the process of loading the firmware data pre-written into the basic input/output system of the electronic device into the memory, the termination address of the applied memory resource can be obtained, and the component identifier corresponding to the firmware data can be recorded according to the termination address. The termination address is used to store the part identification in the memory, optionally, the part identification of at least one part may be written in the memory in the order from the termination address to the start address.
In one embodiment of the present application, during loading the firmware data of the bios of the electronic device into the memory, the component identifier corresponding to each firmware data may be directly recorded in the 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 corresponding target firmware data can be conveniently searched in the memory by the component identification of the target firmware data by recording the component identification corresponding to the firmware data by the termination address or recording the component identification corresponding to the firmware data by the register, so that the acquisition efficiency of the firmware is improved.
Fig. 7 is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, based on fig. 4, step S102 in fig. 4 may be updated to S701, and will be described with reference to the steps shown in fig. 7.
In S701, the target component loads corresponding target firmware data from the memory at least through the deposit address and/or the component identifier.
In one embodiment of the present 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 the corresponding target firmware data according to the storage address and/or the component identifier.
In one embodiment of the present application, under the condition that a target component loads corresponding target firmware data from a memory through the storage address, the target component obtains the storage address from 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 may also obtain a start address for storing the firmware data, and search the memory for the target firmware data through the start address.
In one embodiment of the present application, when firmware data of a plurality of components are included in a memory, a storage address of each component may be determined according to a data amount and a 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 storage address corresponding to 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 one embodiment of the present application, when the target component loads corresponding target firmware data from the memory through the component identifier, the target component searches the memory for the target firmware data through the component identifier by acquiring the stored component identifier in the register; the target component can also acquire a termination address corresponding to the firmware data through the component identifier, and find the component identifier corresponding to the target component, so as to acquire the corresponding target firmware data.
In one embodiment of the present application, when the target component loads the corresponding target firmware data from the memory through the component identifier and the storage address, the target component obtains the storage address in the advanced configuration and power management interface table according to the 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 the memory area (the area where the applied memory resource exists in the memory) where the firmware data is stored, where the firmware data of at least one component is loaded, and searches the component firmware data matched with the component identifier in the at least one component firmware data according to the component identifier as the target firmware data. The target component also determines a boundary address according to the memory address and the range information of the memory resource; and stopping searching the device firmware of the target component under the condition that the target component queries the boundary address.
In the firmware acquisition method provided by the embodiment of the application, the corresponding target firmware data is loaded from the memory through the storage address and/or the component identifier, so that the accuracy of firmware data acquisition can be improved, the situation of firmware data acquisition errors can be reduced, the efficiency of firmware data acquisition can be further improved, and the operation efficiency of the electronic equipment can be improved.
Fig. 8 is a schematic flow chart of an alternative firmware obtaining method according to an 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, and 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 may access the memory to load the corresponding target firmware data through the corresponding bios driver.
In S802, when the electronic device runs in the operating system stage, the target component can access the memory through the corresponding operating system driver to load the corresponding target firmware data.
In one embodiment of the present application, since the manner in which the target component obtains the target firmware data is different when the electronic device is running in different phases, the target component obtains the current driver corresponding to the current phase according to the current phase of the electronic device, and accesses the target firmware data corresponding to the memory loading through the current driver.
When the electronic equipment operates in a basic input/output system stage, the target component accesses the memory through a basic input/output system driver to load corresponding target firmware data; when the electronic equipment runs in an 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, the corresponding driving program is acquired according to the current running condition of the electronic equipment, and the corresponding target firmware data is loaded according to the acquired driving program by accessing the memory, so that the speed of acquiring the firmware data can be improved, and the running efficiency of the electronic equipment can be improved.
Fig. 9A is a schematic flowchart of an alternative firmware obtaining method according to an embodiment of the present application, based on fig. 1A and the foregoing embodiment, step S101 in fig. 1A may further include step S901, step 102 may be updated to steps S902 to S903, step S904 is further included after step S903, and the description will be made with reference to the steps shown in fig. 9A.
In S901, a start address of the firmware data in the memory is recorded.
In one embodiment of the present application, the firmware data includes firmware data corresponding to a plurality of components, and in the process of loading the firmware data into the memory, a start address of the firmware data in the memory needs to be acquired and recorded in an advanced configuration and power management interface table.
Referring to fig. 9B, a schematic diagram of loading firmware data into a memory according to an embodiment of the present application is shown, it can be seen that the firmware data is already loaded in the memory, that is, 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 a high level configuration and power management interface table.
In S902, the target component acquires a start address.
In one embodiment of the present application, if the target component needs to obtain the corresponding target firmware data, the starting address of the firmware data in the memory needs to be searched from the advanced configuration and power management interface table.
In S903, starting from the start address, the target component searches the memory for the firmware data matching the component identifier as the target firmware data according to the component identifier.
In one embodiment of the present application, the target component will first acquire its own component identifier (including the component unique identifier code), and then look down for firmware data matching the component identifier from the initial address until 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 component starts the search, the target component further determines a firmware boundary address of the firmware data in the memory according to the start address and the data size of the firmware data. Firmware boundary addresses as 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 after the firmware boundary address, the firmware data does not exist. Thus, in the event that the target component queries to the firmware boundary address, the search for target firmware data is stopped.
In the firmware obtaining method provided by the embodiment of the application, the starting address is recorded, and when the target component searches the target firmware data, the firmware boundary address can be obtained according to the starting address and the data volume of the firmware data so as to determine the searching cut-off condition. Under the condition that the target firmware data is not normally loaded to the memory, the searching is stopped in time, the operation pressure of the electronic equipment is reduced, and the working efficiency is improved.
In the following, an exemplary application of the embodiment of the present application in a practical application scenario will be described.
In the conventional technology, many devices (components) of the current computer are hung on own FIRMWARE CHIP (hardware chip) to store DEVICE FIRMWARE (component firmware). Such as Lan, SATA raid, VGA, SPD, camera, IC chips, etc., which add cost and update complexity, and Secure level is low.
Aiming at the technical problems, the application provides a firmware acquisition method, which comprises the following steps:
After the BIOS (basic input output system) SPI (serial peripheral interface) rom (Memory) has been put in a BIOS Image (basic input output system Image file), there is generally some remaining space to divide a piece of FV area (firmware volume area) in the BIOS separately, then the firmware data of the external device is saved in the firmware volume area of the BIOS, the BIOS loads the firmware data to a fixed Memory Address in a Post (power-on self-test) stage, and DEVICE DRIVER (driver corresponding to a target external component) only needs to load the firmware data by searching its own identifier from the 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. (the security mechanism may include secure flash, RPMC, express, etc.).
(3) The recovery mechanism of the BIOS can ensure that the firmware data of the plug-in component is not lost.
In some possible embodiments, a firmware acquisition method provided by the present application includes:
(1) When the Build BIOS image is generated, the plug-in firmware data to be integrated is stored in a fixed BIOS FV area (basic input output system firmware volume area).
(2) And initializing a memory variable in the BIOS post process, and then releasing the plug-in firmware data into the memory.
(3) An ACPI table (advanced configuration and power management interface table) is used to record a memory address loaded in the BIOS post process by specifying a variable name.
(4) The Device (target external component) may find its corresponding FW image (target firmware data) by means of a search signature by BIOS driver/OS driver.
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 diagram of a part of a firmware obtaining apparatus according to an embodiment of the present application. As shown in fig. 10, the firmware obtaining apparatus includes: an acquisition module 1001; wherein:
and the obtaining module 1001 is configured to load, during the power-on self-test, at least firmware data of a basic input/output system written in advance into 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 application, the acquisition module 1001 includes a write submodule 1011, an initialize submodule 1012, a record submodule 1013, and an acquisition submodule 1014. Wherein:
The writing submodule 1011 is configured to load, into the memory, a bios file that is written into the bios interface memory in advance, where the bios file is a file that includes at least bios data, embedded controller data, and firmware data of at least one component and is subjected to integration processing.
An initialization submodule 1012, configured to initialize a memory resource to assign all memory cells in the memory resource to 0; and loading at least firmware data of the at least one component of the basic input/output system which is written in the electronic equipment in advance into the initialized memory resource.
Recording submodule 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 submodule 1013 is specifically configured to set a variable name in an advanced configuration and power management interface table, and record a storage address of the firmware data in the memory through the variable name; or determining a starting address for storing the firmware data according to the determined memory resource, and recording the corresponding storage address in the memory according to the starting address.
The recording submodule 1013 is further specifically configured to determine a termination address for storing the firmware data according to the determined memory resource, and record a component identifier corresponding to the firmware data according to the termination address; or, recording the component identification corresponding to the firmware data to a designated register.
And an acquisition sub-module 1014, configured to load corresponding target firmware data from the memory at least through the deposit address and/or the component identifier.
The acquiring sub-module 1014 is specifically configured to, when the electronic device is running in a bios stage, enable the target component to access, through a corresponding bios driver, the memory to load corresponding target firmware data; when the electronic equipment runs in an operating system stage, the target component can access the memory through the corresponding operating system driver to load corresponding target firmware data.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, please refer to the description of the embodiments of the method of the present application.
It should be noted that, in the embodiment of the present application, if the firmware acquiring method is implemented in the form of a software functional module, and is sold or used as a separate product, the firmware acquiring method may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium, including several instructions for causing a firmware acquiring device (for example, a computer device or the like) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
Fig. 11 is a schematic diagram of a part of a firmware obtaining apparatus according to an embodiment of the present application. As shown in fig. 11, the firmware acquiring apparatus 11 includes: a memory 111, a processor 112, and a target part 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 target firmware data corresponding to the memory loading; a memory 111 for storing executable data instructions; the processor 112 is configured to implement the firmware acquiring method when executing the executable instructions stored in the memory.
The embodiment of the application also provides a computer readable storage medium, which stores executable instructions for causing a processor to execute the firmware acquisition method in the method embodiment.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage 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: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through 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 over 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 transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface 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.
Computer program instructions for carrying out operations of the present application may be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source 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 be executed 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present application are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information for computer readable program instructions, which can execute the computer readable program instructions.
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 having the instructions stored therein includes 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 flowcharts 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 realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
The foregoing description of embodiments of the application has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the present application.

Claims (9)

1.A firmware acquisition method, comprising:
In the power-on self-checking process, at least loading firmware data of a basic input/output system of the electronic equipment into a memory, wherein the firmware data at least comprises firmware data of a component of the electronic equipment, so that a target component can load corresponding target firmware data by accessing the memory;
the target component loads corresponding target firmware data by accessing the memory, and the target component comprises at least one of the following components:
when the electronic equipment operates in a basic input/output system stage, the target component can access the memory through the corresponding basic input/output system driver to load corresponding target firmware data; or alternatively, the first and second heat exchangers may be,
When the electronic equipment runs in an operating system stage, the target component can access the memory through the corresponding operating system driver to load corresponding target firmware data.
2. The method of claim 1, the loading at least firmware data pre-written to a basic input output system of the electronic device into the memory, comprising:
And loading a basic input/output system file which is written into a serial peripheral interface memory of the basic input/output system in advance into the memory, wherein the basic input/output system file is at least integrated and processed by the basic input/output system data, the embedded controller data and the firmware data of at least one component.
3. The method of claim 1, the loading at least firmware data pre-written to a basic input output system of the electronic device into the memory, comprising:
initializing a memory resource to assign all storage units in the memory resource to 0;
and loading at least firmware data of the at least one component of the basic input/output system which is written in the electronic equipment in advance into the initialized memory resource.
4. The method of claim 1, wherein, in loading the firmware data into memory, further comprising:
And recording a component identifier corresponding to the firmware data and/or a storage address of the firmware data in a memory.
5. The method of claim 4, recording a deposit address in a memory of the firmware data, comprising:
Setting a variable name in an advanced configuration and power management interface table, and recording a storage address of the firmware data in a memory through the variable name; or alternatively, the first and second heat exchangers may be,
And determining a starting address for storing the firmware data according to the determined memory resource, and recording a storage address corresponding to the firmware data in a memory according to the starting address.
6. The method of claim 4, recording a component identifier 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 alternatively, the first and second heat exchangers may be,
And recording the component identification corresponding to the firmware data to a designated register.
7. The method of any one of claims 4 to 6, wherein the target component loads corresponding target firmware data by accessing the memory, comprising:
And the target component loads corresponding target firmware data from the memory at least through the storage address and/or the component identifier.
8. A firmware acquisition device, comprising:
The device comprises an acquisition module, a memory and a control module, wherein the acquisition module is used for loading at least firmware data which is written into a basic input/output system of the electronic equipment in advance into the memory in the power-on self-checking process, and the firmware data at least comprises firmware data of a component of the electronic equipment so that a target component can load corresponding target firmware data by accessing the memory;
The acquisition module is further used for enabling the target component to access the memory to load corresponding target firmware data through the corresponding basic input/output system driver when the electronic equipment operates in a basic input/output system stage; or when the electronic equipment runs in an operating system stage, the target component can access the memory through the corresponding operating system driver to load corresponding target firmware data.
9. 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 CN111930575A (en) 2020-11-13
CN111930575B true 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)

Families Citing this family (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
CN113282442B (en) * 2021-07-22 2021-11-02 翱捷科技(深圳)有限公司 Method and system for automatically calibrating and downloading preset firmware at high speed in chip mass production

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (5)

* 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
US8103830B2 (en) * 2008-09-30 2012-01-24 Intel Corporation Disabling cache portions during low voltage operations
CN105830059B (en) * 2014-11-28 2019-09-27 华为技术有限公司 File access method, device and storage equipment
CN105630422B (en) * 2015-12-28 2018-07-24 飞天诚信科技股份有限公司 It is a kind of to realize the method and apparatus more applied based on low capacity processor
JP6583942B1 (en) * 2018-09-28 2019-10-02 Necプラットフォームズ株式会社 BMC, determination method and BMC firmware

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111930575A (en) 2020-11-13

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)
US8185727B2 (en) Method of using an information handling system having a boot file, and an information handling system and machine-executable code for carrying out the method
CN105739961B (en) Starting method and device of embedded system
US20100241815A1 (en) Hybrid Storage Device
CN111930575B (en) Firmware acquisition method and device and electronic equipment
CN110083399B (en) Applet running method, computer device and storage medium
US8180930B2 (en) Information processing device, and device initialization method in the information processing device
CN100461103C (en) Drive program loading system and system
US10871970B1 (en) Memory channel storage device detection
US10282190B2 (en) System and method for updating a UEFI image in an information handling system
CN107135462B (en) Bluetooth pairing method of UEFI firmware and computing system thereof
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
US10558468B2 (en) Memory channel storage device initialization
US10133654B1 (en) Firmware debug trace capture
US11366800B2 (en) System and method to automate validating media redirection in testing process
US11861349B2 (en) Modular firmware updates in an information handling system
US9003172B2 (en) Intelligently controlling loading of legacy option ROMs in a computing system
US10552376B1 (en) Accessing files stored in a firmware volume from a pre-boot application
US20180032351A1 (en) Information processing method and storage device
US9086895B1 (en) Controlling hardware driver selection
CN113950673A (en) Non-volatile storage partition identifier
US8051329B1 (en) Method and system for initializing a computing system
US11392389B2 (en) Systems and methods for supporting BIOS accessibility to traditionally nonaddressable read-only memory space
US9202058B1 (en) Root volume encryption mechanism in para-virtualized virtual machine

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