CN113377566A - UEFI (unified extensible firmware interface) -based server starting method and device and storage medium - Google Patents

UEFI (unified extensible firmware interface) -based server starting method and device and storage medium Download PDF

Info

Publication number
CN113377566A
CN113377566A CN202110690627.4A CN202110690627A CN113377566A CN 113377566 A CN113377566 A CN 113377566A CN 202110690627 A CN202110690627 A CN 202110690627A CN 113377566 A CN113377566 A CN 113377566A
Authority
CN
China
Prior art keywords
uefi
peripheral
efi
protocol interface
storage medium
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110690627.4A
Other languages
Chinese (zh)
Inventor
李雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 New H3C Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN202110690627.4A priority Critical patent/CN113377566A/en
Publication of CN113377566A publication Critical patent/CN113377566A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • 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/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a UEFI-based server starting method, a UEFI-based server starting device and a UEFI-based server starting storage medium, which are used for solving the technical problem of low server starting speed. The method and the device have the advantages that the in-place information and the error diagnosis data of the equipment are written into the storage medium externally hung on the BMC chip, so that the time consumption for recording the in-place information and the fault information can be reduced, the BMC chip directly reads the complete machine configuration and the fault diagnosis information from the storage medium externally hung on the BMC, the situation that the system cannot acquire the diagnosis and configuration data due to the abnormality of the IPMI channel in the BIOS starting process is avoided, and meanwhile, the problems that the time consumption in the process of waiting for the IPMI channel ready in the starting process is overlong and the like are avoided. According to the method and the device, the start of each device driver in the UEFI BIOS starting process is executed concurrently through the newly added EFI multitask protocol interface, so that the starting process of the server is accelerated globally, and better experience is brought to a user.

Description

