# US 12,032,948 B2 · System and method for runtime capsule firmware update with low-latency software SMIs

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,032,948 B2
- Document ID: US12032948B2
- Status: Granted
- Kind: B2
- Application number: 17/157,702
- Filed: 2021-01-25
- Published: 2021-07-29
- Granted: 2024-07-09
- Earliest claimed: 2020-01-24
- Assignees: Insyde Software Corp.
- Applicants: Insyde Software Corp.
- Inventors: Timothy Andrew Lewis
- Web page: https://patentgrep.com/patent/US12032948B2

## CPC

- G06F 8/654: using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
- H04L 9/0891: {Revocation or update of secret information, e.g. encryption key update or rekeying}
- G06F 21/572: {Secure firmware programming, e.g. of basic input output system [BIOS]}
- G06F 21/74: operating in dual or compartmented mode, i.e. at least one secure mode
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- G06F 2221/033: Test or assess software
- G06F 2221/2149: Restricted operating environment
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Systems and methods for performing flash updates during runtime are discussed. More particularly, the amount of secure memory required to prevent tampering during the update process is limited by storing hashes of logical blocks of the update image in secure memory after initial validation while storing the update image in non-secure RAM or another non-secure memory location. Additionally, disruptions to the computing platform are limited by dividing the logical blocks into smaller progress units to minimize the amount of time spent in the secure operating environment performing the update.

## Claims

### Claim 1

A non-transitory medium holding executable instructions for performing secure flash updates, the instructions when executed on at least one computing platform equipped with platform firmware and at least one processor, causing the platform to:
receive a request to perform a flash update of a firmware image, the request including an update capsule holding a flash update image that includes firmware code or data or both;
store the flash update image in an image buffer;
verify the flash update image, the verifying including:
verifying a signature of the flash update image using a previously stored certificate, and
storing a separate hash of each logical block of the flash update image in a secure memory location that is accessible only when one or more processors on the platform are operating in a secure operating environment;
receive a plurality of function calls via a runtime services interface provided by the platform firmware to perform the flash update, each call directed to a single logical block of the flash update image, each logical block divided into one or more progress units, at least one of the logical blocks including two or more progress units; and
perform, in response to each function call, an update to the firmware image for a single progress unit at a time for each logical block, the update performed while the one or more processors are operating in the secure operating environment after validating a hash of the logical block of the flash update image with a corresponding stored hash,
wherein a latency of the plurality of firmware function calls is tunable.

### Claim 2 (depends on 1)

The medium of claim 1 wherein the one or more processors exit the secure operating environment and re-enter the secure operating environment between performing updates for different progress units.

### Claim 3 (depends on 1)

The medium of claim 1 wherein the secure operating environment is System Management Mode (SMM) or TrustZone.

### Claim 4 (depends on 1)

The medium of claim 1, wherein the instructions when executed cause the at least one computing platform to:
verify a signature of the flash update image with a function provided by the runtime services interface.

### Claim 5 (depends on 1)

The medium of claim 1 wherein the image buffer is located in non-secure memory.

### Claim 6 (depends on 1)

The medium of claim 1 wherein the latency is tunable by adjusting block size of the flash update image.

### Claim 7 (depends on 1)

The medium of claim 1 wherein a secure flash update is performed for one of a system serial peripheral interface (SPI) device, an electrically erasable programmable read only memory (EEPROM), a flash device on a low pin count (LPC) bus, or an enhanced serial peripheral interface (eSPI) bus.

### Claim 8 (depends on 1)

The medium of claim 1 wherein the flash update image is an update for system firmware, Management Engine firmware, on-board gigabit Ethernet (GbE) firmware, sensor firmware or Field Programmable Gate Array (FPGA) firmware.

### Claim 9

A computing platform-implemented method for performing secure flash updates, the computing platform equipped with platform firmware and at least one processor, the method comprising:
receiving with the computing platform a request to perform a flash update of a firmware image, the request including an update capsule holding a flash update image that includes firmware code or data or both;
storing the flash update image in an image buffer;
verifying the flash update image, the verifying including:
verifying a signature of the flash update image using a previously stored certificate, and
storing a separate hash of each logical block of the flash update image in a secure memory location that is accessible only when one or more processors on the platform are operating in a secure operating environment;
receiving a plurality of function calls via a runtime services interface provided by the platform firmware to perform the flash update, each call directed to a single logical block of the flash update image, each logical block divided into one or more progress units, at least one of the logical blocks including two or more progress units; and
performing, in response to each function call, an update to the firmware image for a single progress unit at a time for each logical block, the update performed while the one or more processors are operating in the secure operating environment after validating a hash of the logical block of the flash update image with a corresponding stored hash,
wherein a latency of the plurality of firmware function calls is tunable.

### Claim 10 (depends on 9)

The method of claim 9 wherein the one or more processors exit the secure operating environment and re-enter the secure operating environment between performing updates for different progress units.

### Claim 11 (depends on 9)

The method of claim 9 wherein the secure operating environment is System Management Mode (SMM) or TrustZone.

### Claim 12 (depends on 9)

The method of claim 9, further comprising:
verifying a signature of the flash update image with a function provided by the runtime services interface.

### Claim 13 (depends on 9)

The method of claim 9 wherein the image buffer is located in non-secure memory.

### Claim 14 (depends on 10)

The method of claim 10 wherein the latency is tunable by adjusting block size.

### Claim 15 (depends on 9)

The method of claim 9 wherein a secure flash update is performed for one of a system serial peripheral interface (SPI) device, an electrically erasable programmable read only memory (EEPROM), a flash device on a low pin count (LPC) bus, or an enhanced serial peripheral interface (eSPI) bus.

### Claim 16 (depends on 9)

The method of claim 9 wherein the flash update image is an update for system firmware, Management Engine firmware, on-board gigabit Ethernet (GbE) firmware, sensor firmware or Field Programmable Gate Array (FPGA) firmware.

### Claim 17

A computing platform equipped with one or more processors, comprising:
a non-volatile storage location holding platform firmware that provides a runtime services interface to functions operable in a secure memory environment;
an image buffer in a non-secure memory location;
an operating system configured to execute an application that when executed makes a request to the runtime services interface to perform a flash update of a firmware image, the request including an update capsule holding a flash update image that includes firmware code or data or both;
wherein, upon receiving the request to perform the flash update, the computing platform:
stores the flash update image in the image buffer;
verifies the flash update image, the verifying including:
verifying a signature of the flash update image using a previously stored certificate, and
storing a separate hash of each logical block of the flash update image in a secure memory location that is accessible only when one or more processors on the platform are operating in a secure operating environment;
receives a plurality of function calls via the runtime services interface from the application to perform the flash update, each call directed to a single logical block of the flash update image, each logical block divided into one or more progress units, at least one of the logical blocks including two or more progress units; and
performs, in response to each function call, an update to the firmware image for a single progress unit at a time for each logical block, the update performed while the one or more processors are operating in the secure operating environment after validating a hash of the logical block of the flash update image with a corresponding stored hash,
wherein a latency of the plurality of firmware function calls is tunable.

### Claim 18 (depends on 17)

The computing platform of claim 17 wherein the one or more processors exit the secure operating environment and re-enter the secure operating environment between performing updates for different progress units.
