White Paper Intel® Support Package Internet of Things

Intel® Firmware Support Package for Intel® Architecture

Intel® Firmware Support Package provides Internet of Things developers the flexibility of usage-specific and royalty-free firmware solution for Internet of Things devices based on Intel® Architecture.

Executive Summary This paper introduces the rationale behind Intel® Firmware Support Package (Intel® FSP), its development options, and an illustration of a workflow that shows how to integrate Intel® FSP with a sample firmware stack1: *, which is an open source firmware stack. Readers can experiment and apply the concepts presented to their own firmware stack of choice. With Intel® FSP and other reference source code releases, Intel promises develop- ers greater freedom, flexibility, and scalability when designing Internet of Things (IoT) devices using Intel® Architecture.

“Intel® Firmware Support Expanding the Ecosystem of Benefits Custom System Firmware for Intel® Package offers a firmware Intel® FSP is scalable and easy to adopt; Architecture it lowers the threshold towards the solution for Intel® Archi- Intel® FSP provides the firmware com- adoption of Intel® Architecture in the In- tecture that is scalable and ponent for initializing essential and ternet of Things (IoT) ecosystem. Intel® FSP is available publicly, and it is free easy to adopt, lowering the basic functions of Intel® processors and chipsets. It is designed to support all to download; therefore, developers and threshold towards the adop- firmware stacks available in the mar- hobbyists can quickly build a proto- 2 type and a basic firmware framework tion of Intel® Architecture in ket . The size of the Intel® FSP binary is small, around 100 to 350 kilobytes, and with ease. Once the interface to Intel® the Internet of Things it performs fast execution of around FSP is built inside a firmware stack, 3 developers can use future releases of ecosystem” 100 to 300 milliseconds . After Intel® FSP completes its initialization, the Intel® FSP binary and expect it to work firmware stack performs the remaining with minimum porting effort. The most functions of platform initialization such significant benefit is reducing the need as device discovery, device initializa- to read the comprehensive firmware Wong, Swee Heng tion, an and BIOS programming guides that are Intel Corporation (OS), etc. With Intel® FSP, Independent typically a few hundred pages long. Software Vendors (ISV) and Indepen- Sun, Jiming Design Philosophy Intel Corporation dent BIOS Vendors (IBV) in the ecosys- tem can continue to provide services Intel, like other silicon vendors, holds Mahesh, Divya for system firmware customization and the key to the knowledge in initializing Intel Corporation value-added feature development. the silicon it produces. Without the help from silicon vendors, firmware engineers typically have to perform reverse engineering and use trial and Intel® Firmware Support Package for Intel® Architecture

Table of Contents error methods in order to get the basic Strategic Moves silicon functions working. By providing Intel® FSP is not only designed with a Executive Summary ...... 1 a binary that performs the basic silicon long-term focus of supporting proces- initialization, Intel enables firmware Expanding the Ecosystem of sors suitable for IoT designs, but to also engineers to focus on features that add Custom System Firmware extend the reach to other Intel proces- value to the platform instead of basic for Intel® Architecture ...... 1 sor families, which include Intel® Core™, silicon features that do not differentiate Intel® Atom™, and Intel® Xeon™ proces- Benefits...... 1 the product significantly. sors. A list of supported Intel processor Design Philosophy...... 1 families is available at Unique Requirements of IoT Unique Requirements of IoT. . 2 www.intel.com/fsp. Unlike firmware for PCs (BIOS or UEFI), Strategic Moves...... 2 IoT firmware frequently deals with a Why Binary? Why Binary? ...... 2 closed system that performs dedicated Intel understands that many develop- functions; therefore, an IoT firmware Creating Development Options. . 3 ers in the early stages of designing can be customized to reduce the size Firmware Stack Sources . . . .3 a new platform need source code to and optimized for performance. Some- help them debug issues in hardware Support Models...... 3 times, features in a PC firmware directly and firmware. Even though Intel® FSP contradict the requirements of an IoT Other Ingredients of Firmware contains a binary component for inte- firmware; for example, if determinism Stacks Based on Intel® FSP. . . . 4 gration, the source code can be made and predictability are needed, then the available for debugging purposes. The Workflow Example to intelligence of plug-and-play and the reason Intel® FSP provides a binary Integrate Intel® FSP heuristic power management algo- component is to protect certain Intel into coreboot ...... 4 rithm are in conflict. Therefore, there intellectual properties and also to avoid are cases in the IoT ecosystem where Solving Technical Challenges . . .5 source code contamination associated alternatives to PC firmware are needed. Conclusion...... 6 with open source licensing agreements. Intel® FSP provides the flexibility for developers to choose an alternative Nevertheless, Intel is working towards firmware stack. releasing as much source code as pos- sible going forward. A binary compo- nent is still the best way to encapsulate the complex solution that developers