UEFI (unified extensible firmware interface) -based server starting method and device and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a server startup method and apparatus based on UEFI, and a storage medium.
Background
The server product is generally sold to the outside in a complete machine mode, the standardization degree is high, and various pluggable components including a memory, a network card, an optical module, a hard disk and the like can be purchased from various suppliers by each component in the complete machine of the server. When various faults occur in the BIOS starting process of the basic input/output system on the client site, and the OS system of the operating system cannot be started, relevant fault information and the in-place situation of system peripherals need to be provided for developers to analyze, and therefore problem reproduction and positioning are conducted.
The probability of the memory module having a problem is relatively high, for example, when the memory module has a fault, the whole memory channel is disabled, which results in that the system cannot normally identify the memory module, and if the memory channel is completely disabled, the system cannot normally start up. Such problems need to be reproduced by using a failed memory, and a test scheme is communicated with a memory chip manufacturer in time, so that a problem follow-up is found and solved.
When a Unified Extensible Firmware Interface (UEFI) BIOS single thread environment is used for starting, various peripheral hardware devices need to be loaded and initialized in the BIOS starting process, and the starting time is long. In order to accelerate the starting speed and reduce the waiting time of the user in the process of starting the server, the starting acceleration is usually achieved by turning off the DEBUG.
In addition, in the process of starting the server, the BIOS needs to perform data interaction with a Baseboard Management Controller (BMC) through an Intelligent Platform Management Interface (IPMI) Keyboard Controller Style (KCS) channel, and generally performs information reporting by optimizing a data structure or using a Universal Serial Bus (USB) channel, so as to optimize the starting process.
Based on debugging and optimizing the functions of the UEFI BIOS module, the starting time is shortened by optimizing the execution efficiency of a code frame or a transmission channel or reducing the execution of partial debugging functional modules and the like, the starting time can be reduced in a certain range, but the local optimization starting can be performed only on partial functional modules. With the increase of the number of the external card-inserting devices, the starting time length can be increased, and the effect of the method is not obvious.
In the process of starting up a server, a BIOS (basic input/output system) needs to report data such as in-place information and fault information of system equipment (such as a memory/an external card/a CPU) to a BMC (baseboard management controller) for monitoring, the process needs to be carried out after an IPMI (intelligent platform management interface) data channel is prepared, if the channel has a problem in a Power ON Self Test (POST) process, the BIOS can send requests for many times, and in addition, if the reported data is plenty, the time required for data interaction is longer.
Disclosure of Invention
In view of this, the present disclosure provides a server startup method and apparatus based on UEFI, and a storage medium, which are used to solve the technical problem that the server startup speed is slow.
Fig. 1 is a schematic flowchart illustrating steps of a UEFI-based server startup method provided in the present disclosure, where the method includes:
step 101, in the starting process of a unified extensible firmware interface basic input/output system UEFI BIOS, writing equipment in-place information and error diagnosis data reported by the UEFI BIOS into a storage medium externally hung on a baseboard controller BMC chip; the BMC chip directly reads the whole machine configuration and the fault diagnosis message from a storage medium externally hung on the BMC;
and 102, in the starting process of the UEFI BIOS, a plurality of peripheral drivers are loaded through an extended firmware interface EFI multitask protocol interface in a concurrent mode.
Further, writing the device in-place information and the error diagnosis data reported by the UEFI BIOS into a storage medium external to the BMC chip specifically includes:
respectively writing the in-place information and the error diagnosis data of the equipment into a specified storage area in a storage medium externally hung on the BMC chip;
the specified storage area comprises a head area and a data storage area; the head area is used for storing the space occupied by the data storage area and the recording completion flag bit;
the data storage area comprises an equipment in-place data area and an error diagnosis data area, the equipment in-place data area records the information of the in-place condition of the whole equipment, and the error diagnosis data area records the fault information of the equipment.
Further, the concurrently loading a plurality of peripheral drivers through the extended firmware interface EFI multitask protocol interface specifically includes:
starting a processor BSP to create and install an EFI MULTI-TASK PROTOCOL interface, namely an EFI _ MULTII _ TASK _ PROTOCOL interface;
and traversing all the peripheral drivers through an EFI multi-task PROTOCOL interface, activating the application processor AP through a multi-core MP service PROTOCOL interface, namely an EFI _ MP _ SERVICES _ PROTOCOL interface, respectively dispatching the peripheral drivers to different application processors AP, and starting all the peripheral drivers in parallel.
Further, when the dependency relationship exists between the peripheral drivers, the peripheral drivers dependent on other peripheral drivers are loaded in an associated manner through an Event mechanism provided by UEFI, and the specific method is as follows;
starting a first peripheral driver depended by a second peripheral driver through an interface StartupThisAP of a starting AP of an MP service protocol interface, wherein an inlet of the first peripheral driver is introduced through a WaitEvent parameter of the StartupThisAP;
and creating a timing event for loading the second external drive program by establishing an event CreateEvent function, and executing the timing event by a timer when the timing time is up by setting the timer so as to load the second external drive program after the first external drive program is loaded.
Further, finding the EFI multitasking protocol interface from the UEFI kernel through a LocateProtocol interface provided by the UEFI; and the EFI multi-task protocol interface is installed by calling an installation protocol interface InstallProtocolInterface function of UEFI.
Fig. 2 is a schematic structural diagram of a server boot apparatus based on UEFI according to the present disclosure, and each functional module in the apparatus 200 may be implemented by software, hardware, or a combination of software and hardware. The apparatus 200 comprises:
the plug-in storage medium writing module 201 is used for writing the equipment in-place information and the error diagnosis data reported by the UEFI BIOS into a plug-in storage medium of the BMC chip of the substrate controller in the starting process of the UEFI BIOS; the storage medium externally hung on the BMC reads the whole machine configuration and the fault diagnosis information and is directly read by the BMC chip;
the peripheral driver concurrent loading module 202 is configured to load a plurality of peripheral drivers concurrently through the extended firmware interface EFI multitask protocol interface in a UEFI BIOS starting process.
Further, the plug-in storage medium writing module 201 writes the device in-place information and the error diagnosis data into the specified storage area in the storage medium of the plug-in BMC chip, respectively;
the specified storage area comprises a head area and a data storage area; the head area is used for storing the space occupied by the data storage area and the recording completion flag bit;
the data storage area comprises an equipment in-place data area and an error diagnosis data area, the equipment in-place data area records the information of the in-place condition of the whole equipment, and the error diagnosis data area records the fault information of the equipment.
Further, the peripheral driver concurrent loading module 202 creates and installs an EFI multitask PROTOCOL interface, i.e., EFI _ MULTI _ TASK _ PROTOCOL interface, by starting the processor BSP; and traversing all the peripheral drivers through the EFI multitask PROTOCOL interface, activating the application processor AP through a multi-core MP service PROTOCOL interface, namely an EFI _ MP _ SERVICES _ PROTOCOL interface, and respectively dispatching the peripheral drivers to different application processors AP to start all the peripheral drivers in parallel.
Further, when there is a dependency relationship between the peripheral drivers, the peripheral driver concurrent loading module 202 further performs associated loading of peripheral drivers that depend on other peripheral drivers through an Event mechanism provided by UEFI;
the peripheral driver concurrent loading module 202 starts a first peripheral driver depended by a second peripheral driver through an AP start AP interface startups of an MP service protocol interface, where an entry of the first peripheral driver is entered through a WaitEvent event parameter of the startups AP;
the peripheral driver concurrent loading module 202 creates a timing event for loading the second peripheral driver by establishing an event CreateEvent function, and executes the timing event by setting a timer when the timing time is up, so as to load the second peripheral driver after the first peripheral driver is loaded.
The method and the device have the advantages that the in-place information and the error diagnosis data of the equipment are written into the storage medium externally hung on the BMC chip, so that the time consumption for recording the in-place information and the fault information can be reduced, the BMC chip directly reads the complete machine configuration and the fault diagnosis information from the storage medium externally hung on the BMC, the situation that the system cannot acquire the diagnosis and configuration data due to the abnormality of the IPMI channel in the BIOS starting process is avoided, and meanwhile, the problems that the time consumption in the process of waiting for the IPMI channel ready in the starting process is overlong and the like are avoided. According to the method and the device, the start of each device driver in the UEFI BIOS starting process is executed concurrently through the newly added EFI multitask protocol interface, so that the starting process of the server is accelerated globally, and better experience is brought to a user.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present disclosure or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present disclosure.
Fig. 1 is a schematic flowchart illustrating steps of a UEFI-based server booting method according to the present disclosure;
fig. 2 is a schematic structural diagram of a server startup device based on UEFI according to the present disclosure;
fig. 3 is a schematic structural diagram of a designated storage area in a BMC chip plug-in storage medium according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating steps of a UEFI-based server booting method according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram illustrating a method for implementing multi-core parallel booting of multiple peripherals by using an MP service protocol interface according to an embodiment of the present disclosure;
FIG. 6 is a diagram illustrating a method for implementing UEFI BIOS boot using an EFI multitasking protocol interface according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device capable of implementing a UEFI-based server booting method according to an embodiment of the present disclosure.
Detailed Description
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present disclosure. As used in the embodiments of the present disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The term "and/or" as used in this disclosure is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information in the embodiments of the present disclosure, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of embodiments of the present disclosure. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The basic idea of the disclosure is that, in the boot process, the host BIOS and BMC data interaction information (for example, device failure data information in the boot process) is recorded through an external storage medium (for example, Nand Flash, NOR, etc.) of a BMC chip of a substrate controller, so that excessive time-consuming interaction between the BIOS and the BMC through an intelligent platform management interface IPMI channel in the boot process is avoided. In addition, by using the advantages of the multi-core processor, a multitask mechanism is adopted to start all module programs of the BIOS in parallel, so that the starting speed of the server is increased, and the time for a user to wait for starting is shortened.
The following embodiments are provided to describe how to record the host BIOS and BMC data interaction information through the BMC chip plug-in storage medium during the boot process.
In the starting process, the device in-place information and the error diagnosis data reported by the BIOS are written into a designated storage area in a Nand Flash (a type of Flash memory) externally hung on the BMC chip, and the address range of the designated storage area can be designated in advance, for example, a 100M space is divided from a 0-4G space to serve as the designated storage area.
Fig. 3 is a schematic structural diagram of a specified storage area in a BMC chip plug-in storage medium according to an embodiment of the present disclosure, in this example, the specified storage area is divided into a Header area Header and a data storage area. The Header is used for storing information such as a space occupation range of a data storage area, a recording completion Flag bit (WC Flag) and the like, the data storage area comprises two parts of an equipment in-place data area and an error diagnosis data area, the equipment in-place data area records information of the whole equipment, and the error diagnosis data area records equipment fault information.
The device presence information recorded in the device presence data area includes, but is not limited to, peripheral type (e.g., dual in-line memory module DIMM, NVME, Network Card, PCIE Card, etc.), peripheral presence status, and the like.
The device failure information recorded in the error diagnosis data area includes, but is not limited to: fault type, fault location, fault frequency and the like.
Fig. 4 is a flowchart illustrating steps of a UEFI-based server booting method according to an embodiment of the present disclosure, where the method includes:
step 401, powering on and starting up a server, and executing a UEFI BIOS starting process;
the method comprises the steps that after the server is powered on, a power-on self-test POST process is automatically executed, the UEFI BIOS is started until the operating system OS takes over the system control right, the whole starting process of the server is divided into five stages, namely a security verification SEC stage, an EFI early-stage initialization (PEI stage), a drive execution environment DXE stage, a starting device selection BDS stage and an operating system LIVE OS activation stage.
Step 402, in the initialization stage, the BIOS determines whether an equipment failure occurs, and if an equipment failure occurs, performs step 403; if no equipment fault is generated, executing step 404;
the PEI phase and the driver execution environment DXE phase are generally referred to as the initialization phase.
Step 403, recording equipment fault information such as equipment fault type, fault position and the like into the external storage medium of the BMC chip;
before reporting an Error System Event Log (System Event Log, SEL) in an original fault Handle (Error Handle) reporting process, equipment fault information such as specific fault Type, fault location and the like obtained through analysis is stored in an Error diagnosis data area in a specified storage area in a BMC (baseboard management controller) chip plug-in storage medium. The number of pieces of fault information which can be recorded by the BMC chip external storage medium is limited, for example, 300 pieces of fault information can be recorded at most, and when the newly added fault type and the fault position are consistent with the recorded fault type and the recorded fault position, the fault counter Error Count in the Header is increased by one; when 300 pieces of failure information have been recorded and the newly added failure type is not consistent with the recorded failure type or failure location, the newly added failure information may not be recorded any more.
Step 404, recording the reported in-place information of the equipment to a BMC chip plug-in storage medium at the stage of starting the equipment to select the BDS;
the reporting of the in-place information of the Device needs to be performed at a Boot Device Selection (BDS) stage, that is, the reporting is started after the BIOS completes PCIE Device enumeration and resource allocation. In the step, the peripheral type and the in-place condition are stored in a device in-place data area in a designated storage area in the external storage medium of the BMC chip.
After data entry of two areas, namely a Header area and a data storage area, is finished, a completion entry Flag bit (WC Flag) is set, the BMC polls a WC Flag address every preset time period (for example, 1 second), when the WC Flag is detected to be set (for example, the initial value is 0, and the setting of 1 indicates that entry is finished), the data in the data storage area can be read, and the BMC analyzes the data according to the agreed format.
The multi-core server provides basic hardware environment support for the UEFI BIOS to realize a multi-task execution mechanism. When the server is powered on, after the UEFI BIOS is started, the CPU serving as a Boot Strap Processor/Boot kernel (BSP) executes an initialization instruction, and the other CPUs serve as Application processors/Application cores (APs). The usual starting mechanism of UEFI BIOS is to run a single task on the CPU core as BSP to complete the detection and initialization tasks of hardware, and does not support the multitask mechanism.
The disclosed parallel Multi-task starting mechanism for a Multi-core server is a Multi-core (MP) service PROTOCOL interface provided by UEFI standard, where the PROTOCOL interface provided in the UEFI standard to implement the Multi-core Multi-task mechanism is EFI _ MP _ SERVICES _ PROTOCOL (MP service PROTOCOL interface for short), and the interface description of the interface is as follows:
Figure BDA0003126036520000081
the MP service protocol interface provides functional interfaces for inquiring processor information, starting/stopping the AP and the like. The present disclosure utilizes this protocol interface to enable UEFI BIOS to execute peripheral drivers on the AP. The function interface of the starting AP is StartupThisAP, the interface can execute an incoming peripheral driver on the starting AP, and when the WaitEvent event of the StartupThisAP is not empty, the incoming peripheral driver through the WaitEvent parameter can be executed.
Fig. 5 is a schematic diagram of a method for implementing multi-core parallel booting of multiple peripherals by using an MP service protocol interface according to an embodiment of the present disclosure, including the steps of:
step 501, after the server is powered on, in the UEFI BIOS starting process, the BSP core used as a starting processor firstly executes main program initialization;
step 502, installing a multi-core Service MP Service;
this step implements the initialization of the MP service protocol and the event mechanism.
Step 503, activating an application Core AP Core1 through an EFI _ MP _ SERVICES _ PROTOCOL interface of the multi-Core multitasking PROTOCOL, and transmitting an entry parameter of a drive function for execution;
the application Core AP Core1 is activated, for example, by the enablediblenap interface function of the EFI _ MP _ SERVICES _ progress interface, and the AP Core1 is started using the startposap interface function.
Step 504, the AP Core1 continues to execute the device driving function associated with the WaiteEvent event parameter;
and 505, starting the operating system OS.
In addition, another mechanism for realizing the multi-core multi-task starting in the UEFI BIOS starting process is to use an Event mechanism provided by the UEFI, the Event mechanism can realize task time slice switching and timing functions, in short, after the timer reaches a specified time point, the timer interrupt program can complete the timing task by calling a specified callback function in the Event, and the UEFI packages the Event mechanism into a Protocol form, so that the scheduling is convenient.
When an Event needs to be created, a CreateEvent function may be employed, as an example:
Figure BDA0003126036520000091
Figure BDA0003126036520000101
the parameters of the CreateEvent function are described as follows:
EVT _ TIMER | EVT _ NOTIFY _ SIGNAL: the parameter of the location is used for indicating the type of the event, and indicating whether the event is a timer event or a notification signal event;
TPL _ NOTIFY: the parameter of the position is used for indicating the priority of the event activated to be executed;
CheckApsStatus: the parameter of the location is used for indicating a specific function executed after the event is activated, wherein the function is to inquire the AP state;
NULL, wherein the parameter of the position is used for indicating the entry parameter of the created event function, and the entry address of the peripheral driver can be transmitted through the parameter; the example is here empty, meaning that the corresponding event function is not involved;
mCheckAllApsEvent: the parameter of the location is used to indicate the created event name.
When a timer needs to be set to query the AP status, a SetTimer function may be used, as an example:
Figure BDA0003126036520000102
the parameters of the SetTimer function are described as follows:
EventName: the parameter is used to indicate a timer event that is activated at a specified time, e.g., when a mchekallalsevent event needs to be activated, the parameter may be set to the mchekallalsevent event;
TimerPeriodic: the parameter is used for indicating the time setting type of the timer event, and the TimerPeriodic is activated by a fixed time period;
FI _ TIMER _ PERIOD _ MICROSECONDS (PcdGet32 (Pdcpu ApStatusCheckInterval InMicroSeconds)): this parameter is used to specifically set the time duration of the timer.
In summary, the MP service protocol interface and the UEFI Event mechanism provide two interface supports for implementing UEFI BIOS multitask parallel boot on a software level.
Taking the selection of the BDS stage by the boot device as an example, one of the time-consuming stages in the UEFI BIOS boot process is the stage of initializing console devices such as ConsoleIn and consoleiout, USB keyboard and mouse, and VGA in the BDS stage, and if devices such as PCIE/SATA HDD are externally connected, enumeration and loading of corresponding device drivers are also required in the BDS stage, the more external devices are, and the longer the boot time is.
Driver Execution Environment (DXE) phase in UEFI BIOS starting process is responsible for registering and distributing various software and hardware initialization services, the disclosure encapsulates a multitask Execution mechanism (namely activating an AP for operating initialization modules of various peripheral devices of BDS) program into a Protocol form and registers and installs the Protocol form in DXE phase, and the BDS phase can directly call the Protocol form by a Locate Protocol interface (for finding an entry address of a specified Protocol function from UEFI kernel) to accelerate the starting speed of the BDS phase, so that the encapsulation method is more in line with UEFI specification.
When the DXE stage completes initialization work of Services such as Boot Services, Runtime Services and the like, and multi-core Service MP Service installation is completed, the MP Service protocol interface and the Event mechanism can be called. At the moment, an EFI multitask PROTOCOL interface, namely an EFI _ MULTI _ TASK _ PROTOCOL interface, is created and registered and installed in a Handle Database, the PROTOCOL internally realizes traversing of each drive function and transferring of an entry address of the drive function to a StartupThisAP function, so that each peripheral drive function is distributed to different APs to be executed, and the capability of concurrently loading a plurality of peripheral drivers in a BDS stage is realized. In UEFI, all device drivers are installed in the form of Protocol onto a Controller, which is an abstraction of a Handle, and a Handle DataBase, Handle databanke, is a collection of all handles.
An Extended Firmware Interface (EFI) multitasking PROTOCOL EFI _ MULTI _ TASK _ PROTOCOL Interface is a new Interface provided by the present disclosure, and the EFI _ MULTI _ TASK _ PROTOCOL Interface can be installed by calling an installation PROTOCOL Interface installprotocol Interface function of UEFI, as follows:
Figure BDA0003126036520000111
Figure BDA0003126036520000121
wherein the handle parameter is used to indicate a handle of the installed protocol interface.
The EFI _ MULTISK _ PROTOCOL _ GUIDE parameter is a PROTOCOL guid and is the unique identification ID of the currently installed PROTOCOL;
the parameters of the NULL position are used for specifying the interface type of the Protocol installed at present, can be NULL, represent that no type is specified, and the Native type installation is installed by default;
the parameter of the EFI _ MULTI _ TASK _ PROTOCOL location is used to indicate the interface address of the installation PROTOCOL: if the current installprotocol interface is successfully executed, the parameter represents the interface address of the installed Protocol, and the interface address can be directly accessed subsequently to call the relevant function interface provided by the Protocol service.
The function of the InstallProtocolInterface function is to install a service function interface on the corresponding handle, and then the driver corresponding to the handle can use the service function provided by the Protocol
For example, the pcibussstart driver entry address responsible for enumerating the load PCI device driver may be specified for execution on application core AP1, and the AhciBusStart driver entry may be specified for execution on another application core AP 2. If a certain peripheral driver can be loaded only after the execution of the previous driver is finished, an associated event of the peripheral driver can be created through a createeevent, and the event is transmitted to a waiteevent entry parameter in the starupphiesp, namely, a driver function of the associated event is executed after the execution of the previous driver is finished.
Fig. 6 is a schematic diagram of a method for implementing UEFI BIOS boot using an EFI multitasking protocol interface according to an embodiment of the present disclosure, including the steps of:
step 601, starting a processor BSP to start and execute a system initialization task, and completing initialization of an event mechanism and/or an MP service protocol;
during UEFI BIOS boot-up, the MP service PROTOCOL EFI _ MP _ SERVICES _ PROTOCOL interface and Event mechanism first need to be initialized by the boot processor BSP.
Step 602, the starting processor BSP creates an EFI multitask protocol interface and installs the interface into a handle database;
this step creates an EFI multitasking PROTOCOL EFI _ MULTI _ TASK _ progress interface, the Handle of which is installed into the Handle DataBase.
Step 603, judging whether the EFI multitask protocol interface is created and installed successfully, if so, executing step 604, otherwise, executing step 601;
if the EFI multitasking protocol interface is not successfully created and installed, the initialization and installation steps need to be waited for or re-performed.
Step 604, after the DXE phase finishes dispatching Dispatch of each platform driver function, loading each peripheral driver into the memory to wait for the BDS phase to be called and executed;
after registration and installation of an EFI multitask PROTOCOL EFI _ MULTII _ TASK _ PROTOCOL interface are completed in a DXE stage, scheduling of driving functions of each platform is carried out, and various peripheral driving programs are loaded into a memory to wait for a BDS stage to be called and executed.
Step 605, after entering the BDS stage, starting the processor BSP to enable the EFI multitask protocol interface through LocateProtocol, and traversing each peripheral driver;
in the BDS stage of starting equipment selection, the entry address of the EFI _ MULTI _ TASK _ PROTOCOL interface can be found from the UEFI kernel through a LocateProtocol interface provided by UEFI, and all peripheral drivers are traversed.
Step 606, a plurality of peripheral drivers are respectively dispatched to different application core APs for parallel starting through an MP service protocol interface mode and an Event mechanism;
by calling an EFI multitask PROTOCOL EFI _ MULTII _ TASK _ PROTOCOL interface, a plurality of device drivers are respectively dispatched to different application cores AP to be started in parallel by adopting an MP service PROTOCOL interface mode and an Event mechanism mode, so that the starting speed of the BDS phase is accelerated. Under the condition that the dependency relationship of the peripheral drivers does not exist, only an MP service protocol interface mode is adopted.
Step 607, judging whether there is dependency relationship between two peripheral drivers, if yes, executing step 608, otherwise executing step 609;
step 608, creating a correlation event through the CreateEvent function, transferring a driver dependent on other peripheral drivers as an entry parameter to the StartupThisAP function, and then executing step 606;
and step 609, after the UEFI BIOS is started, giving control to the OS.
The method and the device have the advantages that the in-place information and the error diagnosis data of the equipment are written into the plug-in storage medium of the BMC chip, so that the time consumption of the process of recording the in-place information and the fault information is extremely short, when the master control CPU system is abnormal, the BMC chip can still obtain the in-place information and the error diagnosis data of the equipment of the current system from the plug-in storage medium, and the situation that the configuration and the diagnosis data of the whole equipment cannot be obtained due to the abnormality of the master control CPU, and the problem reproduction and the problem positioning are influenced can be avoided. The BMC chip directly reads the complete machine configuration and fault diagnosis information from the storage medium externally hung on the BMC, thereby avoiding the situation that the system can not obtain the diagnosis and configuration data due to the abnormality of the IPMI channel in the starting process of the BIOS, and simultaneously avoiding the problems of overlong time consumption in the process of waiting for the ready of the IPMI channel in the starting process and the like.
According to the method and the device, the start of each device driver in the UEFI BIOS starting process is executed concurrently through the newly added EFI multitask protocol interface, so that the starting process of the server is accelerated globally, and better experience is brought to a user.
Fig. 7 is a schematic structural diagram of an electronic device capable of implementing a UEFI-based server booting method according to an embodiment of the present disclosure, where the device 700 includes: a processor 710 such as a Central Processing Unit (CPU), a communication bus 720, and a storage medium 730. Wherein the processor 710 and the storage medium 730 can communicate with each other through a communication bus 720. The storage medium 730 stores therein a computer program that, when executed by the processor 710, performs the functions of the steps of the methods provided by the present disclosure.
The storage medium may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. In addition, the storage medium may be at least one memory device located remotely from the processor. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), etc.; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It should be recognized that embodiments of the present disclosure can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose. Further, operations of processes described by the present disclosure may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described in this disclosure (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) executing collectively on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the disclosure may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described in this disclosure includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The disclosure also includes the computer itself when programmed according to the methods and techniques described in this disclosure.
The above description is only an example of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations of this disclosure will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (10)

