EFI HII Database Driver String Length Pre-calculation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing implementation of the Human Interface Infrastructure (HII) database driver in EFI environments is inefficient due to the need for repeated buffer allocation and validation when retrieving strings, as the requestor must calculate the string length and create a new buffer if the initial buffer is insufficient, leading to inefficient string retrieval processes.

Innovation Solution

A supplemental HII database protocol interface is introduced that allows requestors to obtain the length of strings and extended information prior to memory allocation, enabling the allocation of an appropriately sized buffer and reducing the need for repeated buffer creation and validation by calculating the length of strings and other HII components, such as forms and fonts, and storing this information in the HII database.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the HII database driver uses the standard protocol interface for string retrieval, then compatibility with the EFI Specification is maintained, but the efficiency of string retrieval deteriorates due to repeated buffer allocation and validation

Engineering Contradiction:
Improvecompatibility with EFI SpecificationVSAvoidefficiency of string retrieval
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by having the HII database driver pre-calculate and store the length of strings in the HII database before they are needed. When a driver requests a string, the length information is already available in the database, eliminating the need for repeated length calculations and buffer reallocations. This is implemented through the `HII_EXT_GET_STRING_LENGTH` function that retrieves pre-computed length information directly from the database.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If the requestor calculates string length and creates buffers on-demand, then memory allocation flexibility is maintained, but the time required for string retrieval increases due to repeated buffer management

Engineering Contradiction:
Improvememory allocation flexibilityVSAvoidtime for string retrieval
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent stores pre-calculated string lengths in the HII database during the initial package registration phase. This allows requesting drivers to retrieve the length information immediately without performing calculations or allocating buffers repeatedly. The length data is prepared in advance and stored alongside the string data in the database.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent copies the length information from the HII database into the requesting driver's memory buffer in a single operation. Instead of having the driver calculate lengths and manage multiple buffers, the length data is copied directly from the database, significantly reducing the time and complexity of buffer management.

Inventive Principle:
Principle #26Copying

3Reliability

If the HII database driver validates buffers by calculating string length each time, then data integrity is ensured, but the processing overhead increases

Engineering Contradiction:
Improvedata integrityVSAvoidprocessing overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent performs the length calculation and validation action in advance during the package registration phase, when the string data is first loaded into the HII database. The length is calculated once and stored in the database, eliminating the need for repeated validation calculations. This maintains data integrity while significantly reducing processing overhead during subsequent string retrieval operations.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7593956B1Interface to a human interface infrastructure database in an extensible firmware interface environment
Publication Date: 2009.09.22 AMERICAN MEGATRENDS
  • US7593956B1 patent drawing
  • US7593956B1 patent drawing
  • US7593956B1 patent drawing

AI summary

An improved HII database driver is provided in an EFI environment. The HII database driver is capable of storing extended information regarding an HII component in an HII database at the time the package containing the HII component is parsed for inclusion in the HII database. Extended information for a string may include length of the string in Unicode characters or the length of the string in narrow screen glyphs. The HII database driver also exposes methods through which the extended information may be retrieved from the HII database. The extended information may be utilized to allocate an appropriately sized buffer for storing the string.