# US 2014/0157230 A1 · Streamlining Hardware Initialization Code

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

- Number: US 2014/0157230 A1
- Document ID: US20140157230A1
- Status: Published application
- Kind: A1
- Application number: 13/741,345
- Filed: 2013-01-14
- Published: 2014-06-05
- Earliest claimed: 2012-12-04
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Daniel M. Crowell; John Farrugia; Michael J. Jones; David Dean Sanner
- Web page: https://patentgrep.com/patent/US20140157230A1

## CPC

- G06F 8/72: Code refactoring
- G06F 8/30: Creation or generation of source code
- G06F 8/4443: {Inlining}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

According to one embodiment of the present disclosure, hardware initialization code and error action information are retrieved from separate storage areas. The hardware initialization code includes code that initializes a device, and also includes placeholders corresponding to actions that are performed when the device fails initialization. Likewise, the error action information describes the actions that are performed when the device fails initialization. The error action information is converted into macros that include lines of code. As such, the error action placeholders are matched to the macros and, in turn, each of the error action placeholders is replaced with the lines of code corresponding to the matched macros.

## Claims

### Claim 1

A method comprising:
retrieving, from a first storage area, hardware initialization code that is adapted to initialize a device, wherein the hardware initialization code also includes an error action placeholder, the error action placeholder corresponding to one or more actions that are performed in response to detecting a failure during the initialization of the device;
retrieving error action information from a second storage area, wherein the error action information describes one or more of the actions that are performed in response to detecting the failure during the initialization of the device;
converting the error action information to one or more macros, wherein each of the one or more macros includes one or more lines of code;
matching the error action placeholder to one of the macros; and
replacing the error action placeholder in the hardware initialization code with the lines of code corresponding to the macro that matched the error action placeholder.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
compiling the modified hardware initialization code, resulting in hardware initialization firmware code; and
executing the hardware initialization firmware code wherein, during the execution, the hardware initialization firmware code executes one or more of the actions in response to the device failing the initialization.

### Claim 3 (depends on 1)

The method of claim 1 wherein:
the error action information is generated in a human-recognizable format; and
the hardware initialization code includes a plurality of error action placeholders that are macro call functions, wherein the error action placeholder is included in the plurality of error action placeholders and is one of the macro call functions.

### Claim 4 (depends on 3)

The method of claim 3 further comprising:
converting one more create macro calls included in the hardware initialization code to the macro call functions.

### Claim 5 (depends on 1)

The method of claim 1 wherein one of the actions de-configures the device in response to the device failing initialization.

### Claim 6 (depends on 1)

The method of claim 1 wherein one of the actions logs error data in response to the device failing initialization, the method further comprising:
providing the logged error data to a developer tool;
receiving, from the developer tool, one or more software changes;
in response to the one or more software changes corresponding to one or more of the actions:
updating the error action information in the second storage area;
converting the updated error action information to one or more updated lines of code; and
modifying the hardware initialization code by replacing the error action placeholder with the one or more updated lines of code.

### Claim 7

The method of 6 wherein, in response to the one or more software changes corresponding to the hardware initialization code, the method further comprises:
updating the hardware initialization code based upon the one or more software changes; and
modifying the updated hardware initialization code by replacing the error action placeholder with the lines of code corresponding to the macro that matched the error action placeholder.

### Claim 8

A method comprising:
retrieving, from a first storage area, hardware initialization code that is adapted to initialize a device, wherein the hardware initialization code also includes a create macro call function that corresponds to one or more actions that are performed in response to detecting a failure during the initialization of the device;
converting the create macro call function to one or more macro call functions;
retrieving error action information from a second storage area, wherein the error action information describes one or more of the actions that are performed in response to detecting the failure during the initialization of the device;
converting the error action information to one or more macros, wherein each of the one or more macros includes one or more lines of code;
matching one of the macro call functions to one of the macros; and
replacing the matched macro call function in the hardware initialization code with one or more of the lines of code corresponding to the matched macro.

### Claim 9 (depends on 8)

The method of claim 8 wherein the error action information is generated in a human-recognizable format.

### Claim 10 (depends on 8)

The method of claim 8 wherein one of the actions logs error data in response to the device failing initialization, the method further comprising:
providing the logged error data to a developer tool;
receiving, from the developer tool, one or more software changes;
in response to the one or more software changes corresponding to one or more of the actions:
updating the error action information in the second storage area;
converting the updated error action information to one or more updated lines of code; and
modifying the hardware initialization code by replacing the error action placeholder with the one or more updated lines of code.

### Claim 11

The method of 10 wherein, in response to the one or more software changes corresponding to the hardware initialization code, the method further comprises:
updating the hardware initialization code based upon the one or more software changes; and
modifying the updated hardware initialization code by replacing the error action placeholder with the lines of code corresponding to the macro that matched the error action placeholder.