1. A UEFI-based server boot method, the method comprising:
writing the equipment in-place information and error diagnosis data reported by the UEFI BIOS into a plug-in storage medium of a baseboard controller (BMC) chip in the starting process of the UEFI BIOS; the BMC chip directly reads the whole machine configuration and the fault diagnosis message from a storage medium externally hung on the BMC;
and in the starting process of the UEFIBIOS, a plurality of peripheral drivers are loaded through an extended firmware interface EFI multitasking protocol interface.
2. The method of claim 1, wherein writing the device presence information and the error diagnosis data reported by the UEFI BIOS to a storage medium external to the BMC chip specifically comprises:
respectively writing the in-place information and the error diagnosis data of the equipment into a specified storage area in a storage medium externally hung on the BMC chip;
the specified storage area comprises a head area and a data storage area; the head area is used for storing the space occupied by the data storage area and the recording completion flag bit;
the data storage area comprises an equipment in-place data area and an error diagnosis data area, the equipment in-place data area records the information of the in-place condition of the whole equipment, and the error diagnosis data area records the fault information of the equipment.
3. The method according to claim 1, wherein said concurrently loading a plurality of peripheral drivers via the extended firmware interface EFI multitasking protocol interface is specifically:
starting a processor BSP to create and install an EFI MULTI-TASK PROTOCOL interface, namely an EFI _ MULTII _ TASK _ PROTOCOL interface;
and traversing all the peripheral drivers through an EFI multi-task PROTOCOL interface, activating the application processor AP through a multi-core MP service PROTOCOL interface, namely an EFI _ MP _ SERVICES _ PROTOCOL interface, respectively dispatching the peripheral drivers to different application processors AP, and starting all the peripheral drivers in parallel.
4. The method according to claim 3, wherein when there is a dependency relationship between peripheral drivers, an Event mechanism provided by UEFI is used to load peripheral drivers dependent on other peripheral drivers in an associated manner, and the specific method is;
starting a first peripheral driver depended by a second peripheral driver through an interface StartupThisAP of a starting AP of an MP service protocol interface, wherein an inlet of the first peripheral driver is introduced through a WaitEvent parameter of the StartupThisAP;
and creating a timing event for loading the second external drive program by establishing an event CreateEvent function, and executing the timing event by a timer when the timing time is up by setting the timer so as to load the second external drive program after the first external drive program is loaded.
5. The method of claim 3,
finding the EFI multi-task protocol interface from a UEFI kernel through a LocateProtocol interface provided by the UEFI; and the EFI multi-task protocol interface is installed by calling an installation protocol interface InstallProtocolInterface function of UEFI.
6. A UEFI-based server boot apparatus, comprising:
the plug-in storage medium writing module is used for writing the equipment in-place information and the error diagnosis data reported by the UEFIBIOS into a plug-in storage medium of the BMC chip of the substrate controller in the starting process of the UEFIBIOS; the storage medium externally hung on the BMC reads the whole machine configuration and the fault diagnosis information and is directly read by the BMC chip;
and the peripheral driver concurrent loading module is used for concurrently loading a plurality of peripheral drivers through the extended firmware interface EFI multitask protocol interface in the starting process of the UEFIBIOS.
7. The apparatus of claim 6,
the plug-in storage medium writing module writes the equipment in-place information and the error diagnosis data into a specified storage area in the plug-in storage medium of the BMC chip respectively;
the specified storage area comprises a head area and a data storage area; the head area is used for storing the space occupied by the data storage area and the recording completion flag bit;
the data storage area comprises an equipment in-place data area and an error diagnosis data area, the equipment in-place data area records the information of the in-place condition of the whole equipment, and the error diagnosis data area records the fault information of the equipment.
8. The apparatus of claim 6,
the peripheral driver concurrent loading module creates and installs an EFI MULTI-TASK PROTOCOL interface, namely an EFI _ MULTII _ TASK _ PROTOCOL interface, by starting a processor BSP; and traversing all the peripheral drivers through the EFI multitask PROTOCOL interface, activating the application processor AP through a multi-core MP service PROTOCOL interface, namely an EFI _ MP _ SERVICES _ PROTOCOL interface, and respectively dispatching the peripheral drivers to different application processors AP to start all the peripheral drivers in parallel.
9. The apparatus of claim 8,
when the dependency relationship exists between the peripheral drivers, the peripheral driver concurrent loading module also carries out associated loading on the peripheral drivers depending on other peripheral drivers through an Event mechanism provided by UEFI;
the peripheral driver concurrent loading module starts a first peripheral driver program depended by a second peripheral driver program through an interface StartupThisAP of a starting AP of an MP service protocol interface, and an inlet of the first peripheral driver program is introduced through a WaitEvent parameter of the StartupThisAP;
the peripheral driver concurrent loading module creates a timing event for loading the second peripheral driver by establishing an event CreateEvent function, and executes the timing event by setting a timer when the timing time is up, so as to load the second peripheral driver after the first peripheral driver is loaded.
10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 5.
CN202110690627.4A 2021-06-22 2021-06-22 UEFI (unified extensible firmware interface) -based server starting method and device and storage medium Pending CN113377566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110690627.4A CN113377566A (en) 2021-06-22 2021-06-22 UEFI (unified extensible firmware interface) -based server starting method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110690627.4A CN113377566A (en) 2021-06-22 2021-06-22 UEFI (unified extensible firmware interface) -based server starting method and device and storage medium

