A method, apparatus and device for initiating a baseline firmware upgrade
By using vendor-specific commands to modify baseline firmware partition attributes in the NVMe protocol, the problem of baseline firmware being unable to be upgraded online was solved, enabling a safe and reliable firmware upgrade process and reducing costs and risks.
Patent Information
- Application Number
- CN202310342044.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-03-29
AI Technical Summary
In the NVMe protocol, the baseline firmware is read-only and cannot be upgraded online, which means that the firmware cannot be modified after production, resulting in high costs for manufacturers and potential accident risks.
By establishing vendor-private commands to modify the read/write attributes of the baseline firmware partition, vendors can perform upgrades with user consent and record the firmware loading status to prevent accidental operations.
It enables secure and reliable upgrades to the baseline firmware, reducing costs and incident risks, and improving user-friendliness and security.
Smart Images

Figure CN116339786B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, and device for initiating a baseline firmware upgrade. Background Technology
[0002] Firmware (FW) is the code that connects hardware and the operating system at startup. Early firmware chips generally used ROM designs, and the code was fixed during the manufacturing process, making it impossible to modify by any means. With the continuous development of technology, modifying firmware to adapt to constantly updated hardware environments has become an urgent requirement for users. Examples include rewritable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), and flash memory. These chips can be repeatedly rewritten to allow for firmware modification and upgrades. Firmware is a program written into flash memory, EROM, or EPROM within application-specific integrated circuits (ASICs) or programmable logic devices (PLDs); simply put, it's "fixed software." Firmware is used in a wide range of electronic products, from remote controls and calculators to computer keyboards and hard drives, and even industrial robots. For example, computers themselves and their peripherals all contain firmware. Many devices can be upgraded with firmware. Firmware upgrades can fix bugs or security vulnerabilities, add new features, improve user experience, and optimize firmware or device driver performance.
[0003] For most embedded devices, a relatively stable baseline firmware version exists within the product to ensure a usable version is maintained should users make mistakes during firmware upgrades. The baseline is a stable version of the software documentation or source code (or other deliverables), serving as the basis for further development; baseline firmware refers to the stable firmware burned into the embedded device.
[0004] As traditional HDD transfer performance reaches its bottleneck, HDDs are gradually being replaced by SSDs. The NVMe (Non-Volatile Memory Express) protocol, used for communication between the host and SSD, is becoming increasingly prevalent, making firmware upgrades supporting the NVMe standard a necessary requirement. NVMe is a logical device interface specification, a bus transmission protocol specification based on a device logical interface, used to access non-volatile memory media attached via the PCI Express (PCIe) bus. In the NVMe protocol, the baseline firmware has read-only permissions, allowing users only to perform read operations and disallowing write operations. Once the firmware is written to the factory, it cannot be modified at the protocol level. Under this baseline firmware scheme, once the product is manufactured and flashed, the baseline firmware cannot be changed. Scenarios requiring changes to the baseline firmware can incur significant manpower and resource costs for manufacturers, and may even lead to irreversible accidents. Summary of the Invention
[0005] In view of this, the present invention proposes a method, apparatus, and device for initiating baseline firmware upgrades. The method for initiating baseline firmware upgrades establishes vendor-specific commands to modify the read / write attributes of the partition containing the baseline firmware at the protocol layer, thereby providing a channel for updating the baseline firmware. Regarding the upgrade channel for the baseline firmware, user permissions are defined, and the vendor is allowed to modify the read / write attributes of the partition containing the baseline firmware using vendor-specific commands with user permission. The user firmware upgrade process is optimized by employing a transfer strategy for customer operations on the baseline firmware and recording the firmware loading and startup status for user traceability, thus preventing users from accidentally performing upgrades on non-baseline firmware.
[0006] To achieve the above objectives, one aspect of the present invention provides a method for initiating a baseline firmware upgrade. The method includes performing the following steps on a server: establishing a vendor-private command that is not publicly accessible to users; in response to receiving a request for a baseline firmware upgrade, modifying the read / write attribute of the partition where the baseline firmware is located to a read / write attribute using the vendor-private command; instructing the user terminal to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located; instructing the user terminal to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located and then load it into the corresponding runtime area for startup, and providing feedback on the startup result of the baseline firmware upgrade.
[0007] In some embodiments, the vendor-specific command includes at least: changing the read / write attribute from read-only to read / write or from read / write to read-only, and obtaining the read / write attribute of the operation partition.
[0008] In some embodiments, the method further includes: in response to the server receiving the startup result of the baseline firmware upgrade, restoring the read / write attribute of the partition where the baseline firmware is located to read-only attribute through the vendor-specific command.
[0009] In some embodiments, the method further includes: in response to receiving a request for a baseline firmware upgrade, modifying the read / write attribute of the remaining partitions other than the partition where the baseline firmware is located to read-only attribute via the vendor-specific command and notifying the user terminal.
[0010] In some embodiments, the method further includes: in response to the server receiving the startup result of the baseline firmware upgrade, restoring the read / write attributes of the remaining partitions other than the partition where the baseline firmware is located to read / write attributes using the vendor-specific command.
[0011] In some embodiments, the method further includes: determining whether the partition to which the non-baseline firmware upgrade is pointed is the partition where the baseline firmware is located, and determining whether the partition to which the non-baseline firmware upgrade is pointed needs to be transferred based on the determination result.
[0012] In some embodiments, determining whether the partition to which the non-baseline firmware upgrade is pointed is the partition where the baseline firmware is located, and determining whether the partition to which the non-baseline firmware upgrade is pointed needs to be transferred based on the determination result, includes: in response to the partition to which the non-baseline firmware upgrade is pointed is the partition where the baseline firmware is located, transferring the partition to which the non-baseline firmware upgrade is pointed to to any free partition of the remaining partitions other than the partition where the baseline firmware is located.
[0013] In some embodiments, establishing vendor-private commands that are not publicly accessible to users includes: establishing vendor-private commands that are not publicly accessible to users based on reserved fields of the NVMe protocol.
[0014] In some embodiments, the step of responding to a request for a baseline firmware upgrade by modifying the read / write attributes of the partition containing the baseline firmware to read / write attributes via the vendor-specific command includes: modifying the read / write attributes of the partition containing the baseline firmware by modifying the flag bits of the read / write attributes.
[0015] In some embodiments, instructing the user terminal to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located includes: downloading the baseline firmware version to be upgraded into the cache area via an FW DownLoad command issued to the user terminal. The FW DownLoad command is a standard NVMe command used to load firmware from the cache area into a specified partition.
[0016] In some embodiments, instructing the user to load the baseline firmware version to be upgraded into the partition where the baseline firmware resides further includes: loading the baseline firmware version to be upgraded from the cache into the partition where the baseline firmware resides using an FWCommit command issued to the user, based on the read / write attributes of the partition where the baseline firmware resides. The FWCommit command is also a standard NVMe command used to load firmware from the cache into a specified partition.
[0017] In some embodiments, instructing the user terminal to preprocess the baseline firmware to be upgraded in the partition where the baseline firmware is located, load it into the corresponding runtime area, and start it, and then provide feedback on the startup result of the baseline firmware upgrade, includes: instructing the user terminal to at least decrypt, verify, and sign the baseline firmware to be upgraded obtained from the partition where the baseline firmware is located, so as to obtain an executable baseline firmware.
[0018] In some embodiments, instructing the user terminal to preprocess the baseline firmware to be upgraded in the partition containing the baseline firmware and then load it into the corresponding runtime area for startup, and to provide feedback on the startup result of the baseline firmware upgrade, includes: instructing the user terminal to load the executable baseline firmware into the corresponding runtime area for startup via a bootloader. Here, bootloader refers to the system boot program.
[0019] In some embodiments, the method further includes: establishing and updating a startup state table based on the startup state and loading state of the firmware upgrade, and obtaining the startup result corresponding to each firmware upgrade by reading the startup state table.
[0020] In some embodiments, instructing the user terminal to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located, load it into the corresponding running area, and start it, and then feed back the startup result of the baseline firmware upgrade, further includes: recording the startup status and loading status of the baseline firmware upgrade startup and updating the startup status table; and feeding back the startup result of the baseline firmware upgrade to the server and / or the user terminal by reading the update result of the startup status table.
[0021] In another aspect, the present invention provides an apparatus for initiating a baseline firmware upgrade, the apparatus comprising: a first module configured to establish a vendor-private command, not publicly disclosed to the user, for modifying the read / write attributes of an operating partition; a second module configured to, in response to receiving a request for a baseline firmware upgrade, modify the read / write attributes of the partition containing the baseline firmware to read / write attributes using the vendor-private command; a third module configured to instruct a user terminal to load the baseline firmware version to be upgraded into the partition containing the baseline firmware; and a fourth module configured to instruct the user terminal to preprocess the baseline firmware version to be upgraded in the partition containing the baseline firmware and then load it into the corresponding running area for startup, and to provide feedback on the startup result of the baseline firmware upgrade.
[0022] In some embodiments, the apparatus further includes a fifth module configured to, in response to the server receiving the current startup result of the baseline firmware upgrade, restore the read / write attribute of the partition where the baseline firmware is located to read-only attribute via the vendor-specific command.
[0023] In some embodiments, the apparatus further includes a sixth module configured to, in response to receiving a request for a baseline firmware upgrade, modify the read / write attribute of the remaining partitions other than the partition where the baseline firmware is located to read-only attribute and notify the user terminal via the vendor-specific command.
[0024] In some embodiments, the apparatus further includes a seventh module configured to, in response to the server receiving the current startup result of the baseline firmware upgrade, restore the read / write attributes of the remaining partitions other than the partition where the baseline firmware is located to read / write attributes via the vendor-specific command.
[0025] In some embodiments, the apparatus further includes an eighth module configured to determine whether the partition to which the non-baseline firmware upgrade is directed is the partition where the baseline firmware is located, and to determine whether the partition to which the non-baseline firmware upgrade is directed needs to be transferred based on the determination result.
[0026] In another aspect of the present invention, a computer device is also provided, including at least one processor; and a memory storing computer instructions executable on the processor, the instructions, when executed by the processor, implementing the steps of any of the methods described above.
[0027] In another aspect of the present invention, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements any of the method steps described above.
[0028] The present invention has at least the following beneficial effects: The present invention proposes a method, apparatus, and device for initiating baseline firmware upgrades. The method establishes a private command that is only publicly available to the manufacturer, dividing the permissions between the manufacturer and the user. This allows the manufacturer, with the user's consent, to use the manufacturer's private command to modify the read / write attributes of the partition where the baseline firmware resides. For scenarios where the baseline firmware has security vulnerabilities and requires an upgrade, this reduces the cost associated with having to recycle and re-flash the baseline firmware due to its inaccessibility. A status recording mechanism for each firmware upgrade loading and boot process is implemented, allowing the manufacturer / user to rewind multiple firmware loading and boot states, facilitating problem localization. A transfer strategy for partitions not pointed to by the baseline firmware reduces upgrade failures caused by user errors, corrects user operations on the baseline firmware, and increases the security and user-friendliness of the baseline firmware. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0030] Figure 1 A block diagram illustrating an embodiment of a method for initiating a baseline firmware upgrade provided by the present invention is shown;
[0031] Figure 2 This diagram illustrates a flowchart of another embodiment of a method for initiating a baseline firmware upgrade provided by the present invention.
[0032] Figure 3 A schematic diagram of an embodiment of a device for initiating a baseline firmware upgrade provided by the present invention is shown;
[0033] Figure 4 A schematic diagram of an embodiment of a computer device provided by the present invention is shown;
[0034] Figure 5 A schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention is shown. Detailed Implementation
[0035] The following describes embodiments of the present invention. However, it should be understood that the disclosed embodiments are merely examples, and other embodiments may take various alternative forms.
[0036] Furthermore, it should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements may include not only those elements but also elements not expressly listed or inherent to such process, method, article, or apparatus.
[0037] One or more embodiments of this application will now be described with reference to the accompanying drawings.
[0038] Based on the above objectives, a first aspect of the present invention provides an embodiment of a method for initiating a baseline firmware upgrade. Figure 1 The diagram shown is an embodiment of a method for initiating a baseline firmware upgrade provided by the present invention. Figure 1 As shown, a method for initiating a baseline firmware upgrade according to an embodiment of the present invention includes performing the following steps on the server side:
[0039] S1. Establish vendor-owned private commands that are not publicly accessible to users and are used to modify the read and write attributes of the operation partition;
[0040] S2. In response to receiving a request to upgrade the baseline firmware, the read / write attribute of the partition where the baseline firmware is located is modified to read / write attribute using the vendor's proprietary command.
[0041] S3. Instruct the user to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located;
[0042] S4. Instruct the user terminal to preprocess the baseline firmware to be upgraded in the partition where the baseline firmware is located, load it into the corresponding running area and start it, and provide feedback on the startup result of the baseline firmware upgrade.
[0043] According to several embodiments of the present invention, the vendor-specific command includes at least: changing the read / write attribute from read-only to read / write or from read / write to read-only, and obtaining the read / write attribute of the operation partition.
[0044] According to several embodiments of the present invention, the method further includes: in response to the server receiving the current boot result of the baseline firmware upgrade, restoring the read / write attribute of the partition where the baseline firmware is located to the read-only attribute through a vendor-specific command.
[0045] According to several embodiments of the present invention, the method further includes: in response to receiving a request for a baseline firmware upgrade, modifying the read / write attribute of the remaining partitions other than the partition where the baseline firmware is located to read-only attribute via a vendor-specific command and notifying the user terminal.
[0046] According to several embodiments of the present invention, the method further includes: in response to the server receiving the current boot result of the baseline firmware upgrade, restoring the read / write attributes of the remaining partitions other than the partition where the baseline firmware is located to read / write attributes via a vendor-specific command.
[0047] According to several embodiments of the present invention, the method further includes: determining whether the partition to which the non-baseline firmware upgrade is pointed is the partition where the baseline firmware is located, and determining whether the partition to which the non-baseline firmware upgrade is pointed needs to be transferred based on the determination result.
[0048] According to several embodiments of the present invention, determining whether the partition to which the non-baseline firmware upgrade is pointed is the partition where the baseline firmware is located, and determining whether the partition to which the non-baseline firmware upgrade is pointed needs to be transferred based on the determination result, includes: in response to the partition to which the non-baseline firmware upgrade is pointed is the partition where the baseline firmware is located, transferring the partition to which the non-baseline firmware upgrade is pointed to to any free partition of the remaining partitions other than the partition where the baseline firmware is located.
[0049] According to several embodiments of the present invention, establishing vendor-private commands that are not publicly accessible to users includes: establishing vendor-private commands that are not publicly accessible to users based on reserved fields of the NVMe protocol.
[0050] According to several embodiments of the present invention, in response to receiving a request for a baseline firmware upgrade, modifying the read / write attributes of the partition where the baseline firmware is located to read / write attributes via a vendor-specific command includes: modifying the read / write attributes of the partition where the baseline firmware is located by modifying the flag bits of the read / write attributes.
[0051] According to several embodiments of the present invention, instructing the user terminal to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located includes: downloading the baseline firmware version to be upgraded into the cache area by issuing an FW DownLoad command to the user terminal. The FW DownLoad command is an NVMe standard command used to load firmware from the cache area into a specified partition.
[0052] According to several embodiments of the present invention, instructing the user terminal to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located further includes: loading the baseline firmware version to be upgraded from the cache into the partition where the baseline firmware is located by issuing an FW Commit command to the user terminal based on the read / write attributes of the partition where the baseline firmware is located. The FW Commit command is also a standard NVMe command used to load firmware from the cache into a specified partition.
[0053] According to several embodiments of the present invention, instructing the user terminal to preprocess the baseline firmware to be upgraded version in the partition where the baseline firmware is located and load it into the corresponding running area for startup, and to provide feedback on the startup result of the baseline firmware upgrade, includes: instructing the user terminal to at least decrypt, verify, and verify the signature of the baseline firmware to be upgraded version obtained from the partition where the baseline firmware is located, so as to obtain an executable baseline firmware.
[0054] According to several embodiments of the present invention, instructing the user terminal to preprocess the baseline firmware to be upgraded in the partition where the baseline firmware is located, load it into the corresponding runtime area for startup, and provide feedback on the startup result of the baseline firmware upgrade includes: instructing the user terminal to load the executable baseline firmware into the corresponding runtime area for startup via the bootloader. Here, the bootloader refers to the system boot program.
[0055] According to several embodiments of the present invention, the method further includes: establishing and updating a startup state table based on the startup state and loading state of the firmware upgrade, and obtaining the startup result corresponding to each firmware upgrade by reading the startup state table.
[0056] According to several embodiments of the present invention, instructing the user terminal to preprocess the baseline firmware to be upgraded in the partition where the baseline firmware is located, load it into the corresponding running area and start it, and to feed back the startup result of the baseline firmware upgrade, further includes: recording the startup status and loading status of the baseline firmware upgrade startup and updating the startup status table; and feeding back the startup result of the baseline firmware upgrade to the server and / or the user terminal by reading the update result of the startup status table.
[0057] The following is another embodiment of a method for initiating a baseline firmware upgrade according to the present invention. For scenarios requiring baseline firmware upgrades, the upgrade channel for the baseline firmware is first designed, including the division of user levels and the design of the baseline firmware upgrade path. Specifically, regarding the division of user levels: Commands based on the NVMe (Non-Volatile Memory Express) protocol include public commands and user-defined commands. User commands refer to NVMe commands supported by the NVMe protocol standard and user-defined commands exposed to users (user-defined commands are commands defined by the user themselves). Normally, both types of commands are visible to the user (client) and the vendor (server). By adding vendor-private commands that are not exposed to the client, the permissions of the server and client are further divided, with the server having access to vendor-private commands, unlike the client. Regarding the design of the baseline firmware upgrade path: Typically, once the baseline firmware is burned, it cannot be modified. Through vendor-private commands, a path for modifying the read / write attributes of the partition where the baseline firmware is located is provided, allowing the server, with the user's permission, to modify the attributes of the partition where the baseline firmware is located using vendor-private commands.
[0058] By modifying the read-only attribute of the baseline partition using manufacturer-private commands hidden on the user side, an online upgrade path for the baseline firmware is provided. Meanwhile, firmware upgrades on the server side require the use of the user-side upgrade path to ensure user security requirements. Figure 2 This diagram illustrates a flowchart of another embodiment of a method for initiating a baseline firmware upgrade provided by the present invention. Figure 2 As shown:
[0059] (1) Modify the read-only attribute (RO) of the partition where the baseline firmware is located to read-write attribute (RW) through the manufacturer's private command, and keep the attribute of other partitions as read-only (RO) to avoid server-side misoperation. The specific read-write attribute setting method can be controlled by setting relevant flag bits.
[0060] (2) The server downloads the baseline firmware to be upgraded to the firmware buffer (FW Buffer) using the FW Download command used by the client. The download of the baseline firmware to be upgraded can be performed in multiple steps. The FWDownLoad command is a standard NVMe command used to load the firmware from the buffer to a specified partition. Since the command needs to be sent through the client, the client can implement necessary protection according to its own needs, and transmit the manufacturer's proprietary commands when the server is allowed to operate.
[0061] (3) The server loads the baseline firmware package to be upgraded, downloaded to the firmware cache, into the partition (Slot-1) where the baseline firmware is located, using the FW Commit command used by the client. As described in (1), the read / write attribute of Slot-1 is modified to read / write (RW), while the read / write attribute of Slots 2-7 is modified to read-only (RO). This means that the server is only allowed to operate on the partition Slot-1 where the baseline firmware is located and cannot operate on the remaining partitions Slots 2-7. The FWCommit command is also a standard NVMe command used to load firmware from the cache into a specified partition. Since the command needs to be sent through the client, the client can implement necessary protection according to its own needs, and transmit vendor-specific commands while allowing server operation.
[0062] (4) The baseline firmware to be upgraded, loaded into the partition containing the baseline firmware, cannot be used directly. The firmware is generally protected through encryption, signing, and other operations. Therefore, the bootloader needs to perform verification, validation, and decryption operations on the baseline firmware before it is loaded into the runtime area to convert it into executable baseline firmware. Here, bootloader refers to the boot program that boots the system before startup.
[0063] (5) After the bootloader loads the baseline firmware to be upgraded into the running area, it determines its own boot status through the baseline firmware itself.
[0064] (6) The loading and startup status of each baseline firmware upgrade is updated in the startup status table by recording the firmware loading and startup status. By recording multiple loading and startup statuses, the user can be provided with problem backtracking when problems occur during the baseline firmware upgrade. The recording capacity is set by balancing user needs and resources.
[0065] (7) Return the result of this baseline firmware upgrade to the user / server.
[0066] (8) After the above steps are completed, the attributes of the partition where the baseline firmware is located are restored from read-write to read-only by using the manufacturer's private command, and the attributes of the remaining partitions other than the partition where the baseline firmware is located are changed from read-only to read-write. At the same time, repeat steps (4)-(7) to restore the original version of the baseline firmware.
[0067] Meanwhile, during non-baseline firmware upgrades, there's a possibility of mistakenly pointing the non-baseline firmware upgrade partition to the partition containing the baseline firmware. In such cases, firmware upgrades cannot continue. In this situation, operations on the baseline firmware are blocked, and a read-write partition (other than the baseline firmware partition) is selected for the upgrade. Specifically, the server uses the FW Commit command (accessed from the user's end) to load the firmware package downloaded to the firmware cache into the specified partition. It then checks if the specified partition is the baseline firmware partition. If it is, the non-baseline firmware upgrade partition is moved to any free partition among the remaining partitions, and the user is notified of the actual moved partition. This ensures that firmware upgrades can still proceed even in case of errors, increasing system flexibility. If there are no free partitions among the remaining partitions besides the baseline firmware partition, the upgrade cannot proceed.
[0068] A second aspect of the present invention provides an apparatus for initiating a baseline firmware upgrade. Figure 3 The diagram shown is a schematic representation of an embodiment of a device for initiating a baseline firmware upgrade provided by the present invention. Figure 3 As shown, the present invention provides an apparatus for initiating a baseline firmware upgrade, comprising: a first module 011 configured to establish a vendor-private command not publicly available to users; a second module 012 configured to, in response to receiving a request for a baseline firmware upgrade, modify the read / write attribute of the partition where the baseline firmware is located to a read / write attribute using the vendor-private command; a third module 013 configured to instruct the user terminal to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located; and a fourth module 014 configured to instruct the user terminal to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located, load it into the corresponding runtime area for startup, and provide feedback on the startup result of the baseline firmware upgrade.
[0069] According to several embodiments of the present invention, the apparatus further includes: a fifth module configured to, in response to the server receiving the current startup result of the baseline firmware upgrade, restore the read / write attribute of the partition where the baseline firmware is located to read-only attribute via the vendor-specific command.
[0070] According to several embodiments of the present invention, the apparatus further includes: a sixth module configured to, in response to receiving a request for a baseline firmware upgrade, modify the read / write attribute of the remaining partitions other than the partition where the baseline firmware is located to a read-only attribute and notify the user terminal via the vendor-specific command.
[0071] According to several embodiments of the present invention, the apparatus further includes: a seventh module configured to, in response to the server receiving the current startup result of the baseline firmware upgrade, restore the read / write attributes of the remaining partitions other than the partition where the baseline firmware is located to read / write attributes via the vendor-specific command.
[0072] According to several embodiments of the present invention, the apparatus further includes: an eighth module configured to determine whether the partition to which the non-baseline firmware upgrade is directed is the partition where the baseline firmware is located, and to determine whether the partition to which the non-baseline firmware upgrade is directed needs to be transferred based on the determination result.
[0073] To achieve the above objectives, a third aspect of the present invention provides a computer device. Figure 4 The diagram shown is a schematic representation of an embodiment of a computer device provided by the present invention. Figure 4 As shown, an embodiment of a computer device provided by the present invention includes the following modules: at least one processor 021; and a memory 022, the memory 022 storing computer instructions 023 that can be executed on the processor 021, the computer instructions 023 implementing the steps of the method described above when executed by the processor 021.
[0074] The present invention also provides a computer-readable storage medium. Figure 5 The diagram shown is a schematic representation of an embodiment of a computer-readable storage medium provided by the present invention. Figure 5 As shown, computer-readable storage medium 031 stores a computer program 032 that, when executed by a processor, performs the steps of the method described above.
[0075] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program for setting system parameters can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.
[0076] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. When the computer program is executed by the processor, it performs the functions defined in the method disclosed in the embodiments of the present invention.
[0077] Furthermore, the above-described method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to perform the functions of the above-described steps or units.
[0078] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.
[0079] In one or more exemplary designs, functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored as one or more instructions or code on or transmitted via a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one location to another. Storage media may be any available medium accessible to a general-purpose or special-purpose computer. By way of example, and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, or any other medium that may be used to carry or store the required program code in the form of instructions or data structures and is accessible to a general-purpose or special-purpose computer or a general-purpose or special-purpose processor. Furthermore, any connection may be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the aforementioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are all included in the definition of media. As used herein, disks and optical discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0080] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.
[0081] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.
[0082] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0083] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0084] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A method for initiating a baseline firmware upgrade, characterized in that, This includes performing the following steps on the server: Establish vendor-private commands that are not publicly accessible to users for modifying the read and write attributes of the operation partition; In response to receiving a request to upgrade the baseline firmware, the read / write attribute of the partition where the baseline firmware is located is modified to read / write attribute using the vendor's proprietary command. Instruct the user to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located; The client is instructed to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located, load it into the corresponding running area, and start it, and then feed back the startup result of the baseline firmware upgrade. In response to the server receiving the startup result of the baseline firmware upgrade, the read / write attribute of the partition where the baseline firmware is located is restored to read-only attribute through the vendor's private command; In response to receiving a request to upgrade the baseline firmware, the read / write attribute of the remaining partitions other than the partition where the baseline firmware is located is modified to read-only attribute by the vendor's private command and the user terminal is notified. Determine whether the partition to which the non-baseline firmware upgrade points is the partition where the baseline firmware is located, and determine whether the partition to which the non-baseline firmware upgrade points needs to be transferred based on the determination result. In response to the partition to which the non-baseline firmware upgrade points is the partition where the baseline firmware is located, transfer the partition to which the non-baseline firmware upgrade points to any free partition of the remaining partitions other than the partition where the baseline firmware is located.
2. The method according to claim 1, characterized in that, The vendor-specific commands include at least: The read / write attribute is modified from read-only to read-write or from read-write to read-only, and the read / write attribute of the operation partition is obtained.
3. The method according to claim 1, characterized in that, The method further includes: In response to the server receiving the startup result of the baseline firmware upgrade, the read / write attributes of the remaining partitions, excluding the partition where the baseline firmware is located, are restored to read / write attributes using the vendor's private command.
4. The method according to claim 1, characterized in that, Establishing vendor-private commands that are not publicly accessible to users includes: Based on reserved fields of the NVMe protocol, vendor-private commands that are not publicly accessible to users are established.
5. The method according to claim 1, characterized in that, The step of responding to a request for a baseline firmware upgrade by modifying the read / write attribute of the partition containing the baseline firmware to a read / write attribute via the vendor-specific command includes: The read / write attributes of the partition where the baseline firmware is located are modified by changing the flag bits of the read / write attributes.
6. The method according to claim 1, characterized in that, The instruction to the user terminal to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located includes: The baseline firmware version to be upgraded is downloaded to the cache area by sending the FW DownLoad command to the user terminal.
7. The method according to claim 6, characterized in that, The instruction to the user terminal to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located also includes: Based on the read / write attributes of the partition where the baseline firmware is located, the FW Commit command sent to the client loads the baseline firmware version to be upgraded from the cache into the partition where the baseline firmware is located.
8. The method according to claim 1, characterized in that, The instruction to the user terminal to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located, load it into the corresponding runtime area, and start the system, and to provide feedback on the startup result of the baseline firmware upgrade, includes: The user terminal is instructed to decrypt, verify, and sign the baseline firmware to be upgraded obtained from the partition where the baseline firmware is located, so as to obtain an executable baseline firmware.
9. The method according to claim 8, characterized in that, The instruction to the user terminal to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located, load it into the corresponding runtime area, and start the system, and to provide feedback on the startup result of the baseline firmware upgrade, includes: The user terminal is instructed to load the executable baseline firmware into the corresponding runtime area and start it via the bootloader.
10. The method according to claim 1, characterized in that, The method further includes: A startup state table is established and updated based on the startup and loading states of firmware upgrades. The startup result corresponding to each firmware upgrade is obtained by reading the startup state table.
11. The method according to claim 10, characterized in that, The instruction to the user terminal to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located, load it into the corresponding runtime area, and start the system, and to provide feedback on the startup result of the baseline firmware upgrade, also includes: Record the startup and loading status of the baseline firmware during this upgrade and update the startup status table; The update result of the baseline firmware upgrade is fed back to the server and / or the user by reading the update result of the startup status table.
12. An apparatus for initiating a baseline firmware upgrade, characterized in that, The device includes: The first module configures vendor-owned commands that are not publicly accessible to users and are used to modify the read and write attributes of the operation partition. The second module is configured to, in response to a received request for a baseline firmware upgrade, modify the read / write attribute of the partition where the baseline firmware is located to a read / write attribute using the vendor-specific command. The third module is configured to instruct the user to load the baseline firmware version to be upgraded into the partition where the baseline firmware is located. The fourth module is configured to instruct the user terminal to preprocess the baseline firmware version to be upgraded in the partition where the baseline firmware is located, load it into the corresponding running area, and start it, and provide feedback on the startup result of the baseline firmware upgrade. And the modules configured to implement the following functions: In response to the server receiving the startup result of the baseline firmware upgrade, the read / write attribute of the partition where the baseline firmware is located is restored to read-only attribute through the vendor's private command; In response to receiving a request to upgrade the baseline firmware, the read / write attribute of the remaining partitions other than the partition where the baseline firmware is located is modified to read-only attribute by the vendor's private command and the user terminal is notified. Determine whether the partition to which the non-baseline firmware upgrade points is the partition where the baseline firmware is located, and determine whether the partition to which the non-baseline firmware upgrade points needs to be transferred based on the determination result. In response to the partition to which the non-baseline firmware upgrade points is the partition where the baseline firmware is located, transfer the partition to which the non-baseline firmware upgrade points to any free partition of the remaining partitions other than the partition where the baseline firmware is located.
13. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-11.
Citation Information
Patent Citations
Method and equipment for updating vehicle-mounted terminal equipment system
CN110851157A
Method for modifying BIOS configuration options in ARM server based on CentOS in-band
CN112506574A