Custom system firmware stack Reference Hard to Port BIOS Intel R FSP

Intel® FSP simplifies firmware development. This diagram illustrates Reference the relationship between Intel® FSP and BIOS its origin, Reference BIOS. The scattered R subset form of the Reference BIOS Silicon Extracted Intel Wrapper makes it difficult to port the vital silicon Init FSP API initialization code to custom system Code core firmware. Intel® FSP extracts the silicon initialization code and consolidates the code into the Intel® FSP binary, Other Combined simplifying the development of custom glue system firmware. code

2 Intel® Firmware Support Package for Intel® Architecture

may not necessarily need to bother FSP into it. However, they may receive Support Models about as long as the binary component limited support from the open source The following are the support models does its job right. community. for Intel® FSP, coreboot, and propri- etary firmware stacks. Creating Development Options Firmware Stack Sources • Intel® FSP Support Original equipment manufacturer Firmware stacks can be obtained from (OEM) firmware designers have three the following sources: Support for Intel® FSP is available firmware development options: • Open Source Community from Intel® FSP Web site at www.intel.com/fsp • Self-Customization An example of an open source firm- • coreboot Support With this option, OEMs perform their ware stack is coreboot. Designed own self-customization using custom to be simple, flexible, and fast, Support for coreboot is available integrated packages purchased from coreboot separates the hardware from the following sources: ecosystem partners. initialization and the later boot logic. It uses the payload concept to boot — coreboot Web site at • Engineering Services different operating systems and ap- www.coreboot.org Alternatively, OEMs can engage eco- plications. — ecosystem partners, with engi- system partners to provide their engi- Obtain support from the coreboot neering support that incurs costs neering services to purchase partial or community by subscribing to the • Ecosystem Partners’ Firmware full firmware solutions. coreboot mailing list (www.core- Stack Support boot.org/Mailinglist) or reading the • Self-Integration Support for ecosystem partners’ FAQ (www.coreboot.org/FAQ). OEMs with experience in developing firmware stack is available from the can perform self-integra- • Intel® FSP Ecosystem Partners respective ecosystem partners. For example, VxWorks* support is avail- tion. They can download an open Information regarding ecosystem able from Wind River. source or use their own proprietary partners (vendors) for Intel® FSP is firmware stack and integrate Intel® available at www.intel.com/fsp.

Intel R Firmware Support Package (Intel R FSP)

Royalty-free download from www.intel.com/fsp

Custom integrated Wind River U-Boot* package from ecosystem Sage coreboot* partner website for a cost WARIS Technologies, Inc. RedBoot* American Megatrends Inc. TianoCore* Insyde Software AiR-Boot* Ircona Nanjing Bysoft Co., Ltd. Eltan

Includes the ingredients Ecosystem partner intergrates necessary to create images, Intel R FSP with a firmware stack development environment, to provide a value-added boot Download open source tools, etc. solution x86 boot code