Publications (1)

Publication Number Publication Date
CN113377566A true CN113377566A (en) 2021-09-10

Family

ID=77578209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110690627.4A Pending CN113377566A (en) 2021-06-22 2021-06-22 UEFI (unified extensible firmware interface) -based server starting method and device and storage medium

Country Status (1)

Country Link
CN (1) CN113377566A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237751A (en) * 2021-12-20 2022-03-25 联想(北京)信息技术有限公司 Information configuration method and device
CN114282217A (en) * 2021-12-22 2022-04-05 完美世界征奇(上海)多媒体科技有限公司 Game plug-in detection method and device, storage medium and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101421700A (en) * 2006-04-19 2009-04-29 英特尔公司 Method and apparatus to support independent systems in partitions of a processing system
US20090259749A1 (en) * 2006-02-22 2009-10-15 Emulex Design & Manufacturing Corporation Computer system input/output management
CN103853586A (en) * 2014-03-05 2014-06-11 中南大学 Method of realizing wireless card driver in UEFI (unified extensible firmware interface) layer
CN105378689A (en) * 2013-06-14 2016-03-02 惠普发展公司,有限责任合伙企业 Unified extensible firmware interface (UEFI) driver and protocol
KR101712172B1 (en) * 2016-11-04 2017-03-03 (주)스마트인디지털 The preliminary diagnosis and analysis and recovery system of computer error, and method thereof
CN106909468A (en) * 2015-12-22 2017-06-30 中电科技(北京)有限公司 A kind of computer fault diagnosis method based on UEFI firmwares
CN109086155A (en) * 2018-07-27 2018-12-25 郑州云海信息技术有限公司 Server failure localization method, device, equipment and computer readable storage medium
CN111708662A (en) * 2020-05-26 2020-09-25 新华三技术有限公司 Debugging method and device
CN111767184A (en) * 2020-09-01 2020-10-13 苏州浪潮智能科技有限公司 Fault diagnosis method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090259749A1 (en) * 2006-02-22 2009-10-15 Emulex Design & Manufacturing Corporation Computer system input/output management
CN101421700A (en) * 2006-04-19 2009-04-29 英特尔公司 Method and apparatus to support independent systems in partitions of a processing system
CN105378689A (en) * 2013-06-14 2016-03-02 惠普发展公司,有限责任合伙企业 Unified extensible firmware interface (UEFI) driver and protocol
CN103853586A (en) * 2014-03-05 2014-06-11 中南大学 Method of realizing wireless card driver in UEFI (unified extensible firmware interface) layer
CN106909468A (en) * 2015-12-22 2017-06-30 中电科技(北京)有限公司 A kind of computer fault diagnosis method based on UEFI firmwares
KR101712172B1 (en) * 2016-11-04 2017-03-03 (주)스마트인디지털 The preliminary diagnosis and analysis and recovery system of computer error, and method thereof
CN109086155A (en) * 2018-07-27 2018-12-25 郑州云海信息技术有限公司 Server failure localization method, device, equipment and computer readable storage medium
CN111708662A (en) * 2020-05-26 2020-09-25 新华三技术有限公司 Debugging method and device
CN111767184A (en) * 2020-09-01 2020-10-13 苏州浪潮智能科技有限公司 Fault diagnosis method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
WENKAI HAO等: "A Fault-tolerant Data Fusion Method Based on Decentralized Kalman Filter for Redundant Sensor Configurations", IEEE, 17 October 2019 (2019-10-17) *
王栩浩: "基于IPMI的服务器管理系统的实现", CNKI, 15 February 2017 (2017-02-15) *
贾天江;曾光裕;王炜;周振宇;: "基于USBKey的可信启动技术研究", 信息工程大学学报, no. 02, 15 April 2016 (2016-04-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237751A (en) * 2021-12-20 2022-03-25 联想(北京)信息技术有限公司 Information configuration method and device
CN114282217A (en) * 2021-12-22 2022-04-05 完美世界征奇(上海)多媒体科技有限公司 Game plug-in detection method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US9612846B2 (en) Out-of-band (OOB) real-time inventory and configuration of original equipment manufacturer (OEM) devices using advanced configuration and power interface (ACPI) and unified extensible firmware interface (UEFI) services
US10613773B2 (en) Backing up firmware during initialization of device
US6158000A (en) Shared memory initialization method for system having multiple processor capability
US9298524B2 (en) Virtual baseboard management controller
US8032899B2 (en) Providing policy-based operating system services in a hypervisor on a computing system
US9052916B2 (en) System ROM with an embedded disk image
US20070011507A1 (en) System and method for remote system support
US7356684B2 (en) Booting system and/or method for initializing peripherals
US7454547B1 (en) Data exchange between a runtime environment and a computer firmware in a multi-processor computing system
US10606677B2 (en) Method of retrieving debugging data in UEFI and computer system thereof
CN102207896A (en) Virtual machine crash file generation techniques
US10831467B2 (en) Techniques of updating host device firmware via service processor
US9639486B2 (en) Method of controlling virtualization software on a multicore processor
US20060294149A1 (en) Method and apparatus for supporting memory hotplug operations using a dedicated processor core
US9417886B2 (en) System and method for dynamically changing system behavior by modifying boot configuration data and registry entries
CN113377566A (en) UEFI (unified extensible firmware interface) -based server starting method and device and storage medium
US20070129860A1 (en) Vehicle Service Equipment Interface Drivers
EP3633507B1 (en) Technologies for secure and efficient native code invocation for firmware services
US6907521B2 (en) Enabling video BIOS and display drivers to leverage system BIOS platform abstract
US20130097412A1 (en) Performing A Boot Sequence In A Multi-Processor System
CN116225541A (en) Method and system for communication between in-band CPU and out-of-band management BMC
CN112667544A (en) Method, device, system and medium for controlling mainboard slot enabling
US10782764B2 (en) Techniques of emulating an ACPI controller on a service processor
US20240020103A1 (en) Parallelizing data processing unit provisioning
US20240036896A1 (en) Generating installation images based upon dpu-specific capabilities

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