BIOS upgrading method and system based on BMC virtual U disk
By using BMC virtual USB drive technology, compatibility and security issues in BIOS upgrades are resolved. It achieves hardware platform decoupling and secure and reliable collaborative flashing, thereby improving the success rate and security of BIOS upgrades.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-27
AI Technical Summary
Existing BIOS upgrade technologies have shortcomings in terms of compatibility and security. Traditional BMC direct flashing solutions cannot guarantee perfect compatibility with all hardware platforms, and remote solutions based on BMC have problems such as an excessively large attack surface and inability to meet the needs of large-scale automated operation and maintenance.
Using BMC virtual USB drive technology, the management platform issues upgrade commands and monitors hardware status, generates a hardware ready identifier, maps it to a virtual USB drive and mounts the BIOS image file. The BIOS recognizes the virtual USB drive during the power-on self-test phase, establishes a hardware-level handshake protocol, and performs flashing operations through a collaborative mechanism. It also performs verification and resource cleanup and dynamically updates upgrade commands.
This decoupling of the hardware platform improves the success rate of device recognition, reduces the risk of failure due to differences in chip architecture, and enhances security, reliability, and risk resistance.
Smart Images

Figure CN121742869A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of server firmware management, and in particular to a BIOS upgrading method and system based on BMC virtual U disk. BACKGROUND
[0002] With the continuous improvement of server complexity, as the core firmware of hardware initialization, the safe and efficient upgrading mechanism of BIOS has become a key technical issue of data center operation and maintenance. The current mainstream BIOS upgrading technology mainly evolves in two directions: one is the local upgrading mode based on physical U disk, which realizes the standardized writing process through on-site operation of technical personnel, and has high compatibility and reliability; the second is the remote writing technology based on baseboard management controller (BMC), which realizes remote operation by using intelligent platform management interface (IPMI) protocol, and significantly improves the operation and maintenance efficiency. In recent years, with the maturity of virtualization technology, some schemes try to apply USB device virtualization technology to the field of firmware management, and realize remote file transmission through BMC simulation of USB device. At the same time, in the security mechanism, the introduction of digital signature, encrypted transmission and other technologies provides basic security guarantee for remote upgrading. In the aspect of automatic operation and maintenance, artificial intelligence technologies such as predictive analysis and hidden Markov algorithm begin to be applied to hardware state monitoring, which provides a new technical path for intelligent judgment of initialization process.
[0003] Although the existing technology has made progress, there are still two key technical defects in actual deployment. First, in terms of compatibility and reliability, the traditional BMC direct writing scheme has inherent limitations: due to the differences in BIOS chip architecture of different manufacturers, the writing algorithm of BMC is difficult to ensure perfect compatibility with all hardware platforms, especially in the processing of heterogeneous computing environment, it is easy to cause upgrading failure due to time sequence mismatch or protocol difference. Secondly, in terms of security and automation degree, the existing scheme is difficult to balance operation safety and operation and maintenance efficiency: although the physical U disk upgrading mode avoids the remote attack surface, it depends on manual on-site operation and cannot meet the automatic operation and maintenance needs of large-scale data centers; while the remote scheme based on BMC realizes automation, but its active writing mode expands the attack surface, and malicious code may tamper with the BIOS firmware by invading the management platform. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a BIOS upgrading method based on BMC virtual U disk to solve the problems of insufficient hardware adaptability and large environmental attack surface caused by BMC direct writing in the prior art.
[0006] To solve the above technical problems, the present application provides the following technical scheme: In a first aspect, the present application provides a BMC virtual U disk-based BIOS upgrade method, which comprises: a management platform issuing an upgrade instruction to a BMC and listening to a hardware state through an intelligent platform management interface; when detecting that initialization is completed, generating a hardware readiness identifier; based on the hardware readiness identifier, mapping an internal storage area as a virtual U disk and mounting a target BIOS image file, while feeding back a virtual device readiness signal to the management platform; a BIOS identifying the virtual U disk corresponding to the virtual device readiness signal in a power-on self-test stage, loading a boot image and initializing a flashing tool running environment, and generating a flashing upgrade instruction; based on the flashing upgrade instruction, the BMC and a BIOS chip establishing a hardware-level handshake protocol, and performing a flashing operation through a coordination mechanism, and generating a hardware coordination completion signal; based on the hardware coordination completion signal, verifying the BIOS chip and resource cleaning, and dynamically updating the flashing upgrade instruction according to the verification and resource cleaning result.
[0007] As a preferred scheme of the BMC virtual U disk-based BIOS upgrade method, the management platform issues an upgrade instruction to the BMC and listens to a hardware state through an intelligent platform management interface, and the specific steps are as follows, The management platform sends an upgrade instruction package to the BMC through an encrypted communication protocol, and performs security verification on the upgrade instruction package to establish a hardware monitoring session. Based on the hardware monitoring session, the hardware state parameters are collected through the intelligent platform management interface and standardized processing is performed.
[0008] As a preferred scheme of the BMC virtual U disk-based BIOS upgrade method, the management platform issues an upgrade instruction to the BMC and listens to a hardware state through an intelligent platform management interface, and the specific steps are as follows, When detecting that initialization is completed, the hardware readiness identifier is generated, and the specific steps are as follows, The standardized hardware state parameters are input into a prediction analysis model to calculate a hardware initialization completion degree estimate value. The hardware initialization completion degree estimate value is verified through a hidden Markov algorithm, and when the hardware initialization completion degree estimate value is consistent with the estimate value obtained by the hidden Markov algorithm, the hardware readiness identifier is generated.
[0009] As a preferred scheme of the BMC virtual U disk-based BIOS upgrade method, the management platform issues an upgrade instruction to the BMC and listens to a hardware state through an intelligent platform management interface, and the specific steps are as follows, Based on the hardware readiness identifier, the internal storage area is mapped as a virtual U disk and the target BIOS image file is mounted, while the virtual device readiness signal is fed back to the management platform, and the specific steps are as follows, After receiving the hardware readiness identifier, the BMC verifies the integrity and timeliness of the hardware readiness identifier to generate a virtualization trigger signal. According to the virtualization trigger signal, the BMC divides the virtual U disk space from the internal storage area, configures and BIOS compatible virtual U disk attribute parameters, and obtains a space configuration completion identifier; Based on the space configuration completion identifier, a USB Gadget function is called to simulate a virtual U disk device, and a BIOS image file is mounted by using a segmentation mechanism to generate a mounting success signal.
[0010] After receiving the mounting success signal, the BMC automatically collects a virtual U disk identifier, a timestamp and an image, encapsulates them, and feeds back a virtual device ready signal to the management platform through TLS encryption.
[0011] As a preferred scheme of the BIOS upgrading method based on the BMC virtual U disk, wherein: The BIOS identifies the virtual U disk corresponding to the virtual device ready signal in the power-on self-test stage, and mounts a boot image, and the specific steps are as follows, The BIOS scans the USB device through a device enumeration mechanism in the power-on self-test stage, and when detecting the virtual U disk corresponding to the virtual device ready signal, performs identity authentication on the virtual U disk. After the identity authentication of the virtual U disk is passed, the BIOS reads the boot sector information of the virtual U disk, verifies the integrity and digital signature validity of the U disk boot image, and mounts the U disk boot image to a preset memory working area.
[0012] As a preferred scheme of the BIOS upgrading method based on the BMC virtual U disk, wherein: The initialization of the flashing tool running environment generates a flashing upgrade instruction, and the specific steps are as follows, After the U disk boot image is mounted, the BIOS performs resource allocation and initializes the flashing tool running environment; After the flashing tool running environment is ready, the BIOS parses the flashing tool configuration parameters in the U disk boot image, and generates a flashing upgrade instruction according to the target BIOS chip type.
[0013] As a preferred scheme of the BIOS upgrading method based on the BMC virtual U disk, wherein: According to the flashing upgrade instruction, the BMC establishes a hardware level handshake protocol with the BIOS chip, and the specific steps are as follows, The BMC parses the BIOS chip address and operation type according to the flashing upgrade instruction, initializes the MPC handshake protocol state machine, and generates an initialization completion signal; Based on the initialization completion signal, the BMC starts a multi-round voting handshake process as a master node, and outputs a voting success identifier when multiple nodes respond consistently.
[0014] As a preferred scheme of the BIOS upgrading method based on the BMC virtual U disk, wherein: The write operation is performed through the cooperative mechanism to generate a hardware cooperation completion signal, and the specific steps are as follows, According to the voting success identifier, the performance gradient change is monitored in the shared memory area in real time, and a write state signal is generated according to the performance gradient change result; The BMC extracts the write progress and error type from the write state signal, generates an operation summary, and enriches and reinforces the operation summary through encapsulation and security signature, and generates a hardware cooperation completion signal.
[0015] As a preferred scheme of the BIOS upgrading method based on the BMC virtual U disk, wherein: The BIOS chip is verified and resource cleaned based on the hardware cooperation completion signal, and the write upgrade instruction is dynamically updated according to the verification and resource cleaning result, and the specific steps are as follows, Based on the hardware cooperation completion signal, the BIOS chip is verified and resource cleaned through the BMC to generate a verification summary and a resource cleaning result; According to the verification summary and the resource cleaning result, the write upgrade instruction is dynamically updated by correcting the planned write interval; Based on the dynamically updated write upgrade instruction, the BMC deploys the updated instruction through the virtual U disk channel.
[0016] In a second aspect, the application provides a BIOS upgrading system based on a BMC virtual U disk, which comprises an instruction issuing module, a mapping and mounting module, an identification and write module, a write operation module and a verification and updating module. The instruction issuing module is used for issuing an upgrading instruction to the BMC by a management platform, and listening to the hardware state through an intelligent platform management interface (IPMI) command, and generating a hardware ready identifier when detecting that the initialization is completed. The mapping and mounting module is used for mapping an internal storage area as a virtual U disk and mounting a target BIOS image file based on the hardware ready identifier, and feeding back a virtual device ready signal to the management platform. The identification and write module is used for identifying the virtual U disk corresponding to the virtual device ready signal by BIOS in a power-on self-test stage, loading a boot image and initializing a write tool running environment, and generating a write upgrade instruction. The write operation module is used for establishing a hardware level handshake protocol between the BMC and the BIOS chip according to the write upgrade instruction, and performing a write operation through a cooperative mechanism to generate a hardware cooperation completion signal. The verification and updating module is used for verifying and cleaning the BIOS chip based on the hardware cooperation completion signal, and dynamically updating the write upgrade instruction according to the verification and resource cleaning result.
[0017] The application has the beneficial effects that: through the virtual U disk mapping and mounting mechanism, the compatibility problem caused by hardware difference in traditional remote upgrading is solved, the upgrading process is decoupled from the hardware platform, the device recognition success rate is improved, and the failure risk caused by chip architecture difference is reduced; through the hardware level handshake protocol and cooperative mechanism, safe and reliable cooperative flashing is realized, the anti-risk ability of BMC authority and the reliability of flashing operation are improved. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0019] Fig. 1 Flow chart of the BIOS upgrading method of the BMC virtual U disk.
[0020] Fig. 2 Schematic diagram of the BIOS upgrading system of the BMC virtual U disk.
[0021] Fig. 3 Flow chart of generating the hardware ready identifier.
[0022] Fig. 4 Flow chart of generating the flashing upgrade instruction. DETAILED DESCRIPTION
[0023] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.
[0024] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0025] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0026] REFERENCE Figs. 1-4 For one embodiment of the present application, the embodiment provides a BIOS upgrading method based on BMC virtual U disk, comprising the following steps: S1, the management platform sends an upgrade instruction to the BMC, and listens to the hardware state through the intelligent platform management interface. When it detects that the initialization is completed, a hardware readiness identifier is generated.
[0027] The management platform sends an upgrade instruction package to the BMC through an encrypted communication protocol, and performs security verification on the upgrade instruction package to establish a hardware monitoring session.
[0028] The specific process includes that the management platform sends an upgrade instruction package to the BMC through a two-way authentication encrypted channel. After receiving the package, the BMC immediately starts the verification process: using the management platform public key certificate, it verifies whether the attached digital signature is valid, thereby ensuring that the upgrade instruction comes from a legal platform and has not been tampered with, and at the same time, it checks whether the timestamp in the upgrade instruction is within the time window. After verification, the BMC parses the upgrade instruction content and creates a dedicated "hardware monitoring session", and at the same time, it activates real-time monitoring tasks for hardware components such as BIOS chips, power supplies and temperature sensors, continuously collects transmission rates, error codes and power consumption, and generates a hardware readiness identifier.
[0029] Based on the hardware monitoring session, hardware state parameters are collected through the intelligent platform management interface and standardized.
[0030] The specific process includes that the BMC collects multi-dimensional hardware state parameters through the intelligent platform management interface, including CPU core voltage, memory training progress, PCIe device enumeration status code and chip junction temperature. The collected multi-dimensional hardware state parameters are data cleaned to remove abnormal values caused by signal interference, and standardized. For continuous parameters such as voltage, scaling is performed, while for progress parameters, they are converted to a normal distribution with a mean of 0 and a standard deviation of 1. Finally, the status code is converted to a binary vector, for example, status code "0x01" is encoded as [1, 0, 0].
[0031] The standardized hardware state parameters are input into a prediction analysis model to calculate the hardware initialization completion degree estimate value, expressed as: wherein, represents the hardware initialization completion degree estimate value, represents the calibration coefficient, represents the observation time window, represents the total number of hardware parameters, represents the index of the hardware parameter, represents the weight coefficient of the th hardware parameter, represents the error function, represents the value of the th hardware state parameter at time , represents the The expected mean of each hardware state parameter, Indicates the first The standard deviation of each hardware status parameter Represents the global decay constant. Indicates the first Time decay factor of each hardware state parameter Represents a time variable.
[0032] It should be noted that, These are crucial calibration coefficients. Their core function is to normalize the dimensions and adjust the numerical range of the raw calculation results output by the model, so that the final estimated value of hardware initialization completion is accurate. It has a clear physical meaning and a unified measurement standard. The value needs to be empirically calibrated or data-driven optimized based on the hardware environment. For example, for traditional hardware with a slow initialization process, a smaller value is usually set. (e.g., 0 < ≤ 0.5), for high-performance hardware platforms, a larger setting is recommended. Values to improve response sensitivity (e.g., 1.5 ≤ < 2); Hardware parameters include processor parameters, memory parameters, bus and interface parameters, and chipset and platform parameters. To quantify the relative importance of parameters in hardware initialization completion estimation, weighting coefficients are typically assigned based on domain knowledge or historical data. For example, if a parameter (such as CPU temperature or memory error rate) has a greater impact on the success of initialization, it will be assigned a higher weight value (e.g., ...). If the weight is close to 1, then a lower weight is assigned (e.g., ...). (close to 0) It serves as a reference standard for judging whether hardware status parameters are normal. For example, for the parameter "CPU core voltage", It may be set to 1.0V, meaning the voltage should stabilize around this value when initialization is complete; The rate at which the influence of historical data on the current completion estimate of this parameter decays over time was controlled. Larger (0.2 < ≤1) indicates a fast decay rate. Smaller (0.001≤ <0.05 indicates a slow decay rate; Based on optimization using historical data from a large amount of hardware initialization processes, the time normalization factor, which acts as the denominator of the entire formula, functions to uniformly adjust the "memory decay" of the combined effects of all parameters within the entire observation time window. Larger values (e.g.) >0.1) so that the final calculated completion estimate is more determined by the recent state of the initialization process, a value smaller (e.g. <0.01) then the performance of the entire initialization process is considered.
[0033] The specific process includes standardizing the hardware state parameters collected by the BMC, eliminating the dimensional influence, and inputting the sequence of the hardware state parameters changing over time into the prediction analysis model in real time. The core algorithm of the prediction analysis model assigns dynamic weights to each hardware state parameter, calculates the normalized deviation of the real-time data of the hardware state parameter from the ideal target value, integrates and sums the weighted evaluation results of all hardware state parameters within the entire initialization time window to obtain the overall fitting metric value, and normalizes the comparison between the fitting metric value and the time reference representing the ideal decay rate to obtain a hardware initialization completion estimate value between 0 and 1. This value intuitively reflects the closeness of the current hardware state to the fully ready target.
[0034] It should be noted that the training process of the prediction analysis model (dynamic weighted decay integral model) begins with collecting a large amount of known successful and failed server hardware initialization case data, and automatically and continuously collecting through the underlying monitoring driver of the BMC, server event logs, and firmware self-checking mechanism in each initialization process to form complete sequences containing various hardware state parameters (such as CPU core voltage, memory training progress, PCIe device enumeration status code, and chip junction temperature) changing over time. The collected server hardware initialization case data is cleaned and standardized for preprocessing, outliers are removed, voltage class parameters are scaled, progress class parameters are converted to standard normal distribution, and status codes are converted to binary vectors to eliminate dimensional influence. Based on the cleaned server hardware initialization case data, a supervised learning method is used, the final result of hardware initialization (success marked as 1, failure marked as 0) is used as the true label, the standardized parameter sequence is used as the input feature, and the internal weights of the prediction analysis model are adjusted through an optimization algorithm (such as gradient descent) to minimize the error (usually using mean square error or mean absolute error as the loss function) between the completion estimate value output by the prediction analysis model and the true label, obtaining a prediction analysis model that can accurately predict the initialization completion degree according to real-time hardware state parameters.
[0035] The hardware initialization completion estimate value is verified by the hidden Markov algorithm, and when the hardware initialization completion estimate value is consistent with the estimate value obtained by the hidden Markov algorithm, the hardware ready identifier is generated.
[0036] The specific process includes that the hidden Markov algorithm identifies three states of "uninitialized", "partially initialized" and "ready" by analyzing the real-time collected standardized hardware parameter sequence, and generates a hardware ready signal containing a time mark, a confidence level and a state identifier when the observed standardized hardware parameter sequence (strong correlation of persistence, stability and consistency) continuously indicates the ready state and is consistent with the change trend of the completion estimation value.
[0037] It should be noted that the hidden Markov algorithm is a sequence analysis tool, which describes the system behavior through a double-layer structure of hidden state sequence and observation sequence. The hidden Markov algorithm includes three core elements: a hidden state set (representing internal invisible true states), an observation state set (representing measurable external manifestations), and a state transition probability matrix (describing the conversion law between states). In the hardware initialization scene, "uninitialized", "partially initialized" and "ready" are taken as hidden states, and the collected hardware parameters are taken as observation sequences, and the hardware state is verified by analyzing the relationship between observation data and states.
[0038] S2, based on the hardware ready identifier, mapping the internal storage area as a virtual U disk and mounting the target BIOS image file, and feeding back a virtual device ready signal to the management platform.
[0039] After receiving the hardware ready identifier, the BMC verifies the integrity and timeliness of the hardware ready identifier, and generates a virtualization trigger signal.
[0040] The specific process includes that after receiving the hardware ready identifier, the BMC verifies the integrity of the identifier by data verification, checks whether the data structure is correct by comparing a preset format template, and verifies whether the digital signature and the key match, and at the same time, performs timeliness verification by comparing the timestamp in the identifier with the internal clock of the BMC to determine whether it is within the preset valid time window. When all verifications are passed, the BMC converts the verified state into a standardized virtualization trigger signal according to the predefined business logic rules. The signal will be written to a specified register address, thereby activating the subsequent virtualization process.
[0041] It should be noted that the preset format template is a definition rule about the data structure of the "hardware ready identifier" pre-stored in the BMC firmware, including data layout specification: clearly specifying the total length of the identifier, the fixed position and length of each field, for example, the first several bytes are fixed magic number, version number field, byte range of timestamp field and starting position and length of digital signature data segment; field format definition: detailing the legal format of each field, for example, the timestamp field must follow the UTC timestamp format, the version number must be a specific value and the state flag must be within the predefined enumeration value range; static content constraint: containing fixed values that must be completely matched, such as specific file header magic number and protocol identifier.
[0042] It should also be noted that the predefined business logic refers to the state judgment and instruction mapping rule explicitly set according to the management requirements of hardware virtualization at the beginning of being implanted in the BMC firmware. The core content package: condition judgment rule, clearly determines that the verification is passed when the "identification structure is complete", "digital signature is valid" and "timestamp is not expired" are met at the same time; the state conversion rule stipulates that the trigger signal should be generated immediately after the verification is passed, and if any condition is not met, the error log needs to be recorded and the subsequent instruction is waited; the signal generation specification strictly defines the data format of the virtualization trigger signal, the bearing register address and the trigger duration.
[0043] The BMC divides the virtual U disk space from the internal storage area, and configures the virtual U disk attribute parameters compatible with the BIOS to obtain the space configuration completion identifier.
[0044] The specific process includes that the BMC allocates a specific continuous area as the basis space of the virtual U disk from the non-volatile storage space according to the specification indicated by the virtualization trigger signal, and sets various attributes of the virtual U disk according to the identification requirements of the industry standard and the target BIOS: clearly showing the type of removable storage device, selecting the file format that can be correctly identified by the BIOS, setting the read-only or read-write access permission, and matching the corresponding USB protocol version number, at the same time verifying the compatibility through the virtual device enumeration and reading process in the BIOS environment, and finally generating the space configuration completion identifier.
[0045] Based on the space configuration completion identifier, the USB Gadget function is called to simulate the virtual U disk device, and the BIOS image file is mounted by using the segmentation mechanism to generate the mounting success signal.
[0046] The specific process includes that the BMC loads the USB Gadget driver, configures the device descriptor, including the vendor ID, product ID and device class code, initializes the endpoint and allocates the DMA buffer, divides the BIOS image file into blocks, writes each block into the virtual U disk space through the SCSI command, performs CRC verification immediately after each data block is written, when all data blocks are verified, writes the boot sector information to the virtual U disk, sets the partition table parameters at the same time, and triggers the device ready signal, generates the mounting success signal containing the virtual U disk capacity, file type and digital signature.
[0047] After receiving the mounting success signal, the BMC automatically collects the virtual U disk identifier, timestamp and image, and encapsulates them, and feeds back the virtual device ready signal to the management platform through TLS encryption.
[0048] The specific process includes that after receiving the mounting success signal, the BMC immediately starts the data collection process, collects the unique identifier of the virtual U disk, the high-precision timestamp and the metadata of the image file through the device driver interface, encapsulates the metadata in the pre-defined format after the collection is completed, generates a data packet containing the device state, the timestamp and the image characteristics. The BMC uses TLS encryption to establish a secure communication channel with the management platform, verifies the identity of both parties through a two-way authentication mechanism, encrypts the data packet for transmission, and finally feeds back the virtual device ready signal to the management platform.
[0049] It should be noted that the pre-defined format is defined according to the data exchange protocol and technical standard agreed between the management platform and the BMC. The definition process will comprehensively analyze the monitoring requirements of the management platform, the device information fields that can be provided by the BMC and the transmission efficiency requirements, and then determine the type, length, order and semantics of the device information fields. For example, the pre-defined format will specify that the identifier uses ASCII string, the timestamp uses UTC timestamp format and the image metadata is organized in the form of key-value pair. Finally, the pre-defined format will be fixed in the form of interface document or protocol specification to ensure that both parties can unambiguously parse and process the information in the data packet for standardized communication.
[0050] S3, the BIOS identifies the virtual U disk corresponding to the virtual device ready signal in the power-on self-test stage, mounts the boot image, and initializes the running environment of the flashing tool to generate a flashing upgrade instruction.
[0051] The BIOS scans the USB device through the device enumeration mechanism in the power-on self-test stage, and when detecting the virtual U disk corresponding to the virtual device ready signal, performs identity verification on the virtual U disk.
[0052] The specific process includes querying the USB controller information using ACPI table, using breadth-first search algorithm to traverse the virtual device, when detecting the virtual U disk corresponding to the virtual device ready signal, immediately starting the identity verification process, reading the device descriptor, generating a random challenge value and sending it to the virtual U disk, and then verifying the signature authenticity and certificate chain integrity through the pre-set public key. After verification, the BIOS marks the device as trusted state and assigns access rights, and records the security log at the same time.
[0053] It should be noted that ACPI table is a data structure built by host firmware, which provides a standardized abstract description of hardware components (such as USB controllers) for BIOS before host startup, and these tables are stored in a specific area of memory, containing hardware power management interface, address mapping, interrupt routing. When enumerating USB devices, BIOS can accurately obtain the memory mapping base address of USB controller, supported transmission mode and port configuration by parsing specific entries (such as DSDT or SSDT) in ACPI table, laying a hardware operation foundation for subsequent safe and standardized access and identification of virtual U disk and other devices.
[0054] It should also be noted that the breadth-first search algorithm is a global graph traversal method. In device enumeration, BIOS starts from the USB controller node, preferentially accesses and checks all directly connected device nodes (such as root hubs), and then scans the child devices of each node (such as secondary hubs or terminal devices) layer by layer, ensuring that all devices are discovered equally and without omission according to the connection hierarchy, and then efficiently locating the target virtual U disk.
[0055] After the virtual U disk identity verification, BIOS reads the boot sector information of the virtual U disk, verifies the integrity of the U disk boot image and the validity of the digital signature, and mounts the U disk boot image to the preset memory working area.
[0056] The specific process includes that after the virtual U disk identity verification, BIOS starts the reading and verification process of the boot image. The underlying driver interface accesses the starting physical position of the virtual U disk, retrieves the boot sector information stored therein, obtains data about partition structure and boot code flag, performs integrity verification on the boot image according to the security policy embedded in the firmware, determines whether the data has been tampered with, and at the same time verifies the digital signature attached to the boot image using the public key certificate in the firmware to confirm the legality and reliability of the source. When all verifications are successfully passed, BIOS will stably transfer the complete boot image data from the virtual U disk to the memory working area.
[0057] It should be noted that the preset memory working area is a protected continuous memory space pre-divided by BIOS through memory management unit (MMU) in the startup stage, usually located in the high memory area of kernel address space (such as above 0x100000), and the size is dynamically allocated according to the capacity of the boot image (for example, 120% of the reserved image size to meet the expansion demand). The preset memory working area design adopts the characteristics of hardware transaction memory, sets read-only permission page table and cache isolation mechanism to prevent illegal writing or data tampering, and optimizes access efficiency through physical address direct mapping.
[0058] It should also be noted that the security policy embedded in the firmware is a set of hard security rules and judgment logic that have been pre-set during the BIOS development stage and are fixed in the chip, which constitutes the basis for the decision of the BIOS to perform security startup verification. Its core content usually includes: verification standards and white lists, which clearly specify whether the digital certificate issuing agency is a trusted root; execution logic and sequence, which strictly specify the steps of verification operations, for example, first verify the digital signature to confirm the trusted source, then check the hash value to ensure the integrity of the content, and the sequence cannot be reversed; security control measures, including mechanisms for enforcing policies, such as unconditionally terminating the startup process when verification fails, preventing any untrusted code from executing, and recording security events to a log.
[0059] The set of hard security rules and judgment logic is based on UEFI specifications and NIST network security framework and threat modeling analysis for specific hardware platforms, defines core security rules (such as trusted root certificate list and verification sequence logic), converts rules into machine executable policy code through a dedicated configuration tool, and integrates into the BIOS firmware image, while being fixed to the non-volatile storage area of the chip through digital signature and hardware programming, forming an unalterable set of hard rules.
[0060] After the U disk boot image is mounted, the BIOS performs resource allocation and initializes the flashing tool running environment.
[0061] The specific process includes that the BIOS divides the continuous memory space in protected mode through the memory management unit, allocates a fixed size code area and data buffer area for the flashing tool, reserves an interrupt vector table space, loads the executable command of the flashing tool into the code area, verifies the integrity through digital signature, and initializes the flashing tool running environment.
[0062] After the flashing tool running environment is ready, the BIOS parses the flashing tool configuration parameters in the U disk boot image, and generates flashing upgrade instructions according to the target BIOS chip type.
[0063] The specific process includes that the BIOS accesses the configuration area of the U disk boot image through memory mapping, recursively parses the flashing tool configuration parameters in JSON or XML format, including chip communication protocol version, timing parameters, block erase size and retry strategy, then detects the identification code of the target BIOS chip, dynamically matches the best parameter combination by querying the pre-set chip feature library, and finally encapsulates and attaches a digital signature to generate a complete flashing upgrade instruction.
[0064] It should be noted that the preset chip feature library is an embedded database stored in the BIOS firmware and digitally signed, and is essentially an authoritative knowledge base that maps the unique identification codes (such as manufacturer ID, device ID) of various BIOS chips and the corresponding optimal operating parameters. For example, when the BIOS detects the identification code of the target chip, it will use the identification code as a "key" to query and match in the feature library. Once the corresponding entry is found, the parameter set in the entry will be fused with the general parameters parsed from the U disk configuration file, and a set of customized operation instruction set that is optimal and safest for the specific chip model will be dynamically generated.
[0065] S4, according to the flashing upgrade instruction, the BMC and the BIOS chip establish a hardware level handshake protocol, and perform the flashing operation through the coordination mechanism to generate a hardware coordination completion signal.
[0066] According to the flashing upgrade instruction, the BMC parses the BIOS chip address and operation type, and initializes the MPC handshake protocol state machine to generate an initialization completion signal.
[0067] The specific process includes that the BMC parses the received flashing upgrade instruction and extracts the physical address and operation type of the target BIOS chip, and initializes the MPC handshake protocol state machine. The MPC handshake protocol state machine adopts a Byzantine fault-tolerant architecture, including role allocation, dynamic key management and session parameter configuration. The initialization process includes verifying the identity of each party, establishing a secure communication channel and generating a unique session identifier. The BMC generates an initialization completion signal.
[0068] Based on the initialization completion signal, the BMC as the master node starts a multi-round voting handshake process, and outputs a voting success identifier when multiple nodes respond consistently.
[0069] The specific process includes broadcasting a voting request packet containing a random number challenge to all participating nodes (including the BIOS chip and the verification node), each node signing the challenge value using a pre-shared key and returning a response, the BMC collecting the responses and verifying the validity of the signatures and voting, dynamically adjusting the voting threshold according to the response consistency, and generating a voting success identifier containing the voting round, pass rate and timestamp if the proportion of favorable votes exceeds the voting threshold and the BMC verifies the time consistency.
[0070] It should be noted that the voting threshold is not a fixed value, but a percentage threshold that is dynamically adjusted according to real-time response, such as a dynamic threshold floating between absolute majority (such as 51%) and complete consistency (100%) to determine whether an effective consensus is reached.
[0071] According to the voting success identifier, the performance gradient change is monitored in real time in the shared memory area, and a flashing state signal is generated according to the performance gradient change result.
[0072] The specific process includes that the BMC establishes a ring buffer in a shared memory region, collects performance parameters (including transmission rate, error code frequency and buffer usage) during the flashing process, obtains the gradient change rate of the performance parameters by discrete difference, detects abnormal fluctuations by using a sliding window algorithm, triggers state evaluation when the performance gradient change rate exceeds the mean value (±10% / s) and the standard deviation (1-5% / s), integrates the multi-parameter gradient into a comprehensive state index by a weighted fusion algorithm, comprehensively evaluates the running health degree of the flashing operation according to the comprehensive state index, and finally generates a structured flashing state signal containing state level, gradient change trend, timestamp and recommended operation.
[0073] It should be noted that the discrete difference collects performance parameters from the ring buffer at a fixed frequency (such as once per second), and the gradient change rate is obtained by the difference between the current sampling period and the value of the last period.
[0074] The BMC extracts the flashing progress and error type from the flashing state signal, generates an operation summary, and enriches and reinforces the operation summary by encapsulation and security signature to generate a hardware cooperative completion signal.
[0075] The specific process includes that the BMC analyzes the data structure of the flashing state signal, extracts the flashing progress and error type, generates an operation summary, and the operation summary contains timestamp, progress state, error level and resource usage. The operation summary is securely encapsulated, a protocol version number and a session ID are added, and an elliptic curve digital signature algorithm (ECDSA) is used for digital signature, and an AES-GCM encryption is used to generate a hardware cooperative completion signal containing complete security credentials.
[0076] It should be noted that the elliptic curve digital signature algorithm (ECDSA) is a non-symmetric encryption based on elliptic curve cryptography, which plays a core role in tamper prevention and identity verification. The working principle is: the BMC uses its unique private key to organize the operation summary to generate a short and unique digital signature. The digital signature is closely bound to the operation summary, and any slight tampering with the operation summary content will cause the signature verification to fail. Any receiver with the public key corresponding to the BMC can verify the signature. After the signature verification is successful, the hardware cooperative completion signal and the information that the operation summary has not been tampered with after self-signature are obtained from the legal BMC, which improves the credibility of the hardware cooperative completion signal in the transmission process.
[0077] S5, based on the hardware cooperative completion signal, the BIOS chip is verified and resource is cleaned, and the flashing upgrade instruction is dynamically updated according to the verification and resource cleaning result.
[0078] Based on the hardware cooperation completion signal, the BMC performs multi-dimensional verification and resource cleaning on the BIOS chip, and generates a verification digest and a resource cleaning result.
[0079] The specific process includes that after receiving the hardware cooperation completion signal, the BMC accesses the BIOS chip through the SPI bus, synchronously performs verification and resource cleaning, the verification process includes CRC verification of the firmware code and generation of SHA-256 hash value of the key data area, and at the same time, invalid temporary data and redundant logs are cleaned. The entire verification and resource cleaning process is monitored and compared in real time by the BMC. Finally, the verification status, the generated hash digest list and the cleaned resource details are summarized to form a complete verification digest and resource cleaning result, and are safely stored in the non-volatile storage body of the BMC.
[0080] According to the verification digest and the resource cleaning result, the writing upgrade instruction is dynamically updated by modifying the writing plan.
[0081] The specific process includes that the BMC analyzes the verification digest and the resource cleaning result, locates the BIOS chip interval that fails to verify or has data damage, and dynamically formulates the writing plan according to the available space released after resource cleaning; the dynamically formulated writing plan is converted into an upgrade instruction sequence, and it is clearly limited that only the specific interval that needs to be repaired is differentially written, and the healthy blocks that pass the verification are skipped, so that the efficiency of writing plan conversion and the safety of upgrade instruction sequence are improved.
[0082] Based on the dynamically updated writing upgrade instruction, the BMC deploys the updated instruction through the virtual U disk channel.
[0083] The specific process includes that the BMC creates a virtual U disk image in the internal storage space, and encapsulates the updated BIOS firmware file, the accurate writing upgrade instruction set and the verification program in the virtual U disk image. By simulating the re-enumeration process of the USB device, a standard removable disk device is presented to the host. After the host recognizes the removable disk device, the intelligent agent in the BMC triggers the preset execution script to guide the server motherboard to start from the disk device and access the BIOS chip for precise and differential firmware writing operation, and at the same time, the updated instruction is deployed.
[0084] It should be noted that the preset execution script is the control core in the deployment process, which is a program containing strictly ordered commands pre-stored and triggered by the BMC intelligent agent. The core responsibility is to take over the host startup process and safely and accurately execute the firmware writing, which converts the BMC instruction into a "smart executor" of safe and reliable hardware operation, and is the key to instruction deployment.
[0085] The embodiment also provides a BIOS upgrading system based on a BMC virtual U disk, comprising an instruction issuing module, a mapping and mounting module, an identification and flashing module, a flashing operation module and a checking and updating module; the instruction issuing module is used for issuing an upgrading instruction to the BMC by a management platform, and listens to a hardware state through an intelligent platform management interface (IPMI) command, and generates a hardware ready identification when detecting that initialization is completed; the mapping and mounting module is used for mapping an internal storage area as a virtual U disk and mounting a target BIOS image file based on the hardware ready identification, and feeding back a virtual device ready signal to the management platform; the identification and flashing module is used for identifying the virtual U disk corresponding to the virtual device ready signal by BIOS in a power-on self-test stage, loading a boot image and initializing a flashing tool running environment, and generating a flashing upgrading instruction; the flashing operation module is used for establishing a hardware level handshake protocol between the BMC and the BIOS chip according to the flashing upgrading instruction, and executing a flashing operation through a cooperative mechanism, and generating a hardware cooperative completion signal; and the checking and updating module is used for checking the BIOS chip and cleaning up resources based on the hardware cooperative completion signal, and dynamically updating the flashing upgrading instruction according to a checking and resource cleaning result.
[0086] In conclusion, the virtual U disk mapping and mounting mechanism is used to solve the compatibility problem caused by hardware differences in the traditional remote upgrading, improve the device identification success rate, and reduce the failure risk caused by chip architecture differences; the hardware level handshake protocol and the cooperative mechanism are used to realize safe and reliable cooperative flashing, and improve the anti-risk ability of the BMC authority and the reliability of the flashing operation.
[0087] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application but not limit the present application, and although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and all of them should be covered in the scope of the claims of the present application.
Claims
1. A BIOS upgrade method based on a BMC virtual USB drive, characterized in that: include, The management platform sends upgrade instructions to the BMC and monitors the hardware status through the intelligent platform management interface. When initialization is detected to be complete, a hardware ready flag is generated. Based on the hardware readiness flag, the internal storage area is mapped as a virtual USB drive and the target BIOS image file is mounted, while a virtual device readiness signal is sent back to the management platform. During the power-on self-test (POST) phase, the BIOS identifies the virtual USB drive corresponding to the virtual device ready signal, loads the boot image, initializes the flashing tool runtime environment, and generates flashing and upgrade commands. According to the flashing and upgrade command, the BMC establishes a hardware-level handshake protocol with the BIOS chip and performs the flashing operation through a collaborative mechanism, generating a hardware collaborative completion signal. Based on the hardware-coordinated completion signal, the BIOS chip is verified and its resources are cleaned up, and the flashing and upgrade instructions are dynamically updated according to the verification and resource cleanup results.
2. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 1, characterized in that: The management platform sends upgrade commands to the BMC and monitors the hardware status through the intelligent platform management interface. The specific steps are as follows. The management platform sends upgrade command packets to the BMC via an encrypted communication protocol, performs security verification on the upgrade command packets, and establishes a hardware monitoring session. Based on the hardware monitoring session, hardware status parameters are collected through the intelligent platform management interface and then processed in a standardized manner.
3. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 2, characterized in that: When initialization is detected as complete, a hardware ready flag is generated. The specific steps are as follows: The standardized hardware status parameters are input into the predictive analysis model to calculate the estimated hardware initialization completion rate. The hardware initialization completion estimate is verified using a Hidden Markov Model (HMM). When the hardware initialization completion estimate matches the estimate obtained by the HMM, a hardware ready flag is generated.
4. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 3, characterized in that: The process of mapping the internal storage area as a virtual USB drive and mounting the target BIOS image file based on the hardware readiness identifier, while simultaneously sending a virtual device readiness signal to the management platform, involves the following steps: After receiving the hardware ready flag, the BMC verifies the integrity and timeliness of the hardware ready flag and generates a virtualization trigger signal. Based on the virtualization trigger signal, the BMC allocates virtual USB drive space from the internal storage area, configures virtual USB drive attribute parameters compatible with the BIOS, and then obtains the space configuration completion indicator. Based on the space configuration completion identifier, the USB Gadget function is invoked to simulate a virtual USB flash drive, and the BIOS image file is mounted using a segmented mechanism, generating a mounting success signal; Upon receiving the successful mounting signal, BMC automatically collects the virtual USB drive identifier, timestamp, and image, encapsulates them, and sends a virtual device ready signal back to the management platform via TLS encryption.
5. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 4, characterized in that: The BIOS identifies the virtual USB drive corresponding to the virtual device ready signal during the power-on self-test (POST) phase and mounts the boot image. The specific steps are as follows. During the power-on self-test (POST) phase, the BIOS scans USB devices through a device enumeration mechanism. When a virtual USB drive corresponding to a virtual device ready signal is detected, the BIOS authenticates the virtual USB drive. After the virtual USB drive is successfully authenticated, the BIOS reads the boot sector information of the virtual USB drive, verifies the integrity of the USB drive boot image and the validity of the digital signature, and mounts the USB drive boot image to the preset memory working area.
6. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 5, characterized in that: The initialization of the flashing tool runtime environment and the generation of flashing and upgrade commands are carried out through the following specific steps. After the USB boot image is mounted, the BIOS allocates resources and initializes the flashing tool's runtime environment. Once the flashing tool's runtime environment is ready, the BIOS parses the flashing tool's configuration parameters in the USB boot image and generates flashing and upgrade commands based on the target BIOS chip type.
7. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 6, characterized in that: According to the flashing and upgrade command, the BMC and BIOS chip establish a hardware-level handshake protocol. The specific steps are as follows: Based on the flashing and upgrade instructions, the BMC parses the BIOS chip address and operation type, initializes the MPC handshake protocol state machine, and generates an initialization completion signal; Based on the initialization completion signal, BMC, as the master node, initiates a multi-round voting handshake process. When multiple nodes respond in unison, a voting success flag is output.
8. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 7, characterized in that: The process of performing the write operation through a collaborative mechanism and generating a hardware collaborative completion signal involves the following steps: Based on the successful voting indicator, the performance gradient changes in the shared memory area are monitored in real time, and a flush status signal is generated according to the performance gradient change results. BMC extracts the flash progress and error type from the flash status signal, generates an operation digest, and enriches and strengthens the operation digest through encapsulation and secure signature to generate a hardware co-completion signal.
9. The BIOS upgrade method based on a BMC virtual USB drive as described in claim 8, characterized in that: The process involves hardware-coordinated signal processing to verify and clean up the BIOS chip's resources, and then dynamically updating the flashing / upgrade instructions based on the verification and resource cleanup results. The specific steps are as follows: Based on hardware-coordinated completion signals, the BMC performs multi-dimensional verification and resource cleanup on the BIOS chip, generating a verification summary and resource cleanup results. Based on the verification summary and resource cleanup results, the planned flashing interval is adjusted and the flashing upgrade instructions are dynamically updated. Based on dynamically updated flashing and upgrading instructions, BMC deploys the updated instructions through a virtual USB drive channel.
10. A BIOS upgrade system based on a BMC virtual USB drive, based on the BIOS upgrade method based on a BMC virtual USB drive as described in any one of claims 1 to 9, characterized in that: It includes a command issuance module, a mapping and mounting module, a recognition and flashing module, a flashing operation module, and a verification and update module. The instruction delivery module is used to manage the platform to send upgrade instructions to the BMC and to monitor the hardware status through the intelligent platform management interface IPMI command. When initialization is detected to be complete, a hardware ready flag is generated. The mapping and mounting module is used to map the internal storage area as a virtual USB drive and mount the target BIOS image file based on the hardware ready identifier, while feeding back the virtual device ready signal to the management platform. The identification and flashing module is used by the BIOS to identify the virtual USB drive corresponding to the virtual device ready signal during the power-on self-test phase, load the boot image and initialize the flashing tool runtime environment, and generate flashing and upgrade instructions. The flashing operation module is used to establish a hardware-level handshake protocol between the BMC and the BIOS chip according to the flashing upgrade command, and to perform the flashing operation through a collaborative mechanism to generate a hardware collaborative completion signal. The verification and update module is used to verify and clean up the BIOS chip based on hardware collaborative completion signals, and dynamically update the flashing and upgrade instructions according to the verification and resource cleanup results.