Development Options with Self-Customization Engineering Services Self-Integration Intel® FSP. The Intel® FSP binary OEM customizes custom OEM purchases solutions OEM integrates and customizes; component is royalty-free, integrated packages purchased and/or services from ecosystem receives limited support from but Intel does not provide any from ecosystem partners partners the open source community engineering services for its integration into the customers’ Original Equipment Manufacturer (OEM) design.

3 Intel® Firmware Support Package for Intel® Architecture

Other Ingredients of Firmware Enable Management Engine (ME) in 3. For the Windows release, double- Stacks Based on Intel® FSP the Firmware click the executable file in the Win- Application example on the 4th genera- dows environment to extract the The following are the additional tion Intel® Core™ processor (formerly downloaded package. components for firmware stacks Haswell) product family platform based on Intel® FSP. For the release, extract the The Management Engine (ME) is a hard- downloaded file in the Linux envi- Enable Pre-OS Graphics ware feature embedded in the Platform ronment. Controller Hub (PCH) of the 4th gen- Depending on platform require- The extracted files are as follows: eration Intel® Core™ processor family ments, there are several options platforms. It is a platform protection • a binary file with application to enable pre-OS graphics such as technology that provides administra- program interfaces (APIs) to call Graphics Output Protocol (GOP), tors enhanced remote management on Intel® FSP functions Embedded Pre-OS Graphics (EPOG), the platform. and video BIOS (VBIOS). Some Intel® • an integration guide with instructions for the particular FSP releases have a built-in graph- Workflow Example to Integrate Intel® platform ics initialization engine that enables FSP into coreboot a primitive connection between the The integration guide is written display device and the framebuf- This example describes the workflow to for platform and system devel- fer to display simple text and logos. integrate Intel® FSP into coreboot. How- opers (which may include system Please refer to the Intel® Embedded ever, the same principle can be applied BIOS developers, firmware stack Graphics Drivers FAQ at to other firmware stacks. developers, system integrators, www-ssl.intel.com/content/www/ The following are the general steps to and end-users). It describes us/en/intelligent-systems/intel-em- integrate Intel® FSP into coreboot. in detail the steps required to bedded-graphics-drivers/faq-bios- integrate the Intel® FSP binary firmware.html for details. 1. Understand the architecture of the platform using the relevant component for the particular platform into a firmware stack Enable Trusted Execution Engine documentation — for example, data solution. The integration guide (TXE) in the Firmware sheets, product briefs, and white also includes links to related Application example on the Intel® papers are available from the Intel documents that may provide Atom™ E3800 processor (formerly Web site — when developing the further technical support. Bay Trail) product family platform firmware for a particular platform. Platform collaterals are available 4. Download (git clone) the coreboot The Trusted Execution Engine (TXE) from the Intel Embedded Design source distribution from is a hardware-based security feature, Center (EDC) Web site at www.intel. www.coreboot.org for the coreboot which comprises an independent com/content/www/us/en/intelli- source directory tree. For example, processor core embedded inside the gent-systems/embedded-design- Intel® Atom™ system-on-chip (SoC). git clone http://review. center.html. It enables Secure Boot, which helps coreboot.org/p/coreboot the computer resist tampering from 2. Download the Intel® FSP compo- 5. Copy the Intel® FSP binary com- external sources by ensuring only nents, available for free, from the ponent (i.e., FvFsp.bin) into the validated code is executed. Intel® FSP Web site at appropriate directory inside the www/intel.com/fsp. coreboot directory tree. An example of performing this step in a Linux The Intel® FSP solution is available terminal is shown below: for the Windows* and Linux* operat- ing systems, and includes a release #cp FvFsp.bin coreboot/src/ note and a readme file. Review both mainboard/intel/ documents for further details. cougarcanyon2

4 Intel® Firmware Support Package for Intel® Architecture

The actual path to place the Intel® FSP binary depends on the coreboot release. Please refer to the respec- Solving Technical Challenges tive coreboot release information. The following are some common 6. Update the microcode based on technical challenges that you the processor type on the platform. may encounter and their respec- Include the microcode into the fol- tive solutions. lowing files in the/c pu directory: microcode_blob.h microcode_blob.inc 1. Microcode Updates 3. ME Integration Contact your Intel representative for Question: Question: the latest microcode patches. Even though I know my CPUID is This issue relates to integrating 7. Configure the payload using the fol- 0x306A9, I do not know where ME into the firmware: lowing commands: to find the required microcode update. I build coreboot by entering the #cd coreboot following command in a Linux #make menuconfig Solution: terminal: For more details about building a Contact your Intel representative #make payload, see for the latest microcode. Alter- www.coreboot.org/Libpayload natlvely, visit the Intel support The final image coreboot.rom( ) portal at is created in the directory 8. The data region of the Intel® FSP https://businessportal.intel.com, . After pro- binary can be customized accord- /coreboot/build and search for the document if gramming the Intel® FSP binary, ing to the platform environment, if you know the document ID. coreboot, and the payload into needed, using the binary configura- the SPI-1 partition of the firm- tion tool (BCT). ware, the system does not boot.

2. Microcode Patches The POST code is 0000, which The base address of the Intel® means nothing happened. FSP binary can also be rebased, if Question: needed, using the BCT. Solution: I do not know what I need to

do with the raw text file for the Obtain the correct ME-enabled Download the BCT from microcode patches. firmware from the Intel Web site www.intel.com/fsp, and extract the (https://platformsw.intel.com/ downloaded file. Solution: home.aspx), and then program it 9. Configure Error Checking and Cor- Create two files from the raw text into the SPI-0 partition. rection (ECC) support if the platform file, for example, supports it. To determine if the and platform supports ECC, refer to the m12306a9_00000017.h m12306a9_00000017.inc Intel® FSP release note. cat name.txt | awk ‘ { a. Enable or disable ECC support us- print $1 ; print $2 ; ing the BCT. print $3; print $4 } ‘ > name.h b. Patch the Intel® FSP binary. cat name.txt | sed ‘s/,//’ c. Rebuild the firmware stack with | awk ‘ { print “ .long “ the modified Intel® FSP binary. $1 } ‘

5 Intel® Firmware Support Package for Intel® Architecture

Conclusion FSP solution. With the Intel® FSP binary scalability in their designs as newer component performing the hardware and more capable processors will be The adoption of the Internet of Things initialization of Intel silicon, embed- supported, which in turn accelerates concept, with devices communicat- ded developers have the flexibility to development time. In addition, they can ing and collaborating via the Internet, decide the best approach to develop a maximize cost efficiency as the Intel® requires computing power in compact customized firmware for their designs. FSP solution is available for free to em- devices that are expected to perform They can either engage the services of bedded developers. specialized functions, such as digital an Intel® FSP ecosystem partner to per- signages, kiosks, or digital security form the customization and integration, surveillance. These specialized designs or customize the firmware themselves may divert from the traditional PC by integrating the Intel® FSP binary into architecture; embedded developers an open source firmware stack of their seek a firmware solution for Internet of choice. Things devices based on Intel® Archi- tecture. Intel® FSP has a long-term roadmap that focuses on supporting processors For releases of Intel® Firmware Support Cognizant of the needs of embedded suitable for intelligent systems, such as Package for supported products, developers in their designs for Internet Internet of Things devices. Embedded including relevant support documenta- of Things devices, Intel offers the Intel® developers gain the benefit of greater tion, visit www.intel.com/fsp

1 A firmware stack is also known as a boot loader in some IoT designs. 2 Some integration effort is needed. 3 Actual size and execution speed depend on the product and debug option.

Get approval from Trademarks and Brands Legal at http://legal.intel.com/Trademarks/index.htm INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL’S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked “reserved” or “undefined.” Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting Intel’s Web site at www.intel.com. Copyright © 2014 Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries. * Other names and brands may be claimed as the property of others. Printed in Malaysia 0814/DRK/SH/PDF Please Recycle 331015-001EN