REKLAMA

AMI AFU For Aptio 4.rar

Wsad BIOS dla Samsung NP350E7C-S07PL, chip 25Q16CVS16

Marka:Samsung Model:NP350E7C-S07PL Chassis (płyta lub główne podzespoły): Matryca/Panel (jeśli występuje): Inne (uwagi):


Pobierz plik - link do postu
  • AMI AFU For Aptio 4.rar
    • AfuEfix64.efi
    • AMI_Aptio_AFU_User_Guide_NDA.pdf
    • readme.txt


AMI AFU For Aptio 4.rar > AMI_Aptio_AFU_User_Guide_NDA.pdf

AMI Software Utility User Guide

Aptio AFU User Guide
Document Revision 1.11
Apr 28, 2017
Confidential, NDA Required
Copyright © 2017
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All Rights Reserved
Property of American Megatrends, Inc.

American Megatrends, Inc.
Aptio AFU User Guide

Legal
Disclaimer
This publication contains proprietary information which is protected by copyright. No part of this publication
may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language,
or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends,
Inc. American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without
notice.
For Additional Information
Call American Megatrends, Inc. at 1-800-828-9264 for additional information.
Limitations of Liability
In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever,
whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the
support materials provided with the product.
Limited Warranty
No warranties are made, either expressed or implied, with regard to the contents of this work, its
merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and
omissions or for the uses made of the material contained herein or reader decisions based on such use.
Trademark and Copyright Acknowledgments
Copyright © 2017 American Megatrends, Inc. All Rights Reserved.
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All product names used in this publication are for identification purposes only and are trademarks of their
respective companies.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 2 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Table of Contents
Aptio AFU User Guide ................................................................................................................................................ 1
Legal .......................................................................................................................................................................... 2
Table of Contents ....................................................................................................................................................... 3
Document Information .............................................................................................................................................. 5
Purpose .......................................................................................................................................................................... 5
Audience ........................................................................................................................................................................ 5
Change History ............................................................................................................................................................... 5
Introduction ............................................................................................................................................................... 6
Overview ........................................................................................................................................................................ 6
AFU APTIO Features ....................................................................................................................................................... 6
Requirements ................................................................................................................................................................. 6
Supported Operating System ..................................................................................................................................... 6
Firmware Requirements ............................................................................................................................................. 7
Getting Started .......................................................................................................................................................... 8
Installation ..................................................................................................................................................................... 8
AFUAPTIO Operation ................................................................................................................................................. 9
Overview ........................................................................................................................................................................ 9
Commands and Options............................................................................................................................................... 10
Usage ....................................................................................................................................................................... 10
Commands ............................................................................................................................................................... 10
Options ..................................................................................................................................................................... 11
Rules ......................................................................................................................................................................... 12
Usage ....................................................................................................................................................................... 13
Overview ...................................................................................................................................................................... 13
AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] … ................................................................................ 13
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt; ................................................................................................. 15
AfuEfix64 & lt; Command & gt; ................................................................................................................................................ 15
AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt; ............................................................... 16
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt; .............................................................................................. 16
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt; ..................................................................................... 17
Remarks ................................................................................................................................................................... 18
Overview ...................................................................................................................................................................... 18
Preserving Setup Setting – /SP ..................................................................................................................................... 18
Preserving SMBIOS – /R and /Rn ................................................................................................................................. 19
Programming NVRAM Region – /N .............................................................................................................................. 19

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 3 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Programming Specific NCB Block – /Kn ....................................................................................................................... 19
Programming Specific ROM Hole – /Ln ........................................................................................................................ 19
Secured Flash Update – /CAPSULE and /RECOVERY .................................................................................................... 20
Send special command to BIOS – /CMD:{xxx}.............................................................................................................. 21
Linux Pre-Requisites ................................................................................................................................................. 22
Signing Driver and Enrolling Public Key to the System ............................................................................................. 24
Support Table .......................................................................................................................................................... 26
Command/Option Support in Each Mode ................................................................................................................... 26
Error Codes .............................................................................................................................................................. 28
Error Code Definition ................................................................................................................................................... 28
FQA .......................................................................................................................................................................... 32
The Error Message Information of ROM ...................................................................................................................... 32
Windows requires a digitally signed driver .................................................................................................................. 32

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 4 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Document Information

Purpose
This document provides information to use the Aptio AFU for updating system BIOS.

Audience
Generic BIOS Engineers, OEM Engineers, and Aptio Customers.

Change History
Date

Revision

2013-11-19
2014-03-20
2014-04-24

1.00
1.01
1.02

2014-08-22

1.03

2014-11-11
2015-01-30
2015-06-22
2015-11-18

1.04
1.05
1.06
1.07

2016-02-02

1.08

2016-03-25

1.09

2016-10-18

1.10

2017-04-28

1.11

Description
Initial document created and update content to latest released of Afu
Modified 0x18、0xB6、0xB7、0xBF、0xD0 error message text.
Added error message 0x34、0x35.
Added new commands for /meul and /JBC.
Need to be updated the SmiFlash module to 5.001_SmiFlash_13.
Added Windows 2012 R2 in the support list.
Added new’s command /cmd:.
Removed Microsoft®DOS support.
Added Linux Xen note.
Added 0x4A、0x4B error message text.
Added DOS does not support note.
Added an announcement: Linux does not support Secure Boot
Added support Linux Secure Boot.
Added /CLRCFG, /BCPALL, /DPC command.
Added 0x36, 0x37, 0x4C, 0x71 error messages.
Added 0x4C, ROMLayout change error messages.
Added answer for Windows digitally signed driver.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 5 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Introduction

Overview

A

FU (AMI Firmware Update) is a package of utilities used to update the system BIOS under various operating
systems. AFU only works for APTIO with SMI FLASH support.

AFU APTIO Features
This list of features is supported by command line, command prompt, EFI Shell, or BSD/Linux shell.


Read system ROM image



Flash ROM image



Command line operating

Requirements
Supported Operating System
AFU is supported by the following operating systems:
















Microsoft® Windows® 2000
Microsoft® Windows® XP
Microsoft® Windows® 2003
Microsoft® Windows® Server 2008 R2
Microsoft® Windows® Server 2012 R2
Microsoft® Windows® Vista
Microsoft® Windows® 7
Microsoft® Windows® 8
Microsoft® Windows® 8.1
Microsoft® Windows® 10
Microsoft® Windows® PE
EFI Shell Environment
BSD
Linux(*1)
MS-DOS(*2)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 6 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Note:
*1. On Linux Xen environment, AFULNX must be executed in host desktop (Domain 0) of the virtual machine.
*2. DOS version is stopped supporting in AFU 3.08 or later version.

Firmware Requirements


Compatible with Aptio 3, 4, and 4.5.



Requires that the current installed firmware has SMI flashing support enabled.



For supporting Secure Flash, the following eModules are required:
- Secure Flash Pkg (4.6.5.1_SECMOD_003 or later)
- CryptoPkg (4.6.5_CRYPTOAPI_0003 or later)
- Capsule (4.5.6_Capsule_00 or later)
- SMIFlash (4.6.3.6_SMIFLASH_23 or later)
- OFBD (4.6.3.2_OFBD_1.0.2 or later)
- OFBD Secure Flash (4.6.5.0_OFBD_SECURE_FLASH_0.0.5 or later)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 7 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Getting Started

Installation
To run, extract all of the files from the folder with the name corresponding to the desired operating
system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 8 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AFUAPTIO Operation

Overview
This mostly involves documenting all the SDL tokens and eLinks. This chapter explains the operation
of AFUAPTIO.
The AFUAPTIO operation mode includes all of the AFUAPTIO features such as saving current ROM
image to file, getting and displaying ROM ID from BIOS ROM file.
An example of AFUEFIX64 that getting and displaying ROM ID from BIOS ROM file command screen
are shown below:

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 9 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Commands and Options
The following list is to offer you an overview of the commands and options provided by AFUAPTIO.
The content can also be found in AFUAPTIO’s help information. A more detailed usage of the
commands and options will be explained in the next chapter.

Usage
AfuEfix64 & lt; BIOS ROM File Name & gt; [Option 1] [Option 2] …
Or
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AfuEfix64 & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O

Save current ROM image to file

- /U

Get and display ROM ID from BIOS ROM file

- /S

Refer to Option: /S

- /D

Verification test of given ROM File without flashing BIOS.

- /A

Refer to Option: /A

- /OAD

Refer to Option: /OAD

- /CLNEVNLOG Refer to Option: /CLNEVNLOG

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 10 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Options
The optional field is used to supply more information for flashing BIOS ROM. Following lists the
supported optional parameters and format:

- /CLRCFG

Program without preserving setup configuration

-/BCPALL

Save all question values before flash

-/DPC

Don't Check Aptio 4 and Aptio 5 platform.

- /MEUL:

Program ME Entire Firmware Block, which supports Production.BIN and
PreProduction.BIN files.

- /Q

Silent execution

- /X

Do not check ROM ID

- /CAF

Compare ROM file's data with Systems is different or not, if not then cancel
related update.

- /S

Display current system's ROMID

-/JBC

Don't Check AC adapter and battery.

- /HOLEOUT:

Save specific ROM Hole according to given RomHole GUID.

- /SP

Preserve Setup setting.

- /R

Preserve all SMBIOS structures during programming.

- /Rn

Preserve SMBIOS type N during programming.(n=0-255)

- /B

Program Boot Block

- /P

Program main bios image

- /N

Program NVRAM

- /K

Program all non-critical blocks

- /Kn

Program n'th non-critical block (n=0-15)

- /HOLE:

Update specific ROM Hole according to RomHole GUID.

- /L

Program all ROM Holes

- /Ln

Program n'th ROM Hole only (n=0-15)

- /ECUF

Update EC BIOS when newer version is detected.

- /E

Program Embedded Controller block

- /ME

Program ME Entire Firmware Block.

- /MEUF

Program ME Ignition Firmware Block.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 11 of 32

American Megatrends, Inc.
Aptio AFU User Guide

- /A

OEM Activation file.

- /OAD

Delete OEM Activation Key

- /CLNEVNLOG

Clear Event Log.

- /CAPSULE

Override Secure Flash policy by Capsule

- /RECOVERY

Override Secure Flash policy by Recovery

- /EC

Program Embedded Controller Block. (Flash Type)

-/CMD:

Send special command to BIOS. /CMD:{xxx}

- /REBOOT

Reboot after programming.

- /SHUTDOWN

Shutdown after programming.

- /FDR

Flash Flash-Descriptor Region.(*1)

- /GBER

Flash GBE Region.(*1)

- /MER

Flash Entire ME Region.(*1)

- /OPR

Flash Operation Region of SPS.(*1)

- /PDR

Flash PDR Region.(*1)

Note:
*1: If BIOS ME Module reports these commands, AFU will show this command.
To use a command of generic AFU on the Specific platform, please refer the help menu (/?) in generic AFU.

Rules
- Any parameter enclosed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options]. They are /O, /U, /D.
- Main BIOS image is default flashing area if no any options present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 12 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Usage

Overview
The AFUAPTIO offers the following basic command and option usages:




AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AfuEfix64 & lt; Command & gt;

Other usages which are not mentioned in help are:




AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt;
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;

These usages are explained in more detail in this chapter.

AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
The user could put no option or combine multiple options in one command line. Commands cannot
be combined in command line like options unless the command is categorized as both a command
and an option, such as /S and /A.

For option combination case, AFUAPTIO will check its option priority list and execute the options
according to the priority order. Three examples of this usage are provided below.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 13 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; BIOS ROM File Name & gt;

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line would trigger AFUAPTIO to run the default setting which
flashes the system Main Block with the specified BIOS ROM File.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /D /S

Where Output BIOS ROM File Name, the mandatory field is used to specify path/filename of the
BIOS ROM file with extension. /D is to verify the current BIOS and the BIOS ROM File, and /S, which
is categorized as a command and also an option, gets and displays the current system’s ROM ID.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /P /B /N /REBOOT

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line is to flashing current BIOS by BIOS ROM file. /P /B /N are to
specify that the flashing regions are Main Block, Boot Block and NVRAM. /REBOOT is to specify that
reboot action will be performed in this execution. AFUAPTIO would execute the options in the order
of /B, /P, /N and then reboot the system at the end. The order of execution is determined by
AFUAPTIO design.

AfuEfix64 & lt; ME File Name & gt; /ME

Where ME File Name is used to specifying path/filename of the ME file with extension. This
command line programs entire ME block with the specified ME file.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 14 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AFUAPTIO can only execute one command at a time and it does not accept combinations of
command and option in one command line except those can be both command and option. Three
examples of this usage are provided below.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /O

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line saves the current ROM image to a file.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /U

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
This command line gets and displays the ROM ID from the specified BIOS ROM file.

AfuEfix64 & lt; Command & gt;
This command usage is for some commands which do not require inputting any file to complete the
execution. Usually this type of commands accesses the current BIOS only. An example of this usage
is provided:

AfuEfix64 /S

This command line gets and displays the ROM ID of the current BIOS in system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 15 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM
Hole GUID & gt;
This command usage is for outputting or flashing a certain ROM hole. For example, the command
line for outputting a certain ROM hole whose GUID is 01234567- 89ab- cdef- 0123- 456789abcdef is
as following:

AfuEfix64 & lt; Output ROM Hole File Name & gt; /HOLEOUT:0123456789abcdef0123456789abcdef

Where Output ROM Hole File Name is used to specify path/filename of the output ROM hole file
with extension. The GUID after the option should not contain dashes or spaces in between.

Another example of flashing a certain ROM Hole whose GUID is 01234567- 89ab- cdef- 0123456789abcdef is as following:

AfuEfix64 & lt; ROM Hole File Name & gt; /HOLE:0123456789abcdef0123456789abcdef

Where ROM Hole File Name is used to specify path/filename of the ROM hole file with extension.
Please discard dashes and spaces inside GUID line while typing.

AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
This command usage is for /Kn and /Ln commands where n is indicating the numeric order of a
th

certain non-critical block or ROM hole. For example, to program the 4 ROM hole, the command
line could be:

AfuEfix64 & lt; BIOS ROM File Name & gt; /L4

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 16 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension,
th

and 4 is to specify that the 4 ROM hole is the one to perform /L operation.

The next chapter has more detail of the numbering rule of non-critical blocks and ROM holes.

AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;
This command usage is for /A command which insert a specific OEM activation key into the empty
key inside current system BIOS. The command line is as follows:

AfuEfix64 /A & lt; OEM Activation Key Bin File Name & gt;

Where OEM Activation Key Bin File Name is used to specify path/filename of the OEM activation
key file with extension. Please make sure that the OEM Activation Key region is empty before
inserting the key, or please perform /OAD command before insertion.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 17 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Remarks

Overview
This chapter is to describe commands/options which require extra attention and to explain cases
which may occur in certain unique scenarios.

Preserving Setup Setting – /SP
/SP command is designed specifically for “OEM NVRAM/Setup Variable Preserve” module part of
OFBD. If /SP is called, AFUAPTIO would send SMI 0x26 twice to save setup setting before starting
updating NVRAM and to restore setup setting after finishing updating NVRAM. Customer can
customize their OFBD module to preserve certain NVRAM data when AFUAPTIO flashes the NVRAM
area. For example, there are two methods for preserving Setup Password:

Method 1
Enable PRESERVE_PASSWORDS token – The BIOS will preserve its Setup password when AFUAPTIO
calls the SMIFlash module.

Method 2
Control through /SP command – Customer can port PreserveSetupPassword in
OFBDSETUPStoreHandle and RestoreSetupPassword in OFBDSETUPRestoreHandle, and use /SP
command to keep or not to keep the Setup Password while updating the NVRAM:

AfuEfix64 xxx.ROM /N /SP - keep Setup password
AfuEfix64 xxx.ROM /N

- don’t keep Setup password.

This feature needs BIOS’ cooperation. To learn more about preserving setup data, please consult
with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 18 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Preserving SMBIOS – /R and /Rn
If the SMBIOS data is stored in Main Block or Boot Block, AFUAPTIO /R and /Rn options would take
the responsibility to preserve the SMBIOS data. If the SMBIOS data is stored in NVRAM and BIOS
project’s token SMBIOS_PRESERVE_NVRAM=0, the preservation process would take place at OFBD
module. To know more about the detail of preserved data, please consult with your BIOS provider.

/R is used to preserve the whole SMBIOS data. To preserve a certain type of SMBIOS, please use /Rn.
For example, to preserve SMBIOS Type 2 and Type 41 during BIOS flashing and the SMBIOS data is
located in Boot Block, the command could be:
AfuEfix64 & lt; BIOS ROM File Name & gt; /B /R2 /R41

Programming NVRAM Region – /N
Erasing NVRAM may cause important variables lose.

Programming Specific NCB Block – /Kn
/Kn command is designed to program a specific non-critical block, or NCB block. AFUAPTIO would
search ROM and identify the first NCB Block found as K0, and the second one as K1, etc. Therefore,
command /K2 would program the third NCB Block found by AFU.

Programming Specific ROM Hole – /Ln
/Ln command is designed to program a specific ROM Hole. Each ROM Hole is identified in the
following way: AFUAPTIO would search for ROM Holes in the order of Boot Block area and Main
Block area, and identify each ROM Hole in consecutive integers from 0 to 15. So, for example, /L1 is
used to program the second ROM Hole found in ROM.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 19 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Scenarios:
If a ROM contains two ROM Holes in Boot Block area and two in Main Block area,
AFUAPTIO would identify L0 and L1 for the two in Boot Block area and L2 and L3 for the two in Main
Block area.

If a ROM contains 2 ROM Holes in Boot Block area and none in Main Block area, AFUAPTIO
would only find 2 ROM Holes in total and identify them as L0 and L1.

If a ROM contains no ROM Holes in Boot Block area and three in Main Block area,
AFUAPTIO would find nothing in Boot Block area and identify L0, L1 and L2 for the three ROM Holes
in Main Block area.

Secured Flash Update – /CAPSULE and /RECOVERY
For Secured BIOS, the command rule for programming the current BIOS is different. There are two
more modes, Capsule Mode and Recovery Mode, which are different from the regular Runtime
Mode mentioned in the previous contents. Unlike Runtime Mode where all the commands/options
are supported, Capsule Mode and Recovery Mode only support /P, /B, /N, and /E options, or
depending on the BIOS design. The following description explains how to program BIOS under these
two modes.

To override Secure Flash policy and program the BIOS image in Capsule Mode, please use the
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /CAPSULE /P /B /N /E

And to override Secure Flash policy and program the BIOS image in Recovery Mode, please use this
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /RECOVERY /P /B /N /E

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
For more detail on Secure Flash, please consult with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 20 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Send special command to BIOS – /CMD:{xxx}
Send the string between brackets to OFBD OEM CMD Checking Module. The string is
corresponding to the string which is defined in BIOS by user.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 21 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Linux Pre-Requisites

1. Log in Linux as root otherwise use sudo (if permitted).
2. The compiler suite (gcc) must be installed. If these packages are not installed, the driver CANNOT
be built.
3. For most of the distributions, AFU will generate driver without any notification, if it doesn’t exist
you need to install kernel sources. Also if Initmem fails, Please follow point 4.
4. Kernel sources must be installed, *CONFIGURED*, and then compiled. Following are steps to do
this:
a. Find Running Kernel's Configuration File:
To configure the sources, simply change to the kernel source directory (typically
/lib/modules/$(uname -r)/build). If it doesn't exist, you need to install kernel source.
Typically, the reference configuration for the kernel can be found in the /boot directory with
filename '.config', 'kernel.config', or 'vmlinux-2.4.18-3.config'. Type 'uname -a' and use the
configuration filename that best matches the output from 'uname -a'. Also, check for
/dev/mem directory existence. If it doesn’t exist, you need to install kernel sources.
Normally it comes with the installation unless if the option is deselected.
On some distributions Red Hat for instance, there is a config directory under
/lib/modules/$(uname -r)/build.
Copy this configuration file into the root of the Linux kernel source tree (usually it is
/lib/modules/$(uname -r)/build). This file must be renamed to " .config " (dot config).
b. Make Your AMI Flash Driver (amifldrv_mod.o):
For most distribution, the command to build the driver is:
afulnx_32 /MAKEDRV
Or
afulnx_64 /MAKEDRV

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 22 of 32

American Megatrends, Inc.
Aptio AFU User Guide

If your Linux's kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
afulnx_32 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
Or
afulnx_64 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default path is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
c. Make Your AMI Flash Driver from driver source files (amifldrv_mod.o):
Using command /GENDRV, it will generate driver source files to specific directory.
afulnx_32 /GENDRV [Option 1] [Option 2]
Or
afulnx_64 /GENDRV [Option 1] [Option 2]
Where,
[Option 1]: Specific kernel source 'KERNEL=XXXX' same as the /MAKEDRV
[Option 2]: Specific output directory 'OUTPUT=XXXX'
Generate files as outlined below:
File Name Description
--------------------------------------------------------------------------amiwrap.c Driver source code.
amiwrap.h Driver header.
amifldrv.o_shipped Object file for driver.
Makefile Makefile
--------------------------------------------------------------------------For most distribution, the command to build the driver is: make.
If your Linux’s kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
make KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
d. Check Your Build:
Check the version of running Linux kernel with 'uname -r'.
Check the version of amifldrv_mod.o with 'modinfo amifdrv_mod.o'.
If they mismatch, you will need to select the correct configuration
File (.config), rebuild your kernel, and then rebuild your driver as described in steps a, b, c
and d.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 23 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Signing Driver and Enrolling Public Key to the System

The following prerequisites are needed on the build system to sign the driver:
1. Login to Linux OS as root otherwise use sudo.
2. The compiler suite (gcc) must be installed. If it’s not installed, the AFU driver cannot be built.
3. OpenSSL: Needed to generate cryptographic keys. OpenSSL tool can be downloaded from
https://www.openssl.org
4. Perl interpreter: Needed to run the signing script. Perl tool can be downloaded from
https://www.perl.org

Follow the below steps to sign the driver:
1. Boot to Linux OS.
2. Generate a Public and Private key pair using below openssl command: & gt; openssl req -x509 new -nodes -utf8 -sha256 -days 36500 -batch -configconfiguration_file.config -outform DER -out
public_key.der -keyout private_key.priv
Note: The configuration file configuration_file.config must be created with the required
information before running the command. A sample configuration file is shown below. The
values in & lt; & gt; must be filled with actual values.
configuration_file.config:
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = myexts
[ req_distinguished_name ]
O = & lt; organization_name & gt;
CN = & lt; organization_name & gt; Signing Key
emailAddress = & lt; email_address & gt;
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 24 of 32

American Megatrends, Inc.
Aptio AFU User Guide

3. Build AFU driver using below command. The driver will be generated in the current directory
with name amifldrv_mod.o.
& gt; afulnx_64 /MAKEDRV
4. Execute below command to sign driver with the key generated in step 2.
& gt; perl /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 private_key.priv
public_key.der amifldrv_mod.o
5. Request addition of public key to MOK list using mokutil. The command will prompt a
password which will be needed during public key enrollment in next step.
& gt; mokutil --import public_key.der
6. Reboot the system which will launch MOK manager application to complete public key
enrollment.
7. Once the public key enrollment is done, Boot to OS and execute below command to ensure
the newly added key is available in system key ring.
& gt; keyctl list %:.system_keyring
8. Install signed driver using insmod command.
& gt; insmod amifldrv_mod.o
9. Ensure it is loaded successfully using lsmod command.
Reference: https://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modulesfor-secure-boot.html

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 25 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Support Table

Command/Option Support in Each Mode
Command
/O
/U
/S
/D
/A
/OAD
/CLNEVNLOG

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Option
/MEUL
/Q
/X
/CAF
/S
/JBC
/SP
/R
/Rn
/B
/P
/N
/K
/Kn
/HOLE:
/HOLEOUT:
/L
/Ln
/ECUF
/E
/ME
/MEUF
/A
/OAD

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported ( *1 )
Supported ( *1 )
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 26 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Option
/CLNEVNLOG
/EC
/REBOOT
/SHUTDOWN

Runtime Mode
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported

Note:
* 1: This option must use with either /P or /B in order to be supported under Capsule Mode.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 27 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Error Codes

Error Code Definition
CODE
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0X0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
0x17
0x18
0x19
0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0x20
0x21

Definition
Error: Unknown command.
Error: BIOS has no flash information available.
Error: ROM file size does not match existing BIOS size.
Error: ROM file ROMID is not compatible with existing BIOS ROMID.
Error: Bootblock error.
Error: This BIOS version has more Non-Critical blocks than supported.
Error: BIOS checksum error.
Error: Invalid option
Error: Size of ROM file does not match the size of system ROM
Error: Unable to update ROM hole
Error: ROMHOLE not exist
Error: BIOS update cancelled by user.
Error: BIOS Report Error.
Error: Kernel source files cannot be found.
Error: Size of PLDM file is more than the FV size.
Error: Unable to load driver.
Error: Unable to unload driver.
Error: No non-critical blocks found in ROM file.
Error: Requested non-critical block not available in ROM file.
Error: Non-critical blocks in ROM image file do not match those in the system.
Error: Secure Flash function is not supported on this platform.
Error: Unable to get Secure Flash policy from BIOS.
Error: Unsupported Secure Flash policy.
Error: Secure Flash Rom Verify fail.
Error: Failed to erase flash chip (at Runtime Secure Flash).
Error: Failed to update flash chip (at Runtime Secure Flash).
Error: Failed to read flash chip (at Runtime Secure Flash).
Error: Failed to verify flash chip (at Runtime Secure Flash).
Error: Failed to load image into memory.
Error: Secure Flash function is not supported on this file.
Error: Reserved for Secure Flash.
Error: Unable to initialize memory manager.
Error: Unable to close memory manager.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 28 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x22
0x23
0x24
0x25
0x26
0x27
0x28
0x29
0x30
0x31
0x32
0x33
0x34
0x35
0x36
0x37
0x40
0x41
0x42
0x43
0x44
0x45
0x46
0x47
0x48
0x49
0x4A
0x4B
0x4C
0x50
0x60
0x61
0x70
0x71
0x80
0x81
0x82
0x90
0x91
0x92
0x93
0x94
0x95
0x96
0x97
0x98

Error: Problem allocating memory.
Error: Problem freeing memory.
Error: Problem allocating BIOS buffer.
Error: Problem freeing BIOS buffer.
Error: Problem freeing mapping BIOS.
Error: Problem freeing unmapping BIOS.
Error: Problem mapping BIOS data.
Error: Problem unmapping BIOS data.
Error: Problem opening file for reading.
Error: Problem reading file.
Error: Problem opening file to write.
Error: Problem writing file.
Error: Using the wrong AFU version, Please use Aptio 4 AFU.
Error: Using the wrong AFU version, Please use Aptio 5 AFU.
Error: Fail with problem of ESP Driver init.
Error: Fail with problem of copy ROM file to ESP driver.
Error: BIOS is write-protected.
Error: Can not close flash interface.
Error: Problem reading flash.
Error: Problem erasing flash.
Error: Problem writing flash.
Error: Problem verifying flash.
Error: Problem getting flash information.
Error: No firmware id.
Error: Power cord not connected. Plug in power cord to flash.
Error: A platform condition has prevented flashing.
Error: Platform data is not empty, And data address is not Alignment Block Address.
Error: SLP key is not empty at all.
Error: Rom file ROM layout is changed.
Error: This program must be run in MS-DOS mode.
Error: Accessing registry.
Error: Program already running.
Error: BSD access IO.
Error: Linux does not support Auto Build Driver when Secure Boot Enable.
Error: Size of system ROM mismatches size of ROM file
Error: ROM ID mismatch
Error: Bootblock checksum error
Error: Error to shutdown
Error: Error to restart...
Error: Can't open ROM ID file
Error: ROM ID file is not a ROM file.
Error: Invalid MAC address
Error: Invalid load current CMOS option
Error: Invalid retry count
Error: Invalid defined ROM ID length
Error: Invalid SMI

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 29 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x99
0x9A
0x9B
0x9C
0x9D
0x9E
0x9F
0xA0
0xA1
0xA2
0xA3
0xA4
0xA5
0xA6
0xA7
0xA8
0xA9
0xAA
0xAB
0xAC
0xAD
0xAE
0xAF
0xB0
0xB1
0xB2
0xB3
0xB4
0xB5
0xB6
0xB7
0xB8
0xB9
0xBA
0xBB
0xBC
0xBD
0xBE
0xBF
0xC0
0xC1
0xC2
0xC6
0xC7
0xD0
0xD1

Error: ROM File ID don't exist
Error: System ROM ID don't exist
Error: Password Retry count exceeded.
Error: BIOS don't support NVRAM/SETUP preserve function
Error: Store SETUP setting error
Error: Restore SETUP setting error
Error: Cannot analyze ROM file. ROM file may be corrupted
Error: Cannot analyze the ME Data. ROM file may be corrupted
Error: BIOS does not support ME Entire Firmware update
Error: BIOS does not support ME Ignition Firmware update
Error: Invalid EC ROM file
Error: EC ROM file checksum error
Error: Can't enter EC flash mode
Error: Erasing EC flash memory fail
Error: Initial EC programming fail
Error: EC flash data transmit error
Error: Writing EC flash memory fail
Error: Exit EC programming mode fail
Error: ROM Chip ID mismatch
Error: Invalid EC Header Table
Error: EC does not permit BIOS update
Error: BIOS doesn’t support OEMCMD function
Error: Store DMI Data error
Error: Restore DMI Data error
Error: Invalid Activation Key file.
Error: File Size is greater than image activation key length.
Error: Image activation key larger than BIOS activation key.
Error: Activation Key checksum error.
Error: No Support Activation Key error.
Error: OA key is available, and OA Key is not the same as BIN file in the system.
Error: OA key is empty.
Error: OA key region incorrect.
Error: BIOS doesn’t support Clear event log function.
Error: Clear event log error.
Error: Rom image layout detected RomHole is redesigned.
Error: BIOS have more than one RomHole’s GUID is the same.
Error: Requested Rom Hole not available in ROM file.
Error: RomHoles in ROM image file do not match those in the system.
Error: OA key is available, and OA Key is the same as BIN file in the system.
Error: BIOS doesn’t support process ME information
Error: BIOS return error, when trying to re-flash ME Firmware data.
Error: Region is write-protected
Error: No EC blocks found in system ROM.
Error: BIOS doesn’t support all ROM flashing function.
Error: OA key data is invalid.
Error: BIOS has already updated OA.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 30 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0xD2
0xD3
0xD4
0xD5

Error: BIOS does not allow updating OA.
Error: BIOS doesn’t support updating OA.
Error: The DMI data size of system is greater than File's DMI data length.
Error: BIOS doesn't support EC Battery Check function.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 31 of 32

American Megatrends, Inc.
Aptio AFU User Guide

FQA

The Error Message Information of ROM
AFU has added the check mechanism of ROM information. AFU would compare the information between
updated ROM and on board ROM. If these ROMs have different information, AFU will show the error of 0x4C.
AMI extremely suggest users to stop choosing “Continue to update” if users do not comprehend ROM structure
very much. The system will be crashed after BIOS update because of ROM information difference.

Windows requires a digitally signed driver

This issue is resolved by a security fix provided by MS. KB3033929 resolves this issue. The certificate used to sign
the driver is higher security and older versions of Win7 don’t support it.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 32 of 32



AMI AFU For Aptio 4.rar > readme.txt

AFU (AMI Firmware Update) is a package of utilities used
to update the system BIOS under various operating systems.

Note: AFU only works for APTIO with SMI FLASH support.
Compatible with Aptio 3, 4, and 4.5.

The package includes:

- AFUEFIx64 3.09.03.1462
- AFU User Guide

To run, extract all of the files from the folder with the name corresponding to the desired operating system.


Usage (applies to AFUWIN, AFUDOS, AFUEFI and AFUEFI64...
for usage of AFUBSD and AFULNX see help files provided in their folders):
------------------------------------------------------------------
AFUEFI & lt; BIOS ROM File Name & gt; [Option 1] [Option 2]
Or
AFUEFI & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AFUEFI & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O Save current ROM image to file
- /U Display ROM File's ROMID
- /S Refer to Options: /S
- /D Verification test of given ROM File without flashing BIOS.
- /OAD Refer to Options: /OAD
- /A Refer to Options: /A
- /CLNEVNLOG Refer to Options: /CLNEVNLOG
Options
The optional field used to supply more information for flashing BIOS ROM. Following lists the supported optional parameters and format:
- /DPC Don't Check Aptio 4 and Aptio 5 platform.
- /MEUL: Program ME Entire Firmware Block, which supports
Production.BIN and PreProduction.BIN files.
- /Q Silent execution
- /X Don't Check ROM ID
- /CAF Compare ROM file's data with Systems is different or
not, if not then cancel related update.
- /S Display current system's ROMID
- /JBC Don't Check AC adapter and battery
- /HOLEOUT: Save specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLEOUT:GUID
- /SP Preserve Setup setting.
- /Rn Preserve SMBIOS type N during programming(n=0-255)
- /R Preserve ALL SMBIOS structure during programming
- /B Program Boot Block
- /P Program Main BIOS
- /K Program all non-critical blocks.
- /N Program NVRAM
- /Kn Program n'th non-critical block(n=0-15).
- /HOLE: Update specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLE:GUID
- /L Program all ROM Holes.
- /Ln Program n'th ROM Hole only(n=0-15).
- /E Program Embedded Controller Block.
- /OAD Delete Oem Activation key
- /A Oem Activation file
- /E Program Embedded Controller Block
- /ECUF Update EC BIOS when newer version is detected.
- /ME Program ME Entire Firmware Block.
- /MEUF Program ME Ignition Firmware Block.
- /CLNEVNLOG Clear Event Log.
- /CAPSULE Override Secure Flash policy to Capsule
- /RECOVERY Override Secure Flash policy to Recovery
- /EC Program Embedded Controller Block. (Flash Type)
- /CMD: Send special command to BIOS. /CMD:{xxx, xxx, xxx}
- /OEMCMD: Send special value to BIOS. /OEMCMD:xxx
- /REBOOT Reboot after programming.
- /SHUTDOWN Shutdown after programming.
- /FDR Flash Flash-Descriptor Region.(*1)
- /GBER Flash GBE Region.(*1)
- /MER Flash Entire ME Region.(*1)
- /OPR Flash Operation Region of SPS.(*1)
- /PDR Flash PDR Region.(*1)

(*1)If BIOS ME Module have report, AFU will be show this command.

Rules
- Any parameter encolsed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options].
- Main BIOS image is default flashing area if no any option present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.


AMI AFU For Aptio 4.rar > AMI_Aptio_AFU_User_Guide_NDA.pdf

AMI Software Utility User Guide

Aptio AFU User Guide
Document Revision 1.11
Apr 28, 2017
Confidential, NDA Required
Copyright © 2017
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All Rights Reserved
Property of American Megatrends, Inc.

American Megatrends, Inc.
Aptio AFU User Guide

Legal
Disclaimer
This publication contains proprietary information which is protected by copyright. No part of this publication
may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language,
or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends,
Inc. American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without
notice.
For Additional Information
Call American Megatrends, Inc. at 1-800-828-9264 for additional information.
Limitations of Liability
In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever,
whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the
support materials provided with the product.
Limited Warranty
No warranties are made, either expressed or implied, with regard to the contents of this work, its
merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and
omissions or for the uses made of the material contained herein or reader decisions based on such use.
Trademark and Copyright Acknowledgments
Copyright © 2017 American Megatrends, Inc. All Rights Reserved.
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All product names used in this publication are for identification purposes only and are trademarks of their
respective companies.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 2 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Table of Contents
Aptio AFU User Guide ................................................................................................................................................ 1
Legal .......................................................................................................................................................................... 2
Table of Contents ....................................................................................................................................................... 3
Document Information .............................................................................................................................................. 5
Purpose .......................................................................................................................................................................... 5
Audience ........................................................................................................................................................................ 5
Change History ............................................................................................................................................................... 5
Introduction ............................................................................................................................................................... 6
Overview ........................................................................................................................................................................ 6
AFU APTIO Features ....................................................................................................................................................... 6
Requirements ................................................................................................................................................................. 6
Supported Operating System ..................................................................................................................................... 6
Firmware Requirements ............................................................................................................................................. 7
Getting Started .......................................................................................................................................................... 8
Installation ..................................................................................................................................................................... 8
AFUAPTIO Operation ................................................................................................................................................. 9
Overview ........................................................................................................................................................................ 9
Commands and Options............................................................................................................................................... 10
Usage ....................................................................................................................................................................... 10
Commands ............................................................................................................................................................... 10
Options ..................................................................................................................................................................... 11
Rules ......................................................................................................................................................................... 12
Usage ....................................................................................................................................................................... 13
Overview ...................................................................................................................................................................... 13
AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] … ................................................................................ 13
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt; ................................................................................................. 15
AfuEfix64 & lt; Command & gt; ................................................................................................................................................ 15
AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt; ............................................................... 16
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt; .............................................................................................. 16
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt; ..................................................................................... 17
Remarks ................................................................................................................................................................... 18
Overview ...................................................................................................................................................................... 18
Preserving Setup Setting – /SP ..................................................................................................................................... 18
Preserving SMBIOS – /R and /Rn ................................................................................................................................. 19
Programming NVRAM Region – /N .............................................................................................................................. 19

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 3 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Programming Specific NCB Block – /Kn ....................................................................................................................... 19
Programming Specific ROM Hole – /Ln ........................................................................................................................ 19
Secured Flash Update – /CAPSULE and /RECOVERY .................................................................................................... 20
Send special command to BIOS – /CMD:{xxx}.............................................................................................................. 21
Linux Pre-Requisites ................................................................................................................................................. 22
Signing Driver and Enrolling Public Key to the System ............................................................................................. 24
Support Table .......................................................................................................................................................... 26
Command/Option Support in Each Mode ................................................................................................................... 26
Error Codes .............................................................................................................................................................. 28
Error Code Definition ................................................................................................................................................... 28
FQA .......................................................................................................................................................................... 32
The Error Message Information of ROM ...................................................................................................................... 32
Windows requires a digitally signed driver .................................................................................................................. 32

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 4 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Document Information

Purpose
This document provides information to use the Aptio AFU for updating system BIOS.

Audience
Generic BIOS Engineers, OEM Engineers, and Aptio Customers.

Change History
Date

Revision

2013-11-19
2014-03-20
2014-04-24

1.00
1.01
1.02

2014-08-22

1.03

2014-11-11
2015-01-30
2015-06-22
2015-11-18

1.04
1.05
1.06
1.07

2016-02-02

1.08

2016-03-25

1.09

2016-10-18

1.10

2017-04-28

1.11

Description
Initial document created and update content to latest released of Afu
Modified 0x18、0xB6、0xB7、0xBF、0xD0 error message text.
Added error message 0x34、0x35.
Added new commands for /meul and /JBC.
Need to be updated the SmiFlash module to 5.001_SmiFlash_13.
Added Windows 2012 R2 in the support list.
Added new’s command /cmd:.
Removed Microsoft®DOS support.
Added Linux Xen note.
Added 0x4A、0x4B error message text.
Added DOS does not support note.
Added an announcement: Linux does not support Secure Boot
Added support Linux Secure Boot.
Added /CLRCFG, /BCPALL, /DPC command.
Added 0x36, 0x37, 0x4C, 0x71 error messages.
Added 0x4C, ROMLayout change error messages.
Added answer for Windows digitally signed driver.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 5 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Introduction

Overview

A

FU (AMI Firmware Update) is a package of utilities used to update the system BIOS under various operating
systems. AFU only works for APTIO with SMI FLASH support.

AFU APTIO Features
This list of features is supported by command line, command prompt, EFI Shell, or BSD/Linux shell.


Read system ROM image



Flash ROM image



Command line operating

Requirements
Supported Operating System
AFU is supported by the following operating systems:
















Microsoft® Windows® 2000
Microsoft® Windows® XP
Microsoft® Windows® 2003
Microsoft® Windows® Server 2008 R2
Microsoft® Windows® Server 2012 R2
Microsoft® Windows® Vista
Microsoft® Windows® 7
Microsoft® Windows® 8
Microsoft® Windows® 8.1
Microsoft® Windows® 10
Microsoft® Windows® PE
EFI Shell Environment
BSD
Linux(*1)
MS-DOS(*2)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 6 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Note:
*1. On Linux Xen environment, AFULNX must be executed in host desktop (Domain 0) of the virtual machine.
*2. DOS version is stopped supporting in AFU 3.08 or later version.

Firmware Requirements


Compatible with Aptio 3, 4, and 4.5.



Requires that the current installed firmware has SMI flashing support enabled.



For supporting Secure Flash, the following eModules are required:
- Secure Flash Pkg (4.6.5.1_SECMOD_003 or later)
- CryptoPkg (4.6.5_CRYPTOAPI_0003 or later)
- Capsule (4.5.6_Capsule_00 or later)
- SMIFlash (4.6.3.6_SMIFLASH_23 or later)
- OFBD (4.6.3.2_OFBD_1.0.2 or later)
- OFBD Secure Flash (4.6.5.0_OFBD_SECURE_FLASH_0.0.5 or later)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 7 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Getting Started

Installation
To run, extract all of the files from the folder with the name corresponding to the desired operating
system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 8 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AFUAPTIO Operation

Overview
This mostly involves documenting all the SDL tokens and eLinks. This chapter explains the operation
of AFUAPTIO.
The AFUAPTIO operation mode includes all of the AFUAPTIO features such as saving current ROM
image to file, getting and displaying ROM ID from BIOS ROM file.
An example of AFUEFIX64 that getting and displaying ROM ID from BIOS ROM file command screen
are shown below:

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 9 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Commands and Options
The following list is to offer you an overview of the commands and options provided by AFUAPTIO.
The content can also be found in AFUAPTIO’s help information. A more detailed usage of the
commands and options will be explained in the next chapter.

Usage
AfuEfix64 & lt; BIOS ROM File Name & gt; [Option 1] [Option 2] …
Or
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AfuEfix64 & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O

Save current ROM image to file

- /U

Get and display ROM ID from BIOS ROM file

- /S

Refer to Option: /S

- /D

Verification test of given ROM File without flashing BIOS.

- /A

Refer to Option: /A

- /OAD

Refer to Option: /OAD

- /CLNEVNLOG Refer to Option: /CLNEVNLOG

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 10 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Options
The optional field is used to supply more information for flashing BIOS ROM. Following lists the
supported optional parameters and format:

- /CLRCFG

Program without preserving setup configuration

-/BCPALL

Save all question values before flash

-/DPC

Don't Check Aptio 4 and Aptio 5 platform.

- /MEUL:

Program ME Entire Firmware Block, which supports Production.BIN and
PreProduction.BIN files.

- /Q

Silent execution

- /X

Do not check ROM ID

- /CAF

Compare ROM file's data with Systems is different or not, if not then cancel
related update.

- /S

Display current system's ROMID

-/JBC

Don't Check AC adapter and battery.

- /HOLEOUT:

Save specific ROM Hole according to given RomHole GUID.

- /SP

Preserve Setup setting.

- /R

Preserve all SMBIOS structures during programming.

- /Rn

Preserve SMBIOS type N during programming.(n=0-255)

- /B

Program Boot Block

- /P

Program main bios image

- /N

Program NVRAM

- /K

Program all non-critical blocks

- /Kn

Program n'th non-critical block (n=0-15)

- /HOLE:

Update specific ROM Hole according to RomHole GUID.

- /L

Program all ROM Holes

- /Ln

Program n'th ROM Hole only (n=0-15)

- /ECUF

Update EC BIOS when newer version is detected.

- /E

Program Embedded Controller block

- /ME

Program ME Entire Firmware Block.

- /MEUF

Program ME Ignition Firmware Block.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 11 of 32

American Megatrends, Inc.
Aptio AFU User Guide

- /A

OEM Activation file.

- /OAD

Delete OEM Activation Key

- /CLNEVNLOG

Clear Event Log.

- /CAPSULE

Override Secure Flash policy by Capsule

- /RECOVERY

Override Secure Flash policy by Recovery

- /EC

Program Embedded Controller Block. (Flash Type)

-/CMD:

Send special command to BIOS. /CMD:{xxx}

- /REBOOT

Reboot after programming.

- /SHUTDOWN

Shutdown after programming.

- /FDR

Flash Flash-Descriptor Region.(*1)

- /GBER

Flash GBE Region.(*1)

- /MER

Flash Entire ME Region.(*1)

- /OPR

Flash Operation Region of SPS.(*1)

- /PDR

Flash PDR Region.(*1)

Note:
*1: If BIOS ME Module reports these commands, AFU will show this command.
To use a command of generic AFU on the Specific platform, please refer the help menu (/?) in generic AFU.

Rules
- Any parameter enclosed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options]. They are /O, /U, /D.
- Main BIOS image is default flashing area if no any options present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 12 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Usage

Overview
The AFUAPTIO offers the following basic command and option usages:




AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AfuEfix64 & lt; Command & gt;

Other usages which are not mentioned in help are:




AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt;
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;

These usages are explained in more detail in this chapter.

AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
The user could put no option or combine multiple options in one command line. Commands cannot
be combined in command line like options unless the command is categorized as both a command
and an option, such as /S and /A.

For option combination case, AFUAPTIO will check its option priority list and execute the options
according to the priority order. Three examples of this usage are provided below.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 13 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; BIOS ROM File Name & gt;

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line would trigger AFUAPTIO to run the default setting which
flashes the system Main Block with the specified BIOS ROM File.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /D /S

Where Output BIOS ROM File Name, the mandatory field is used to specify path/filename of the
BIOS ROM file with extension. /D is to verify the current BIOS and the BIOS ROM File, and /S, which
is categorized as a command and also an option, gets and displays the current system’s ROM ID.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /P /B /N /REBOOT

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line is to flashing current BIOS by BIOS ROM file. /P /B /N are to
specify that the flashing regions are Main Block, Boot Block and NVRAM. /REBOOT is to specify that
reboot action will be performed in this execution. AFUAPTIO would execute the options in the order
of /B, /P, /N and then reboot the system at the end. The order of execution is determined by
AFUAPTIO design.

AfuEfix64 & lt; ME File Name & gt; /ME

Where ME File Name is used to specifying path/filename of the ME file with extension. This
command line programs entire ME block with the specified ME file.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 14 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AFUAPTIO can only execute one command at a time and it does not accept combinations of
command and option in one command line except those can be both command and option. Three
examples of this usage are provided below.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /O

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line saves the current ROM image to a file.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /U

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
This command line gets and displays the ROM ID from the specified BIOS ROM file.

AfuEfix64 & lt; Command & gt;
This command usage is for some commands which do not require inputting any file to complete the
execution. Usually this type of commands accesses the current BIOS only. An example of this usage
is provided:

AfuEfix64 /S

This command line gets and displays the ROM ID of the current BIOS in system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 15 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM
Hole GUID & gt;
This command usage is for outputting or flashing a certain ROM hole. For example, the command
line for outputting a certain ROM hole whose GUID is 01234567- 89ab- cdef- 0123- 456789abcdef is
as following:

AfuEfix64 & lt; Output ROM Hole File Name & gt; /HOLEOUT:0123456789abcdef0123456789abcdef

Where Output ROM Hole File Name is used to specify path/filename of the output ROM hole file
with extension. The GUID after the option should not contain dashes or spaces in between.

Another example of flashing a certain ROM Hole whose GUID is 01234567- 89ab- cdef- 0123456789abcdef is as following:

AfuEfix64 & lt; ROM Hole File Name & gt; /HOLE:0123456789abcdef0123456789abcdef

Where ROM Hole File Name is used to specify path/filename of the ROM hole file with extension.
Please discard dashes and spaces inside GUID line while typing.

AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
This command usage is for /Kn and /Ln commands where n is indicating the numeric order of a
th

certain non-critical block or ROM hole. For example, to program the 4 ROM hole, the command
line could be:

AfuEfix64 & lt; BIOS ROM File Name & gt; /L4

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 16 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension,
th

and 4 is to specify that the 4 ROM hole is the one to perform /L operation.

The next chapter has more detail of the numbering rule of non-critical blocks and ROM holes.

AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;
This command usage is for /A command which insert a specific OEM activation key into the empty
key inside current system BIOS. The command line is as follows:

AfuEfix64 /A & lt; OEM Activation Key Bin File Name & gt;

Where OEM Activation Key Bin File Name is used to specify path/filename of the OEM activation
key file with extension. Please make sure that the OEM Activation Key region is empty before
inserting the key, or please perform /OAD command before insertion.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 17 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Remarks

Overview
This chapter is to describe commands/options which require extra attention and to explain cases
which may occur in certain unique scenarios.

Preserving Setup Setting – /SP
/SP command is designed specifically for “OEM NVRAM/Setup Variable Preserve” module part of
OFBD. If /SP is called, AFUAPTIO would send SMI 0x26 twice to save setup setting before starting
updating NVRAM and to restore setup setting after finishing updating NVRAM. Customer can
customize their OFBD module to preserve certain NVRAM data when AFUAPTIO flashes the NVRAM
area. For example, there are two methods for preserving Setup Password:

Method 1
Enable PRESERVE_PASSWORDS token – The BIOS will preserve its Setup password when AFUAPTIO
calls the SMIFlash module.

Method 2
Control through /SP command – Customer can port PreserveSetupPassword in
OFBDSETUPStoreHandle and RestoreSetupPassword in OFBDSETUPRestoreHandle, and use /SP
command to keep or not to keep the Setup Password while updating the NVRAM:

AfuEfix64 xxx.ROM /N /SP - keep Setup password
AfuEfix64 xxx.ROM /N

- don’t keep Setup password.

This feature needs BIOS’ cooperation. To learn more about preserving setup data, please consult
with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 18 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Preserving SMBIOS – /R and /Rn
If the SMBIOS data is stored in Main Block or Boot Block, AFUAPTIO /R and /Rn options would take
the responsibility to preserve the SMBIOS data. If the SMBIOS data is stored in NVRAM and BIOS
project’s token SMBIOS_PRESERVE_NVRAM=0, the preservation process would take place at OFBD
module. To know more about the detail of preserved data, please consult with your BIOS provider.

/R is used to preserve the whole SMBIOS data. To preserve a certain type of SMBIOS, please use /Rn.
For example, to preserve SMBIOS Type 2 and Type 41 during BIOS flashing and the SMBIOS data is
located in Boot Block, the command could be:
AfuEfix64 & lt; BIOS ROM File Name & gt; /B /R2 /R41

Programming NVRAM Region – /N
Erasing NVRAM may cause important variables lose.

Programming Specific NCB Block – /Kn
/Kn command is designed to program a specific non-critical block, or NCB block. AFUAPTIO would
search ROM and identify the first NCB Block found as K0, and the second one as K1, etc. Therefore,
command /K2 would program the third NCB Block found by AFU.

Programming Specific ROM Hole – /Ln
/Ln command is designed to program a specific ROM Hole. Each ROM Hole is identified in the
following way: AFUAPTIO would search for ROM Holes in the order of Boot Block area and Main
Block area, and identify each ROM Hole in consecutive integers from 0 to 15. So, for example, /L1 is
used to program the second ROM Hole found in ROM.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 19 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Scenarios:
If a ROM contains two ROM Holes in Boot Block area and two in Main Block area,
AFUAPTIO would identify L0 and L1 for the two in Boot Block area and L2 and L3 for the two in Main
Block area.

If a ROM contains 2 ROM Holes in Boot Block area and none in Main Block area, AFUAPTIO
would only find 2 ROM Holes in total and identify them as L0 and L1.

If a ROM contains no ROM Holes in Boot Block area and three in Main Block area,
AFUAPTIO would find nothing in Boot Block area and identify L0, L1 and L2 for the three ROM Holes
in Main Block area.

Secured Flash Update – /CAPSULE and /RECOVERY
For Secured BIOS, the command rule for programming the current BIOS is different. There are two
more modes, Capsule Mode and Recovery Mode, which are different from the regular Runtime
Mode mentioned in the previous contents. Unlike Runtime Mode where all the commands/options
are supported, Capsule Mode and Recovery Mode only support /P, /B, /N, and /E options, or
depending on the BIOS design. The following description explains how to program BIOS under these
two modes.

To override Secure Flash policy and program the BIOS image in Capsule Mode, please use the
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /CAPSULE /P /B /N /E

And to override Secure Flash policy and program the BIOS image in Recovery Mode, please use this
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /RECOVERY /P /B /N /E

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
For more detail on Secure Flash, please consult with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 20 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Send special command to BIOS – /CMD:{xxx}
Send the string between brackets to OFBD OEM CMD Checking Module. The string is
corresponding to the string which is defined in BIOS by user.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 21 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Linux Pre-Requisites

1. Log in Linux as root otherwise use sudo (if permitted).
2. The compiler suite (gcc) must be installed. If these packages are not installed, the driver CANNOT
be built.
3. For most of the distributions, AFU will generate driver without any notification, if it doesn’t exist
you need to install kernel sources. Also if Initmem fails, Please follow point 4.
4. Kernel sources must be installed, *CONFIGURED*, and then compiled. Following are steps to do
this:
a. Find Running Kernel's Configuration File:
To configure the sources, simply change to the kernel source directory (typically
/lib/modules/$(uname -r)/build). If it doesn't exist, you need to install kernel source.
Typically, the reference configuration for the kernel can be found in the /boot directory with
filename '.config', 'kernel.config', or 'vmlinux-2.4.18-3.config'. Type 'uname -a' and use the
configuration filename that best matches the output from 'uname -a'. Also, check for
/dev/mem directory existence. If it doesn’t exist, you need to install kernel sources.
Normally it comes with the installation unless if the option is deselected.
On some distributions Red Hat for instance, there is a config directory under
/lib/modules/$(uname -r)/build.
Copy this configuration file into the root of the Linux kernel source tree (usually it is
/lib/modules/$(uname -r)/build). This file must be renamed to " .config " (dot config).
b. Make Your AMI Flash Driver (amifldrv_mod.o):
For most distribution, the command to build the driver is:
afulnx_32 /MAKEDRV
Or
afulnx_64 /MAKEDRV

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 22 of 32

American Megatrends, Inc.
Aptio AFU User Guide

If your Linux's kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
afulnx_32 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
Or
afulnx_64 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default path is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
c. Make Your AMI Flash Driver from driver source files (amifldrv_mod.o):
Using command /GENDRV, it will generate driver source files to specific directory.
afulnx_32 /GENDRV [Option 1] [Option 2]
Or
afulnx_64 /GENDRV [Option 1] [Option 2]
Where,
[Option 1]: Specific kernel source 'KERNEL=XXXX' same as the /MAKEDRV
[Option 2]: Specific output directory 'OUTPUT=XXXX'
Generate files as outlined below:
File Name Description
--------------------------------------------------------------------------amiwrap.c Driver source code.
amiwrap.h Driver header.
amifldrv.o_shipped Object file for driver.
Makefile Makefile
--------------------------------------------------------------------------For most distribution, the command to build the driver is: make.
If your Linux’s kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
make KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
d. Check Your Build:
Check the version of running Linux kernel with 'uname -r'.
Check the version of amifldrv_mod.o with 'modinfo amifdrv_mod.o'.
If they mismatch, you will need to select the correct configuration
File (.config), rebuild your kernel, and then rebuild your driver as described in steps a, b, c
and d.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 23 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Signing Driver and Enrolling Public Key to the System

The following prerequisites are needed on the build system to sign the driver:
1. Login to Linux OS as root otherwise use sudo.
2. The compiler suite (gcc) must be installed. If it’s not installed, the AFU driver cannot be built.
3. OpenSSL: Needed to generate cryptographic keys. OpenSSL tool can be downloaded from
https://www.openssl.org
4. Perl interpreter: Needed to run the signing script. Perl tool can be downloaded from
https://www.perl.org

Follow the below steps to sign the driver:
1. Boot to Linux OS.
2. Generate a Public and Private key pair using below openssl command: & gt; openssl req -x509 new -nodes -utf8 -sha256 -days 36500 -batch -configconfiguration_file.config -outform DER -out
public_key.der -keyout private_key.priv
Note: The configuration file configuration_file.config must be created with the required
information before running the command. A sample configuration file is shown below. The
values in & lt; & gt; must be filled with actual values.
configuration_file.config:
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = myexts
[ req_distinguished_name ]
O = & lt; organization_name & gt;
CN = & lt; organization_name & gt; Signing Key
emailAddress = & lt; email_address & gt;
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 24 of 32

American Megatrends, Inc.
Aptio AFU User Guide

3. Build AFU driver using below command. The driver will be generated in the current directory
with name amifldrv_mod.o.
& gt; afulnx_64 /MAKEDRV
4. Execute below command to sign driver with the key generated in step 2.
& gt; perl /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 private_key.priv
public_key.der amifldrv_mod.o
5. Request addition of public key to MOK list using mokutil. The command will prompt a
password which will be needed during public key enrollment in next step.
& gt; mokutil --import public_key.der
6. Reboot the system which will launch MOK manager application to complete public key
enrollment.
7. Once the public key enrollment is done, Boot to OS and execute below command to ensure
the newly added key is available in system key ring.
& gt; keyctl list %:.system_keyring
8. Install signed driver using insmod command.
& gt; insmod amifldrv_mod.o
9. Ensure it is loaded successfully using lsmod command.
Reference: https://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modulesfor-secure-boot.html

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 25 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Support Table

Command/Option Support in Each Mode
Command
/O
/U
/S
/D
/A
/OAD
/CLNEVNLOG

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Option
/MEUL
/Q
/X
/CAF
/S
/JBC
/SP
/R
/Rn
/B
/P
/N
/K
/Kn
/HOLE:
/HOLEOUT:
/L
/Ln
/ECUF
/E
/ME
/MEUF
/A
/OAD

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported ( *1 )
Supported ( *1 )
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 26 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Option
/CLNEVNLOG
/EC
/REBOOT
/SHUTDOWN

Runtime Mode
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported

Note:
* 1: This option must use with either /P or /B in order to be supported under Capsule Mode.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 27 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Error Codes

Error Code Definition
CODE
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0X0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
0x17
0x18
0x19
0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0x20
0x21

Definition
Error: Unknown command.
Error: BIOS has no flash information available.
Error: ROM file size does not match existing BIOS size.
Error: ROM file ROMID is not compatible with existing BIOS ROMID.
Error: Bootblock error.
Error: This BIOS version has more Non-Critical blocks than supported.
Error: BIOS checksum error.
Error: Invalid option
Error: Size of ROM file does not match the size of system ROM
Error: Unable to update ROM hole
Error: ROMHOLE not exist
Error: BIOS update cancelled by user.
Error: BIOS Report Error.
Error: Kernel source files cannot be found.
Error: Size of PLDM file is more than the FV size.
Error: Unable to load driver.
Error: Unable to unload driver.
Error: No non-critical blocks found in ROM file.
Error: Requested non-critical block not available in ROM file.
Error: Non-critical blocks in ROM image file do not match those in the system.
Error: Secure Flash function is not supported on this platform.
Error: Unable to get Secure Flash policy from BIOS.
Error: Unsupported Secure Flash policy.
Error: Secure Flash Rom Verify fail.
Error: Failed to erase flash chip (at Runtime Secure Flash).
Error: Failed to update flash chip (at Runtime Secure Flash).
Error: Failed to read flash chip (at Runtime Secure Flash).
Error: Failed to verify flash chip (at Runtime Secure Flash).
Error: Failed to load image into memory.
Error: Secure Flash function is not supported on this file.
Error: Reserved for Secure Flash.
Error: Unable to initialize memory manager.
Error: Unable to close memory manager.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 28 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x22
0x23
0x24
0x25
0x26
0x27
0x28
0x29
0x30
0x31
0x32
0x33
0x34
0x35
0x36
0x37
0x40
0x41
0x42
0x43
0x44
0x45
0x46
0x47
0x48
0x49
0x4A
0x4B
0x4C
0x50
0x60
0x61
0x70
0x71
0x80
0x81
0x82
0x90
0x91
0x92
0x93
0x94
0x95
0x96
0x97
0x98

Error: Problem allocating memory.
Error: Problem freeing memory.
Error: Problem allocating BIOS buffer.
Error: Problem freeing BIOS buffer.
Error: Problem freeing mapping BIOS.
Error: Problem freeing unmapping BIOS.
Error: Problem mapping BIOS data.
Error: Problem unmapping BIOS data.
Error: Problem opening file for reading.
Error: Problem reading file.
Error: Problem opening file to write.
Error: Problem writing file.
Error: Using the wrong AFU version, Please use Aptio 4 AFU.
Error: Using the wrong AFU version, Please use Aptio 5 AFU.
Error: Fail with problem of ESP Driver init.
Error: Fail with problem of copy ROM file to ESP driver.
Error: BIOS is write-protected.
Error: Can not close flash interface.
Error: Problem reading flash.
Error: Problem erasing flash.
Error: Problem writing flash.
Error: Problem verifying flash.
Error: Problem getting flash information.
Error: No firmware id.
Error: Power cord not connected. Plug in power cord to flash.
Error: A platform condition has prevented flashing.
Error: Platform data is not empty, And data address is not Alignment Block Address.
Error: SLP key is not empty at all.
Error: Rom file ROM layout is changed.
Error: This program must be run in MS-DOS mode.
Error: Accessing registry.
Error: Program already running.
Error: BSD access IO.
Error: Linux does not support Auto Build Driver when Secure Boot Enable.
Error: Size of system ROM mismatches size of ROM file
Error: ROM ID mismatch
Error: Bootblock checksum error
Error: Error to shutdown
Error: Error to restart...
Error: Can't open ROM ID file
Error: ROM ID file is not a ROM file.
Error: Invalid MAC address
Error: Invalid load current CMOS option
Error: Invalid retry count
Error: Invalid defined ROM ID length
Error: Invalid SMI

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 29 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x99
0x9A
0x9B
0x9C
0x9D
0x9E
0x9F
0xA0
0xA1
0xA2
0xA3
0xA4
0xA5
0xA6
0xA7
0xA8
0xA9
0xAA
0xAB
0xAC
0xAD
0xAE
0xAF
0xB0
0xB1
0xB2
0xB3
0xB4
0xB5
0xB6
0xB7
0xB8
0xB9
0xBA
0xBB
0xBC
0xBD
0xBE
0xBF
0xC0
0xC1
0xC2
0xC6
0xC7
0xD0
0xD1

Error: ROM File ID don't exist
Error: System ROM ID don't exist
Error: Password Retry count exceeded.
Error: BIOS don't support NVRAM/SETUP preserve function
Error: Store SETUP setting error
Error: Restore SETUP setting error
Error: Cannot analyze ROM file. ROM file may be corrupted
Error: Cannot analyze the ME Data. ROM file may be corrupted
Error: BIOS does not support ME Entire Firmware update
Error: BIOS does not support ME Ignition Firmware update
Error: Invalid EC ROM file
Error: EC ROM file checksum error
Error: Can't enter EC flash mode
Error: Erasing EC flash memory fail
Error: Initial EC programming fail
Error: EC flash data transmit error
Error: Writing EC flash memory fail
Error: Exit EC programming mode fail
Error: ROM Chip ID mismatch
Error: Invalid EC Header Table
Error: EC does not permit BIOS update
Error: BIOS doesn’t support OEMCMD function
Error: Store DMI Data error
Error: Restore DMI Data error
Error: Invalid Activation Key file.
Error: File Size is greater than image activation key length.
Error: Image activation key larger than BIOS activation key.
Error: Activation Key checksum error.
Error: No Support Activation Key error.
Error: OA key is available, and OA Key is not the same as BIN file in the system.
Error: OA key is empty.
Error: OA key region incorrect.
Error: BIOS doesn’t support Clear event log function.
Error: Clear event log error.
Error: Rom image layout detected RomHole is redesigned.
Error: BIOS have more than one RomHole’s GUID is the same.
Error: Requested Rom Hole not available in ROM file.
Error: RomHoles in ROM image file do not match those in the system.
Error: OA key is available, and OA Key is the same as BIN file in the system.
Error: BIOS doesn’t support process ME information
Error: BIOS return error, when trying to re-flash ME Firmware data.
Error: Region is write-protected
Error: No EC blocks found in system ROM.
Error: BIOS doesn’t support all ROM flashing function.
Error: OA key data is invalid.
Error: BIOS has already updated OA.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 30 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0xD2
0xD3
0xD4
0xD5

Error: BIOS does not allow updating OA.
Error: BIOS doesn’t support updating OA.
Error: The DMI data size of system is greater than File's DMI data length.
Error: BIOS doesn't support EC Battery Check function.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 31 of 32

American Megatrends, Inc.
Aptio AFU User Guide

FQA

The Error Message Information of ROM
AFU has added the check mechanism of ROM information. AFU would compare the information between
updated ROM and on board ROM. If these ROMs have different information, AFU will show the error of 0x4C.
AMI extremely suggest users to stop choosing “Continue to update” if users do not comprehend ROM structure
very much. The system will be crashed after BIOS update because of ROM information difference.

Windows requires a digitally signed driver

This issue is resolved by a security fix provided by MS. KB3033929 resolves this issue. The certificate used to sign
the driver is higher security and older versions of Win7 don’t support it.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 32 of 32


AMI AFU For Aptio 4.rar > readme.txt

AFU (AMI Firmware Update) is a package of utilities used
to update the system BIOS under various operating systems.

Note: AFU only works for APTIO with SMI FLASH support.
Compatible with Aptio 3, 4, and 4.5.

The package includes:

- AFUEFI 3.09.02.1396
- AFU User Guide

To run, extract all of the files from the folder with the name corresponding to the desired operating system.


Usage (applies to AFUWIN, AFUDOS, AFUEFI and AFUEFI64...
for usage of AFUBSD and AFULNX see help files provided in their folders):
------------------------------------------------------------------
AFUDOS & lt; BIOS ROM File Name & gt; [Option 1] [Option 2]
Or
AFUDOS & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AFUDOS & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O Save current ROM image to file
- /U Display ROM File's ROMID
- /S Refer to Options: /S
- /D Verification test of given ROM File without flashing BIOS.
- /OAD Refer to Options: /OAD
- /A Refer to Options: /A
- /CLNEVNLOG Refer to Options: /CLNEVNLOG
Options
The optional field used to supply more information for flashing BIOS ROM. Following lists the supported optional parameters and format:
- /DPC Don't Check Aptio 4 and Aptio 5 platform.
- /MEUL: Program ME Entire Firmware Block, which supports
Production.BIN and PreProduction.BIN files.
- /Q Silent execution
- /X Don't Check ROM ID
- /CAF Compare ROM file's data with Systems is different or
not, if not then cancel related update.
- /S Display current system's ROMID
- /JBC Don't Check AC adapter and battery
- /HOLEOUT: Save specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLEOUT:GUID
- /SP Preserve Setup setting.
- /Rn Preserve SMBIOS type N during programming(n=0-255)
- /R Preserve ALL SMBIOS structure during programming
- /B Program Boot Block
- /P Program Main BIOS
- /K Program all non-critical blocks.
- /N Program NVRAM
- /Kn Program n'th non-critical block(n=0-15).
- /HOLE: Update specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLE:GUID
- /L Program all ROM Holes.
- /Ln Program n'th ROM Hole only(n=0-15).
- /E Program Embedded Controller Block.
- /OAD Delete Oem Activation key
- /A Oem Activation file
- /E Program Embedded Controller Block
- /ECUF Update EC BIOS when newer version is detected.
- /ME Program ME Entire Firmware Block.
- /MEUF Program ME Ignition Firmware Block.
- /CLNEVNLOG Clear Event Log.
- /CAPSULE Override Secure Flash policy to Capsule
- /RECOVERY Override Secure Flash policy to Recovery
- /EC Program Embedded Controller Block. (Flash Type)
- /CMD: Send special command to BIOS. /CMD:{xxx, xxx, xxx}
- /REBOOT Reboot after programming.
- /SHUTDOWN Shutdown after programming.
- /FDR Flash Flash-Descriptor Region.(*1)
- /GBER Flash GBE Region.(*1)
- /MER Flash Entire ME Region.(*1)
- /OPR Flash Operation Region of SPS.(*1)
- /PDR Flash PDR Region.(*1)

(*1)If BIOS ME Module have report, AFU will be show this command.

Rules
- Any parameter encolsed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options].
- Main BIOS image is default flashing area if no any option present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.



AMI AFU For Aptio 4.rar > AMI_Aptio_AFU_User_Guide_NDA.pdf

AMI Software Utility User Guide

Aptio AFU User Guide
Document Revision 1.11
Apr 28, 2017
Confidential, NDA Required
Copyright © 2017
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All Rights Reserved
Property of American Megatrends, Inc.

American Megatrends, Inc.
Aptio AFU User Guide

Legal
Disclaimer
This publication contains proprietary information which is protected by copyright. No part of this publication
may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language,
or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends,
Inc. American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without
notice.
For Additional Information
Call American Megatrends, Inc. at 1-800-828-9264 for additional information.
Limitations of Liability
In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever,
whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the
support materials provided with the product.
Limited Warranty
No warranties are made, either expressed or implied, with regard to the contents of this work, its
merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and
omissions or for the uses made of the material contained herein or reader decisions based on such use.
Trademark and Copyright Acknowledgments
Copyright © 2017 American Megatrends, Inc. All Rights Reserved.
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All product names used in this publication are for identification purposes only and are trademarks of their
respective companies.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 2 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Table of Contents
Aptio AFU User Guide ................................................................................................................................................ 1
Legal .......................................................................................................................................................................... 2
Table of Contents ....................................................................................................................................................... 3
Document Information .............................................................................................................................................. 5
Purpose .......................................................................................................................................................................... 5
Audience ........................................................................................................................................................................ 5
Change History ............................................................................................................................................................... 5
Introduction ............................................................................................................................................................... 6
Overview ........................................................................................................................................................................ 6
AFU APTIO Features ....................................................................................................................................................... 6
Requirements ................................................................................................................................................................. 6
Supported Operating System ..................................................................................................................................... 6
Firmware Requirements ............................................................................................................................................. 7
Getting Started .......................................................................................................................................................... 8
Installation ..................................................................................................................................................................... 8
AFUAPTIO Operation ................................................................................................................................................. 9
Overview ........................................................................................................................................................................ 9
Commands and Options............................................................................................................................................... 10
Usage ....................................................................................................................................................................... 10
Commands ............................................................................................................................................................... 10
Options ..................................................................................................................................................................... 11
Rules ......................................................................................................................................................................... 12
Usage ....................................................................................................................................................................... 13
Overview ...................................................................................................................................................................... 13
AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] … ................................................................................ 13
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt; ................................................................................................. 15
AfuEfix64 & lt; Command & gt; ................................................................................................................................................ 15
AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt; ............................................................... 16
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt; .............................................................................................. 16
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt; ..................................................................................... 17
Remarks ................................................................................................................................................................... 18
Overview ...................................................................................................................................................................... 18
Preserving Setup Setting – /SP ..................................................................................................................................... 18
Preserving SMBIOS – /R and /Rn ................................................................................................................................. 19
Programming NVRAM Region – /N .............................................................................................................................. 19

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 3 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Programming Specific NCB Block – /Kn ....................................................................................................................... 19
Programming Specific ROM Hole – /Ln ........................................................................................................................ 19
Secured Flash Update – /CAPSULE and /RECOVERY .................................................................................................... 20
Send special command to BIOS – /CMD:{xxx}.............................................................................................................. 21
Linux Pre-Requisites ................................................................................................................................................. 22
Signing Driver and Enrolling Public Key to the System ............................................................................................. 24
Support Table .......................................................................................................................................................... 26
Command/Option Support in Each Mode ................................................................................................................... 26
Error Codes .............................................................................................................................................................. 28
Error Code Definition ................................................................................................................................................... 28
FQA .......................................................................................................................................................................... 32
The Error Message Information of ROM ...................................................................................................................... 32
Windows requires a digitally signed driver .................................................................................................................. 32

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 4 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Document Information

Purpose
This document provides information to use the Aptio AFU for updating system BIOS.

Audience
Generic BIOS Engineers, OEM Engineers, and Aptio Customers.

Change History
Date

Revision

2013-11-19
2014-03-20
2014-04-24

1.00
1.01
1.02

2014-08-22

1.03

2014-11-11
2015-01-30
2015-06-22
2015-11-18

1.04
1.05
1.06
1.07

2016-02-02

1.08

2016-03-25

1.09

2016-10-18

1.10

2017-04-28

1.11

Description
Initial document created and update content to latest released of Afu
Modified 0x18、0xB6、0xB7、0xBF、0xD0 error message text.
Added error message 0x34、0x35.
Added new commands for /meul and /JBC.
Need to be updated the SmiFlash module to 5.001_SmiFlash_13.
Added Windows 2012 R2 in the support list.
Added new’s command /cmd:.
Removed Microsoft®DOS support.
Added Linux Xen note.
Added 0x4A、0x4B error message text.
Added DOS does not support note.
Added an announcement: Linux does not support Secure Boot
Added support Linux Secure Boot.
Added /CLRCFG, /BCPALL, /DPC command.
Added 0x36, 0x37, 0x4C, 0x71 error messages.
Added 0x4C, ROMLayout change error messages.
Added answer for Windows digitally signed driver.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 5 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Introduction

Overview

A

FU (AMI Firmware Update) is a package of utilities used to update the system BIOS under various operating
systems. AFU only works for APTIO with SMI FLASH support.

AFU APTIO Features
This list of features is supported by command line, command prompt, EFI Shell, or BSD/Linux shell.


Read system ROM image



Flash ROM image



Command line operating

Requirements
Supported Operating System
AFU is supported by the following operating systems:
















Microsoft® Windows® 2000
Microsoft® Windows® XP
Microsoft® Windows® 2003
Microsoft® Windows® Server 2008 R2
Microsoft® Windows® Server 2012 R2
Microsoft® Windows® Vista
Microsoft® Windows® 7
Microsoft® Windows® 8
Microsoft® Windows® 8.1
Microsoft® Windows® 10
Microsoft® Windows® PE
EFI Shell Environment
BSD
Linux(*1)
MS-DOS(*2)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 6 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Note:
*1. On Linux Xen environment, AFULNX must be executed in host desktop (Domain 0) of the virtual machine.
*2. DOS version is stopped supporting in AFU 3.08 or later version.

Firmware Requirements


Compatible with Aptio 3, 4, and 4.5.



Requires that the current installed firmware has SMI flashing support enabled.



For supporting Secure Flash, the following eModules are required:
- Secure Flash Pkg (4.6.5.1_SECMOD_003 or later)
- CryptoPkg (4.6.5_CRYPTOAPI_0003 or later)
- Capsule (4.5.6_Capsule_00 or later)
- SMIFlash (4.6.3.6_SMIFLASH_23 or later)
- OFBD (4.6.3.2_OFBD_1.0.2 or later)
- OFBD Secure Flash (4.6.5.0_OFBD_SECURE_FLASH_0.0.5 or later)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 7 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Getting Started

Installation
To run, extract all of the files from the folder with the name corresponding to the desired operating
system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 8 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AFUAPTIO Operation

Overview
This mostly involves documenting all the SDL tokens and eLinks. This chapter explains the operation
of AFUAPTIO.
The AFUAPTIO operation mode includes all of the AFUAPTIO features such as saving current ROM
image to file, getting and displaying ROM ID from BIOS ROM file.
An example of AFUEFIX64 that getting and displaying ROM ID from BIOS ROM file command screen
are shown below:

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 9 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Commands and Options
The following list is to offer you an overview of the commands and options provided by AFUAPTIO.
The content can also be found in AFUAPTIO’s help information. A more detailed usage of the
commands and options will be explained in the next chapter.

Usage
AfuEfix64 & lt; BIOS ROM File Name & gt; [Option 1] [Option 2] …
Or
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AfuEfix64 & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O

Save current ROM image to file

- /U

Get and display ROM ID from BIOS ROM file

- /S

Refer to Option: /S

- /D

Verification test of given ROM File without flashing BIOS.

- /A

Refer to Option: /A

- /OAD

Refer to Option: /OAD

- /CLNEVNLOG Refer to Option: /CLNEVNLOG

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 10 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Options
The optional field is used to supply more information for flashing BIOS ROM. Following lists the
supported optional parameters and format:

- /CLRCFG

Program without preserving setup configuration

-/BCPALL

Save all question values before flash

-/DPC

Don't Check Aptio 4 and Aptio 5 platform.

- /MEUL:

Program ME Entire Firmware Block, which supports Production.BIN and
PreProduction.BIN files.

- /Q

Silent execution

- /X

Do not check ROM ID

- /CAF

Compare ROM file's data with Systems is different or not, if not then cancel
related update.

- /S

Display current system's ROMID

-/JBC

Don't Check AC adapter and battery.

- /HOLEOUT:

Save specific ROM Hole according to given RomHole GUID.

- /SP

Preserve Setup setting.

- /R

Preserve all SMBIOS structures during programming.

- /Rn

Preserve SMBIOS type N during programming.(n=0-255)

- /B

Program Boot Block

- /P

Program main bios image

- /N

Program NVRAM

- /K

Program all non-critical blocks

- /Kn

Program n'th non-critical block (n=0-15)

- /HOLE:

Update specific ROM Hole according to RomHole GUID.

- /L

Program all ROM Holes

- /Ln

Program n'th ROM Hole only (n=0-15)

- /ECUF

Update EC BIOS when newer version is detected.

- /E

Program Embedded Controller block

- /ME

Program ME Entire Firmware Block.

- /MEUF

Program ME Ignition Firmware Block.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 11 of 32

American Megatrends, Inc.
Aptio AFU User Guide

- /A

OEM Activation file.

- /OAD

Delete OEM Activation Key

- /CLNEVNLOG

Clear Event Log.

- /CAPSULE

Override Secure Flash policy by Capsule

- /RECOVERY

Override Secure Flash policy by Recovery

- /EC

Program Embedded Controller Block. (Flash Type)

-/CMD:

Send special command to BIOS. /CMD:{xxx}

- /REBOOT

Reboot after programming.

- /SHUTDOWN

Shutdown after programming.

- /FDR

Flash Flash-Descriptor Region.(*1)

- /GBER

Flash GBE Region.(*1)

- /MER

Flash Entire ME Region.(*1)

- /OPR

Flash Operation Region of SPS.(*1)

- /PDR

Flash PDR Region.(*1)

Note:
*1: If BIOS ME Module reports these commands, AFU will show this command.
To use a command of generic AFU on the Specific platform, please refer the help menu (/?) in generic AFU.

Rules
- Any parameter enclosed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options]. They are /O, /U, /D.
- Main BIOS image is default flashing area if no any options present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 12 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Usage

Overview
The AFUAPTIO offers the following basic command and option usages:




AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AfuEfix64 & lt; Command & gt;

Other usages which are not mentioned in help are:




AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt;
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;

These usages are explained in more detail in this chapter.

AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
The user could put no option or combine multiple options in one command line. Commands cannot
be combined in command line like options unless the command is categorized as both a command
and an option, such as /S and /A.

For option combination case, AFUAPTIO will check its option priority list and execute the options
according to the priority order. Three examples of this usage are provided below.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 13 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; BIOS ROM File Name & gt;

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line would trigger AFUAPTIO to run the default setting which
flashes the system Main Block with the specified BIOS ROM File.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /D /S

Where Output BIOS ROM File Name, the mandatory field is used to specify path/filename of the
BIOS ROM file with extension. /D is to verify the current BIOS and the BIOS ROM File, and /S, which
is categorized as a command and also an option, gets and displays the current system’s ROM ID.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /P /B /N /REBOOT

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line is to flashing current BIOS by BIOS ROM file. /P /B /N are to
specify that the flashing regions are Main Block, Boot Block and NVRAM. /REBOOT is to specify that
reboot action will be performed in this execution. AFUAPTIO would execute the options in the order
of /B, /P, /N and then reboot the system at the end. The order of execution is determined by
AFUAPTIO design.

AfuEfix64 & lt; ME File Name & gt; /ME

Where ME File Name is used to specifying path/filename of the ME file with extension. This
command line programs entire ME block with the specified ME file.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 14 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AFUAPTIO can only execute one command at a time and it does not accept combinations of
command and option in one command line except those can be both command and option. Three
examples of this usage are provided below.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /O

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line saves the current ROM image to a file.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /U

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
This command line gets and displays the ROM ID from the specified BIOS ROM file.

AfuEfix64 & lt; Command & gt;
This command usage is for some commands which do not require inputting any file to complete the
execution. Usually this type of commands accesses the current BIOS only. An example of this usage
is provided:

AfuEfix64 /S

This command line gets and displays the ROM ID of the current BIOS in system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 15 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM
Hole GUID & gt;
This command usage is for outputting or flashing a certain ROM hole. For example, the command
line for outputting a certain ROM hole whose GUID is 01234567- 89ab- cdef- 0123- 456789abcdef is
as following:

AfuEfix64 & lt; Output ROM Hole File Name & gt; /HOLEOUT:0123456789abcdef0123456789abcdef

Where Output ROM Hole File Name is used to specify path/filename of the output ROM hole file
with extension. The GUID after the option should not contain dashes or spaces in between.

Another example of flashing a certain ROM Hole whose GUID is 01234567- 89ab- cdef- 0123456789abcdef is as following:

AfuEfix64 & lt; ROM Hole File Name & gt; /HOLE:0123456789abcdef0123456789abcdef

Where ROM Hole File Name is used to specify path/filename of the ROM hole file with extension.
Please discard dashes and spaces inside GUID line while typing.

AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
This command usage is for /Kn and /Ln commands where n is indicating the numeric order of a
th

certain non-critical block or ROM hole. For example, to program the 4 ROM hole, the command
line could be:

AfuEfix64 & lt; BIOS ROM File Name & gt; /L4

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 16 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension,
th

and 4 is to specify that the 4 ROM hole is the one to perform /L operation.

The next chapter has more detail of the numbering rule of non-critical blocks and ROM holes.

AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;
This command usage is for /A command which insert a specific OEM activation key into the empty
key inside current system BIOS. The command line is as follows:

AfuEfix64 /A & lt; OEM Activation Key Bin File Name & gt;

Where OEM Activation Key Bin File Name is used to specify path/filename of the OEM activation
key file with extension. Please make sure that the OEM Activation Key region is empty before
inserting the key, or please perform /OAD command before insertion.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 17 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Remarks

Overview
This chapter is to describe commands/options which require extra attention and to explain cases
which may occur in certain unique scenarios.

Preserving Setup Setting – /SP
/SP command is designed specifically for “OEM NVRAM/Setup Variable Preserve” module part of
OFBD. If /SP is called, AFUAPTIO would send SMI 0x26 twice to save setup setting before starting
updating NVRAM and to restore setup setting after finishing updating NVRAM. Customer can
customize their OFBD module to preserve certain NVRAM data when AFUAPTIO flashes the NVRAM
area. For example, there are two methods for preserving Setup Password:

Method 1
Enable PRESERVE_PASSWORDS token – The BIOS will preserve its Setup password when AFUAPTIO
calls the SMIFlash module.

Method 2
Control through /SP command – Customer can port PreserveSetupPassword in
OFBDSETUPStoreHandle and RestoreSetupPassword in OFBDSETUPRestoreHandle, and use /SP
command to keep or not to keep the Setup Password while updating the NVRAM:

AfuEfix64 xxx.ROM /N /SP - keep Setup password
AfuEfix64 xxx.ROM /N

- don’t keep Setup password.

This feature needs BIOS’ cooperation. To learn more about preserving setup data, please consult
with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 18 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Preserving SMBIOS – /R and /Rn
If the SMBIOS data is stored in Main Block or Boot Block, AFUAPTIO /R and /Rn options would take
the responsibility to preserve the SMBIOS data. If the SMBIOS data is stored in NVRAM and BIOS
project’s token SMBIOS_PRESERVE_NVRAM=0, the preservation process would take place at OFBD
module. To know more about the detail of preserved data, please consult with your BIOS provider.

/R is used to preserve the whole SMBIOS data. To preserve a certain type of SMBIOS, please use /Rn.
For example, to preserve SMBIOS Type 2 and Type 41 during BIOS flashing and the SMBIOS data is
located in Boot Block, the command could be:
AfuEfix64 & lt; BIOS ROM File Name & gt; /B /R2 /R41

Programming NVRAM Region – /N
Erasing NVRAM may cause important variables lose.

Programming Specific NCB Block – /Kn
/Kn command is designed to program a specific non-critical block, or NCB block. AFUAPTIO would
search ROM and identify the first NCB Block found as K0, and the second one as K1, etc. Therefore,
command /K2 would program the third NCB Block found by AFU.

Programming Specific ROM Hole – /Ln
/Ln command is designed to program a specific ROM Hole. Each ROM Hole is identified in the
following way: AFUAPTIO would search for ROM Holes in the order of Boot Block area and Main
Block area, and identify each ROM Hole in consecutive integers from 0 to 15. So, for example, /L1 is
used to program the second ROM Hole found in ROM.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 19 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Scenarios:
If a ROM contains two ROM Holes in Boot Block area and two in Main Block area,
AFUAPTIO would identify L0 and L1 for the two in Boot Block area and L2 and L3 for the two in Main
Block area.

If a ROM contains 2 ROM Holes in Boot Block area and none in Main Block area, AFUAPTIO
would only find 2 ROM Holes in total and identify them as L0 and L1.

If a ROM contains no ROM Holes in Boot Block area and three in Main Block area,
AFUAPTIO would find nothing in Boot Block area and identify L0, L1 and L2 for the three ROM Holes
in Main Block area.

Secured Flash Update – /CAPSULE and /RECOVERY
For Secured BIOS, the command rule for programming the current BIOS is different. There are two
more modes, Capsule Mode and Recovery Mode, which are different from the regular Runtime
Mode mentioned in the previous contents. Unlike Runtime Mode where all the commands/options
are supported, Capsule Mode and Recovery Mode only support /P, /B, /N, and /E options, or
depending on the BIOS design. The following description explains how to program BIOS under these
two modes.

To override Secure Flash policy and program the BIOS image in Capsule Mode, please use the
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /CAPSULE /P /B /N /E

And to override Secure Flash policy and program the BIOS image in Recovery Mode, please use this
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /RECOVERY /P /B /N /E

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
For more detail on Secure Flash, please consult with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 20 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Send special command to BIOS – /CMD:{xxx}
Send the string between brackets to OFBD OEM CMD Checking Module. The string is
corresponding to the string which is defined in BIOS by user.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 21 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Linux Pre-Requisites

1. Log in Linux as root otherwise use sudo (if permitted).
2. The compiler suite (gcc) must be installed. If these packages are not installed, the driver CANNOT
be built.
3. For most of the distributions, AFU will generate driver without any notification, if it doesn’t exist
you need to install kernel sources. Also if Initmem fails, Please follow point 4.
4. Kernel sources must be installed, *CONFIGURED*, and then compiled. Following are steps to do
this:
a. Find Running Kernel's Configuration File:
To configure the sources, simply change to the kernel source directory (typically
/lib/modules/$(uname -r)/build). If it doesn't exist, you need to install kernel source.
Typically, the reference configuration for the kernel can be found in the /boot directory with
filename '.config', 'kernel.config', or 'vmlinux-2.4.18-3.config'. Type 'uname -a' and use the
configuration filename that best matches the output from 'uname -a'. Also, check for
/dev/mem directory existence. If it doesn’t exist, you need to install kernel sources.
Normally it comes with the installation unless if the option is deselected.
On some distributions Red Hat for instance, there is a config directory under
/lib/modules/$(uname -r)/build.
Copy this configuration file into the root of the Linux kernel source tree (usually it is
/lib/modules/$(uname -r)/build). This file must be renamed to " .config " (dot config).
b. Make Your AMI Flash Driver (amifldrv_mod.o):
For most distribution, the command to build the driver is:
afulnx_32 /MAKEDRV
Or
afulnx_64 /MAKEDRV

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 22 of 32

American Megatrends, Inc.
Aptio AFU User Guide

If your Linux's kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
afulnx_32 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
Or
afulnx_64 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default path is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
c. Make Your AMI Flash Driver from driver source files (amifldrv_mod.o):
Using command /GENDRV, it will generate driver source files to specific directory.
afulnx_32 /GENDRV [Option 1] [Option 2]
Or
afulnx_64 /GENDRV [Option 1] [Option 2]
Where,
[Option 1]: Specific kernel source 'KERNEL=XXXX' same as the /MAKEDRV
[Option 2]: Specific output directory 'OUTPUT=XXXX'
Generate files as outlined below:
File Name Description
--------------------------------------------------------------------------amiwrap.c Driver source code.
amiwrap.h Driver header.
amifldrv.o_shipped Object file for driver.
Makefile Makefile
--------------------------------------------------------------------------For most distribution, the command to build the driver is: make.
If your Linux’s kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
make KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
d. Check Your Build:
Check the version of running Linux kernel with 'uname -r'.
Check the version of amifldrv_mod.o with 'modinfo amifdrv_mod.o'.
If they mismatch, you will need to select the correct configuration
File (.config), rebuild your kernel, and then rebuild your driver as described in steps a, b, c
and d.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 23 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Signing Driver and Enrolling Public Key to the System

The following prerequisites are needed on the build system to sign the driver:
1. Login to Linux OS as root otherwise use sudo.
2. The compiler suite (gcc) must be installed. If it’s not installed, the AFU driver cannot be built.
3. OpenSSL: Needed to generate cryptographic keys. OpenSSL tool can be downloaded from
https://www.openssl.org
4. Perl interpreter: Needed to run the signing script. Perl tool can be downloaded from
https://www.perl.org

Follow the below steps to sign the driver:
1. Boot to Linux OS.
2. Generate a Public and Private key pair using below openssl command: & gt; openssl req -x509 new -nodes -utf8 -sha256 -days 36500 -batch -configconfiguration_file.config -outform DER -out
public_key.der -keyout private_key.priv
Note: The configuration file configuration_file.config must be created with the required
information before running the command. A sample configuration file is shown below. The
values in & lt; & gt; must be filled with actual values.
configuration_file.config:
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = myexts
[ req_distinguished_name ]
O = & lt; organization_name & gt;
CN = & lt; organization_name & gt; Signing Key
emailAddress = & lt; email_address & gt;
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 24 of 32

American Megatrends, Inc.
Aptio AFU User Guide

3. Build AFU driver using below command. The driver will be generated in the current directory
with name amifldrv_mod.o.
& gt; afulnx_64 /MAKEDRV
4. Execute below command to sign driver with the key generated in step 2.
& gt; perl /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 private_key.priv
public_key.der amifldrv_mod.o
5. Request addition of public key to MOK list using mokutil. The command will prompt a
password which will be needed during public key enrollment in next step.
& gt; mokutil --import public_key.der
6. Reboot the system which will launch MOK manager application to complete public key
enrollment.
7. Once the public key enrollment is done, Boot to OS and execute below command to ensure
the newly added key is available in system key ring.
& gt; keyctl list %:.system_keyring
8. Install signed driver using insmod command.
& gt; insmod amifldrv_mod.o
9. Ensure it is loaded successfully using lsmod command.
Reference: https://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modulesfor-secure-boot.html

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 25 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Support Table

Command/Option Support in Each Mode
Command
/O
/U
/S
/D
/A
/OAD
/CLNEVNLOG

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Option
/MEUL
/Q
/X
/CAF
/S
/JBC
/SP
/R
/Rn
/B
/P
/N
/K
/Kn
/HOLE:
/HOLEOUT:
/L
/Ln
/ECUF
/E
/ME
/MEUF
/A
/OAD

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported ( *1 )
Supported ( *1 )
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 26 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Option
/CLNEVNLOG
/EC
/REBOOT
/SHUTDOWN

Runtime Mode
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported

Note:
* 1: This option must use with either /P or /B in order to be supported under Capsule Mode.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 27 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Error Codes

Error Code Definition
CODE
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0X0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
0x17
0x18
0x19
0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0x20
0x21

Definition
Error: Unknown command.
Error: BIOS has no flash information available.
Error: ROM file size does not match existing BIOS size.
Error: ROM file ROMID is not compatible with existing BIOS ROMID.
Error: Bootblock error.
Error: This BIOS version has more Non-Critical blocks than supported.
Error: BIOS checksum error.
Error: Invalid option
Error: Size of ROM file does not match the size of system ROM
Error: Unable to update ROM hole
Error: ROMHOLE not exist
Error: BIOS update cancelled by user.
Error: BIOS Report Error.
Error: Kernel source files cannot be found.
Error: Size of PLDM file is more than the FV size.
Error: Unable to load driver.
Error: Unable to unload driver.
Error: No non-critical blocks found in ROM file.
Error: Requested non-critical block not available in ROM file.
Error: Non-critical blocks in ROM image file do not match those in the system.
Error: Secure Flash function is not supported on this platform.
Error: Unable to get Secure Flash policy from BIOS.
Error: Unsupported Secure Flash policy.
Error: Secure Flash Rom Verify fail.
Error: Failed to erase flash chip (at Runtime Secure Flash).
Error: Failed to update flash chip (at Runtime Secure Flash).
Error: Failed to read flash chip (at Runtime Secure Flash).
Error: Failed to verify flash chip (at Runtime Secure Flash).
Error: Failed to load image into memory.
Error: Secure Flash function is not supported on this file.
Error: Reserved for Secure Flash.
Error: Unable to initialize memory manager.
Error: Unable to close memory manager.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 28 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x22
0x23
0x24
0x25
0x26
0x27
0x28
0x29
0x30
0x31
0x32
0x33
0x34
0x35
0x36
0x37
0x40
0x41
0x42
0x43
0x44
0x45
0x46
0x47
0x48
0x49
0x4A
0x4B
0x4C
0x50
0x60
0x61
0x70
0x71
0x80
0x81
0x82
0x90
0x91
0x92
0x93
0x94
0x95
0x96
0x97
0x98

Error: Problem allocating memory.
Error: Problem freeing memory.
Error: Problem allocating BIOS buffer.
Error: Problem freeing BIOS buffer.
Error: Problem freeing mapping BIOS.
Error: Problem freeing unmapping BIOS.
Error: Problem mapping BIOS data.
Error: Problem unmapping BIOS data.
Error: Problem opening file for reading.
Error: Problem reading file.
Error: Problem opening file to write.
Error: Problem writing file.
Error: Using the wrong AFU version, Please use Aptio 4 AFU.
Error: Using the wrong AFU version, Please use Aptio 5 AFU.
Error: Fail with problem of ESP Driver init.
Error: Fail with problem of copy ROM file to ESP driver.
Error: BIOS is write-protected.
Error: Can not close flash interface.
Error: Problem reading flash.
Error: Problem erasing flash.
Error: Problem writing flash.
Error: Problem verifying flash.
Error: Problem getting flash information.
Error: No firmware id.
Error: Power cord not connected. Plug in power cord to flash.
Error: A platform condition has prevented flashing.
Error: Platform data is not empty, And data address is not Alignment Block Address.
Error: SLP key is not empty at all.
Error: Rom file ROM layout is changed.
Error: This program must be run in MS-DOS mode.
Error: Accessing registry.
Error: Program already running.
Error: BSD access IO.
Error: Linux does not support Auto Build Driver when Secure Boot Enable.
Error: Size of system ROM mismatches size of ROM file
Error: ROM ID mismatch
Error: Bootblock checksum error
Error: Error to shutdown
Error: Error to restart...
Error: Can't open ROM ID file
Error: ROM ID file is not a ROM file.
Error: Invalid MAC address
Error: Invalid load current CMOS option
Error: Invalid retry count
Error: Invalid defined ROM ID length
Error: Invalid SMI

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 29 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x99
0x9A
0x9B
0x9C
0x9D
0x9E
0x9F
0xA0
0xA1
0xA2
0xA3
0xA4
0xA5
0xA6
0xA7
0xA8
0xA9
0xAA
0xAB
0xAC
0xAD
0xAE
0xAF
0xB0
0xB1
0xB2
0xB3
0xB4
0xB5
0xB6
0xB7
0xB8
0xB9
0xBA
0xBB
0xBC
0xBD
0xBE
0xBF
0xC0
0xC1
0xC2
0xC6
0xC7
0xD0
0xD1

Error: ROM File ID don't exist
Error: System ROM ID don't exist
Error: Password Retry count exceeded.
Error: BIOS don't support NVRAM/SETUP preserve function
Error: Store SETUP setting error
Error: Restore SETUP setting error
Error: Cannot analyze ROM file. ROM file may be corrupted
Error: Cannot analyze the ME Data. ROM file may be corrupted
Error: BIOS does not support ME Entire Firmware update
Error: BIOS does not support ME Ignition Firmware update
Error: Invalid EC ROM file
Error: EC ROM file checksum error
Error: Can't enter EC flash mode
Error: Erasing EC flash memory fail
Error: Initial EC programming fail
Error: EC flash data transmit error
Error: Writing EC flash memory fail
Error: Exit EC programming mode fail
Error: ROM Chip ID mismatch
Error: Invalid EC Header Table
Error: EC does not permit BIOS update
Error: BIOS doesn’t support OEMCMD function
Error: Store DMI Data error
Error: Restore DMI Data error
Error: Invalid Activation Key file.
Error: File Size is greater than image activation key length.
Error: Image activation key larger than BIOS activation key.
Error: Activation Key checksum error.
Error: No Support Activation Key error.
Error: OA key is available, and OA Key is not the same as BIN file in the system.
Error: OA key is empty.
Error: OA key region incorrect.
Error: BIOS doesn’t support Clear event log function.
Error: Clear event log error.
Error: Rom image layout detected RomHole is redesigned.
Error: BIOS have more than one RomHole’s GUID is the same.
Error: Requested Rom Hole not available in ROM file.
Error: RomHoles in ROM image file do not match those in the system.
Error: OA key is available, and OA Key is the same as BIN file in the system.
Error: BIOS doesn’t support process ME information
Error: BIOS return error, when trying to re-flash ME Firmware data.
Error: Region is write-protected
Error: No EC blocks found in system ROM.
Error: BIOS doesn’t support all ROM flashing function.
Error: OA key data is invalid.
Error: BIOS has already updated OA.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 30 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0xD2
0xD3
0xD4
0xD5

Error: BIOS does not allow updating OA.
Error: BIOS doesn’t support updating OA.
Error: The DMI data size of system is greater than File's DMI data length.
Error: BIOS doesn't support EC Battery Check function.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 31 of 32

American Megatrends, Inc.
Aptio AFU User Guide

FQA

The Error Message Information of ROM
AFU has added the check mechanism of ROM information. AFU would compare the information between
updated ROM and on board ROM. If these ROMs have different information, AFU will show the error of 0x4C.
AMI extremely suggest users to stop choosing “Continue to update” if users do not comprehend ROM structure
very much. The system will be crashed after BIOS update because of ROM information difference.

Windows requires a digitally signed driver

This issue is resolved by a security fix provided by MS. KB3033929 resolves this issue. The certificate used to sign
the driver is higher security and older versions of Win7 don’t support it.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 32 of 32


AMI AFU For Aptio 4.rar > readme.txt

AFU (AMI Firmware Update) is a package of utilities used
to update the system BIOS under various operating systems.

Note: AFU only works for APTIO with SMI FLASH support.
Compatible with Aptio 3, 4, and 4.5.

The package includes:

- AFUEFI 3.09.02.1396
- AFU User Guide

To run, extract all of the files from the folder with the name corresponding to the desired operating system.


Usage (applies to AFUWIN, AFUDOS, AFUEFI and AFUEFI64...
for usage of AFUBSD and AFULNX see help files provided in their folders):
------------------------------------------------------------------
AFUDOS & lt; BIOS ROM File Name & gt; [Option 1] [Option 2]
Or
AFUDOS & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AFUDOS & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O Save current ROM image to file
- /U Display ROM File's ROMID
- /S Refer to Options: /S
- /D Verification test of given ROM File without flashing BIOS.
- /OAD Refer to Options: /OAD
- /A Refer to Options: /A
- /CLNEVNLOG Refer to Options: /CLNEVNLOG
Options
The optional field used to supply more information for flashing BIOS ROM. Following lists the supported optional parameters and format:
- /DPC Don't Check Aptio 4 and Aptio 5 platform.
- /MEUL: Program ME Entire Firmware Block, which supports
Production.BIN and PreProduction.BIN files.
- /Q Silent execution
- /X Don't Check ROM ID
- /CAF Compare ROM file's data with Systems is different or
not, if not then cancel related update.
- /S Display current system's ROMID
- /JBC Don't Check AC adapter and battery
- /HOLEOUT: Save specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLEOUT:GUID
- /SP Preserve Setup setting.
- /Rn Preserve SMBIOS type N during programming(n=0-255)
- /R Preserve ALL SMBIOS structure during programming
- /B Program Boot Block
- /P Program Main BIOS
- /K Program all non-critical blocks.
- /N Program NVRAM
- /Kn Program n'th non-critical block(n=0-15).
- /HOLE: Update specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLE:GUID
- /L Program all ROM Holes.
- /Ln Program n'th ROM Hole only(n=0-15).
- /E Program Embedded Controller Block.
- /OAD Delete Oem Activation key
- /A Oem Activation file
- /E Program Embedded Controller Block
- /ECUF Update EC BIOS when newer version is detected.
- /ME Program ME Entire Firmware Block.
- /MEUF Program ME Ignition Firmware Block.
- /CLNEVNLOG Clear Event Log.
- /CAPSULE Override Secure Flash policy to Capsule
- /RECOVERY Override Secure Flash policy to Recovery
- /EC Program Embedded Controller Block. (Flash Type)
- /CMD: Send special command to BIOS. /CMD:{xxx, xxx, xxx}
- /REBOOT Reboot after programming.
- /SHUTDOWN Shutdown after programming.
- /FDR Flash Flash-Descriptor Region.(*1)
- /GBER Flash GBE Region.(*1)
- /MER Flash Entire ME Region.(*1)
- /OPR Flash Operation Region of SPS.(*1)
- /PDR Flash PDR Region.(*1)

(*1)If BIOS ME Module have report, AFU will be show this command.

Rules
- Any parameter encolsed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options].
- Main BIOS image is default flashing area if no any option present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.


AMI AFU For Aptio 4.rar > AMI_Aptio_AFU_User_Guide_NDA.pdf

AMI Software Utility User Guide

Aptio AFU User Guide
Document Revision 1.11
Apr 28, 2017
Confidential, NDA Required
Copyright © 2017
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All Rights Reserved
Property of American Megatrends, Inc.

American Megatrends, Inc.
Aptio AFU User Guide

Legal
Disclaimer
This publication contains proprietary information which is protected by copyright. No part of this publication
may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language,
or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends,
Inc. American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without
notice.
For Additional Information
Call American Megatrends, Inc. at 1-800-828-9264 for additional information.
Limitations of Liability
In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever,
whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the
support materials provided with the product.
Limited Warranty
No warranties are made, either expressed or implied, with regard to the contents of this work, its
merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and
omissions or for the uses made of the material contained herein or reader decisions based on such use.
Trademark and Copyright Acknowledgments
Copyright © 2017 American Megatrends, Inc. All Rights Reserved.
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All product names used in this publication are for identification purposes only and are trademarks of their
respective companies.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 2 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Table of Contents
Aptio AFU User Guide ................................................................................................................................................ 1
Legal .......................................................................................................................................................................... 2
Table of Contents ....................................................................................................................................................... 3
Document Information .............................................................................................................................................. 5
Purpose .......................................................................................................................................................................... 5
Audience ........................................................................................................................................................................ 5
Change History ............................................................................................................................................................... 5
Introduction ............................................................................................................................................................... 6
Overview ........................................................................................................................................................................ 6
AFU APTIO Features ....................................................................................................................................................... 6
Requirements ................................................................................................................................................................. 6
Supported Operating System ..................................................................................................................................... 6
Firmware Requirements ............................................................................................................................................. 7
Getting Started .......................................................................................................................................................... 8
Installation ..................................................................................................................................................................... 8
AFUAPTIO Operation ................................................................................................................................................. 9
Overview ........................................................................................................................................................................ 9
Commands and Options............................................................................................................................................... 10
Usage ....................................................................................................................................................................... 10
Commands ............................................................................................................................................................... 10
Options ..................................................................................................................................................................... 11
Rules ......................................................................................................................................................................... 12
Usage ....................................................................................................................................................................... 13
Overview ...................................................................................................................................................................... 13
AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] … ................................................................................ 13
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt; ................................................................................................. 15
AfuEfix64 & lt; Command & gt; ................................................................................................................................................ 15
AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt; ............................................................... 16
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt; .............................................................................................. 16
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt; ..................................................................................... 17
Remarks ................................................................................................................................................................... 18
Overview ...................................................................................................................................................................... 18
Preserving Setup Setting – /SP ..................................................................................................................................... 18
Preserving SMBIOS – /R and /Rn ................................................................................................................................. 19
Programming NVRAM Region – /N .............................................................................................................................. 19

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 3 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Programming Specific NCB Block – /Kn ....................................................................................................................... 19
Programming Specific ROM Hole – /Ln ........................................................................................................................ 19
Secured Flash Update – /CAPSULE and /RECOVERY .................................................................................................... 20
Send special command to BIOS – /CMD:{xxx}.............................................................................................................. 21
Linux Pre-Requisites ................................................................................................................................................. 22
Signing Driver and Enrolling Public Key to the System ............................................................................................. 24
Support Table .......................................................................................................................................................... 26
Command/Option Support in Each Mode ................................................................................................................... 26
Error Codes .............................................................................................................................................................. 28
Error Code Definition ................................................................................................................................................... 28
FQA .......................................................................................................................................................................... 32
The Error Message Information of ROM ...................................................................................................................... 32
Windows requires a digitally signed driver .................................................................................................................. 32

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 4 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Document Information

Purpose
This document provides information to use the Aptio AFU for updating system BIOS.

Audience
Generic BIOS Engineers, OEM Engineers, and Aptio Customers.

Change History
Date

Revision

2013-11-19
2014-03-20
2014-04-24

1.00
1.01
1.02

2014-08-22

1.03

2014-11-11
2015-01-30
2015-06-22
2015-11-18

1.04
1.05
1.06
1.07

2016-02-02

1.08

2016-03-25

1.09

2016-10-18

1.10

2017-04-28

1.11

Description
Initial document created and update content to latest released of Afu
Modified 0x18、0xB6、0xB7、0xBF、0xD0 error message text.
Added error message 0x34、0x35.
Added new commands for /meul and /JBC.
Need to be updated the SmiFlash module to 5.001_SmiFlash_13.
Added Windows 2012 R2 in the support list.
Added new’s command /cmd:.
Removed Microsoft®DOS support.
Added Linux Xen note.
Added 0x4A、0x4B error message text.
Added DOS does not support note.
Added an announcement: Linux does not support Secure Boot
Added support Linux Secure Boot.
Added /CLRCFG, /BCPALL, /DPC command.
Added 0x36, 0x37, 0x4C, 0x71 error messages.
Added 0x4C, ROMLayout change error messages.
Added answer for Windows digitally signed driver.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 5 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Introduction

Overview

A

FU (AMI Firmware Update) is a package of utilities used to update the system BIOS under various operating
systems. AFU only works for APTIO with SMI FLASH support.

AFU APTIO Features
This list of features is supported by command line, command prompt, EFI Shell, or BSD/Linux shell.


Read system ROM image



Flash ROM image



Command line operating

Requirements
Supported Operating System
AFU is supported by the following operating systems:
















Microsoft® Windows® 2000
Microsoft® Windows® XP
Microsoft® Windows® 2003
Microsoft® Windows® Server 2008 R2
Microsoft® Windows® Server 2012 R2
Microsoft® Windows® Vista
Microsoft® Windows® 7
Microsoft® Windows® 8
Microsoft® Windows® 8.1
Microsoft® Windows® 10
Microsoft® Windows® PE
EFI Shell Environment
BSD
Linux(*1)
MS-DOS(*2)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 6 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Note:
*1. On Linux Xen environment, AFULNX must be executed in host desktop (Domain 0) of the virtual machine.
*2. DOS version is stopped supporting in AFU 3.08 or later version.

Firmware Requirements


Compatible with Aptio 3, 4, and 4.5.



Requires that the current installed firmware has SMI flashing support enabled.



For supporting Secure Flash, the following eModules are required:
- Secure Flash Pkg (4.6.5.1_SECMOD_003 or later)
- CryptoPkg (4.6.5_CRYPTOAPI_0003 or later)
- Capsule (4.5.6_Capsule_00 or later)
- SMIFlash (4.6.3.6_SMIFLASH_23 or later)
- OFBD (4.6.3.2_OFBD_1.0.2 or later)
- OFBD Secure Flash (4.6.5.0_OFBD_SECURE_FLASH_0.0.5 or later)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 7 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Getting Started

Installation
To run, extract all of the files from the folder with the name corresponding to the desired operating
system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 8 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AFUAPTIO Operation

Overview
This mostly involves documenting all the SDL tokens and eLinks. This chapter explains the operation
of AFUAPTIO.
The AFUAPTIO operation mode includes all of the AFUAPTIO features such as saving current ROM
image to file, getting and displaying ROM ID from BIOS ROM file.
An example of AFUEFIX64 that getting and displaying ROM ID from BIOS ROM file command screen
are shown below:

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 9 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Commands and Options
The following list is to offer you an overview of the commands and options provided by AFUAPTIO.
The content can also be found in AFUAPTIO’s help information. A more detailed usage of the
commands and options will be explained in the next chapter.

Usage
AfuEfix64 & lt; BIOS ROM File Name & gt; [Option 1] [Option 2] …
Or
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AfuEfix64 & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O

Save current ROM image to file

- /U

Get and display ROM ID from BIOS ROM file

- /S

Refer to Option: /S

- /D

Verification test of given ROM File without flashing BIOS.

- /A

Refer to Option: /A

- /OAD

Refer to Option: /OAD

- /CLNEVNLOG Refer to Option: /CLNEVNLOG

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 10 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Options
The optional field is used to supply more information for flashing BIOS ROM. Following lists the
supported optional parameters and format:

- /CLRCFG

Program without preserving setup configuration

-/BCPALL

Save all question values before flash

-/DPC

Don't Check Aptio 4 and Aptio 5 platform.

- /MEUL:

Program ME Entire Firmware Block, which supports Production.BIN and
PreProduction.BIN files.

- /Q

Silent execution

- /X

Do not check ROM ID

- /CAF

Compare ROM file's data with Systems is different or not, if not then cancel
related update.

- /S

Display current system's ROMID

-/JBC

Don't Check AC adapter and battery.

- /HOLEOUT:

Save specific ROM Hole according to given RomHole GUID.

- /SP

Preserve Setup setting.

- /R

Preserve all SMBIOS structures during programming.

- /Rn

Preserve SMBIOS type N during programming.(n=0-255)

- /B

Program Boot Block

- /P

Program main bios image

- /N

Program NVRAM

- /K

Program all non-critical blocks

- /Kn

Program n'th non-critical block (n=0-15)

- /HOLE:

Update specific ROM Hole according to RomHole GUID.

- /L

Program all ROM Holes

- /Ln

Program n'th ROM Hole only (n=0-15)

- /ECUF

Update EC BIOS when newer version is detected.

- /E

Program Embedded Controller block

- /ME

Program ME Entire Firmware Block.

- /MEUF

Program ME Ignition Firmware Block.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 11 of 32

American Megatrends, Inc.
Aptio AFU User Guide

- /A

OEM Activation file.

- /OAD

Delete OEM Activation Key

- /CLNEVNLOG

Clear Event Log.

- /CAPSULE

Override Secure Flash policy by Capsule

- /RECOVERY

Override Secure Flash policy by Recovery

- /EC

Program Embedded Controller Block. (Flash Type)

-/CMD:

Send special command to BIOS. /CMD:{xxx}

- /REBOOT

Reboot after programming.

- /SHUTDOWN

Shutdown after programming.

- /FDR

Flash Flash-Descriptor Region.(*1)

- /GBER

Flash GBE Region.(*1)

- /MER

Flash Entire ME Region.(*1)

- /OPR

Flash Operation Region of SPS.(*1)

- /PDR

Flash PDR Region.(*1)

Note:
*1: If BIOS ME Module reports these commands, AFU will show this command.
To use a command of generic AFU on the Specific platform, please refer the help menu (/?) in generic AFU.

Rules
- Any parameter enclosed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options]. They are /O, /U, /D.
- Main BIOS image is default flashing area if no any options present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 12 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Usage

Overview
The AFUAPTIO offers the following basic command and option usages:




AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AfuEfix64 & lt; Command & gt;

Other usages which are not mentioned in help are:




AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt;
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;

These usages are explained in more detail in this chapter.

AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
The user could put no option or combine multiple options in one command line. Commands cannot
be combined in command line like options unless the command is categorized as both a command
and an option, such as /S and /A.

For option combination case, AFUAPTIO will check its option priority list and execute the options
according to the priority order. Three examples of this usage are provided below.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 13 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; BIOS ROM File Name & gt;

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line would trigger AFUAPTIO to run the default setting which
flashes the system Main Block with the specified BIOS ROM File.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /D /S

Where Output BIOS ROM File Name, the mandatory field is used to specify path/filename of the
BIOS ROM file with extension. /D is to verify the current BIOS and the BIOS ROM File, and /S, which
is categorized as a command and also an option, gets and displays the current system’s ROM ID.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /P /B /N /REBOOT

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line is to flashing current BIOS by BIOS ROM file. /P /B /N are to
specify that the flashing regions are Main Block, Boot Block and NVRAM. /REBOOT is to specify that
reboot action will be performed in this execution. AFUAPTIO would execute the options in the order
of /B, /P, /N and then reboot the system at the end. The order of execution is determined by
AFUAPTIO design.

AfuEfix64 & lt; ME File Name & gt; /ME

Where ME File Name is used to specifying path/filename of the ME file with extension. This
command line programs entire ME block with the specified ME file.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 14 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AFUAPTIO can only execute one command at a time and it does not accept combinations of
command and option in one command line except those can be both command and option. Three
examples of this usage are provided below.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /O

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line saves the current ROM image to a file.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /U

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
This command line gets and displays the ROM ID from the specified BIOS ROM file.

AfuEfix64 & lt; Command & gt;
This command usage is for some commands which do not require inputting any file to complete the
execution. Usually this type of commands accesses the current BIOS only. An example of this usage
is provided:

AfuEfix64 /S

This command line gets and displays the ROM ID of the current BIOS in system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 15 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM
Hole GUID & gt;
This command usage is for outputting or flashing a certain ROM hole. For example, the command
line for outputting a certain ROM hole whose GUID is 01234567- 89ab- cdef- 0123- 456789abcdef is
as following:

AfuEfix64 & lt; Output ROM Hole File Name & gt; /HOLEOUT:0123456789abcdef0123456789abcdef

Where Output ROM Hole File Name is used to specify path/filename of the output ROM hole file
with extension. The GUID after the option should not contain dashes or spaces in between.

Another example of flashing a certain ROM Hole whose GUID is 01234567- 89ab- cdef- 0123456789abcdef is as following:

AfuEfix64 & lt; ROM Hole File Name & gt; /HOLE:0123456789abcdef0123456789abcdef

Where ROM Hole File Name is used to specify path/filename of the ROM hole file with extension.
Please discard dashes and spaces inside GUID line while typing.

AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
This command usage is for /Kn and /Ln commands where n is indicating the numeric order of a
th

certain non-critical block or ROM hole. For example, to program the 4 ROM hole, the command
line could be:

AfuEfix64 & lt; BIOS ROM File Name & gt; /L4

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 16 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension,
th

and 4 is to specify that the 4 ROM hole is the one to perform /L operation.

The next chapter has more detail of the numbering rule of non-critical blocks and ROM holes.

AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;
This command usage is for /A command which insert a specific OEM activation key into the empty
key inside current system BIOS. The command line is as follows:

AfuEfix64 /A & lt; OEM Activation Key Bin File Name & gt;

Where OEM Activation Key Bin File Name is used to specify path/filename of the OEM activation
key file with extension. Please make sure that the OEM Activation Key region is empty before
inserting the key, or please perform /OAD command before insertion.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 17 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Remarks

Overview
This chapter is to describe commands/options which require extra attention and to explain cases
which may occur in certain unique scenarios.

Preserving Setup Setting – /SP
/SP command is designed specifically for “OEM NVRAM/Setup Variable Preserve” module part of
OFBD. If /SP is called, AFUAPTIO would send SMI 0x26 twice to save setup setting before starting
updating NVRAM and to restore setup setting after finishing updating NVRAM. Customer can
customize their OFBD module to preserve certain NVRAM data when AFUAPTIO flashes the NVRAM
area. For example, there are two methods for preserving Setup Password:

Method 1
Enable PRESERVE_PASSWORDS token – The BIOS will preserve its Setup password when AFUAPTIO
calls the SMIFlash module.

Method 2
Control through /SP command – Customer can port PreserveSetupPassword in
OFBDSETUPStoreHandle and RestoreSetupPassword in OFBDSETUPRestoreHandle, and use /SP
command to keep or not to keep the Setup Password while updating the NVRAM:

AfuEfix64 xxx.ROM /N /SP - keep Setup password
AfuEfix64 xxx.ROM /N

- don’t keep Setup password.

This feature needs BIOS’ cooperation. To learn more about preserving setup data, please consult
with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 18 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Preserving SMBIOS – /R and /Rn
If the SMBIOS data is stored in Main Block or Boot Block, AFUAPTIO /R and /Rn options would take
the responsibility to preserve the SMBIOS data. If the SMBIOS data is stored in NVRAM and BIOS
project’s token SMBIOS_PRESERVE_NVRAM=0, the preservation process would take place at OFBD
module. To know more about the detail of preserved data, please consult with your BIOS provider.

/R is used to preserve the whole SMBIOS data. To preserve a certain type of SMBIOS, please use /Rn.
For example, to preserve SMBIOS Type 2 and Type 41 during BIOS flashing and the SMBIOS data is
located in Boot Block, the command could be:
AfuEfix64 & lt; BIOS ROM File Name & gt; /B /R2 /R41

Programming NVRAM Region – /N
Erasing NVRAM may cause important variables lose.

Programming Specific NCB Block – /Kn
/Kn command is designed to program a specific non-critical block, or NCB block. AFUAPTIO would
search ROM and identify the first NCB Block found as K0, and the second one as K1, etc. Therefore,
command /K2 would program the third NCB Block found by AFU.

Programming Specific ROM Hole – /Ln
/Ln command is designed to program a specific ROM Hole. Each ROM Hole is identified in the
following way: AFUAPTIO would search for ROM Holes in the order of Boot Block area and Main
Block area, and identify each ROM Hole in consecutive integers from 0 to 15. So, for example, /L1 is
used to program the second ROM Hole found in ROM.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 19 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Scenarios:
If a ROM contains two ROM Holes in Boot Block area and two in Main Block area,
AFUAPTIO would identify L0 and L1 for the two in Boot Block area and L2 and L3 for the two in Main
Block area.

If a ROM contains 2 ROM Holes in Boot Block area and none in Main Block area, AFUAPTIO
would only find 2 ROM Holes in total and identify them as L0 and L1.

If a ROM contains no ROM Holes in Boot Block area and three in Main Block area,
AFUAPTIO would find nothing in Boot Block area and identify L0, L1 and L2 for the three ROM Holes
in Main Block area.

Secured Flash Update – /CAPSULE and /RECOVERY
For Secured BIOS, the command rule for programming the current BIOS is different. There are two
more modes, Capsule Mode and Recovery Mode, which are different from the regular Runtime
Mode mentioned in the previous contents. Unlike Runtime Mode where all the commands/options
are supported, Capsule Mode and Recovery Mode only support /P, /B, /N, and /E options, or
depending on the BIOS design. The following description explains how to program BIOS under these
two modes.

To override Secure Flash policy and program the BIOS image in Capsule Mode, please use the
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /CAPSULE /P /B /N /E

And to override Secure Flash policy and program the BIOS image in Recovery Mode, please use this
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /RECOVERY /P /B /N /E

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
For more detail on Secure Flash, please consult with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 20 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Send special command to BIOS – /CMD:{xxx}
Send the string between brackets to OFBD OEM CMD Checking Module. The string is
corresponding to the string which is defined in BIOS by user.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 21 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Linux Pre-Requisites

1. Log in Linux as root otherwise use sudo (if permitted).
2. The compiler suite (gcc) must be installed. If these packages are not installed, the driver CANNOT
be built.
3. For most of the distributions, AFU will generate driver without any notification, if it doesn’t exist
you need to install kernel sources. Also if Initmem fails, Please follow point 4.
4. Kernel sources must be installed, *CONFIGURED*, and then compiled. Following are steps to do
this:
a. Find Running Kernel's Configuration File:
To configure the sources, simply change to the kernel source directory (typically
/lib/modules/$(uname -r)/build). If it doesn't exist, you need to install kernel source.
Typically, the reference configuration for the kernel can be found in the /boot directory with
filename '.config', 'kernel.config', or 'vmlinux-2.4.18-3.config'. Type 'uname -a' and use the
configuration filename that best matches the output from 'uname -a'. Also, check for
/dev/mem directory existence. If it doesn’t exist, you need to install kernel sources.
Normally it comes with the installation unless if the option is deselected.
On some distributions Red Hat for instance, there is a config directory under
/lib/modules/$(uname -r)/build.
Copy this configuration file into the root of the Linux kernel source tree (usually it is
/lib/modules/$(uname -r)/build). This file must be renamed to " .config " (dot config).
b. Make Your AMI Flash Driver (amifldrv_mod.o):
For most distribution, the command to build the driver is:
afulnx_32 /MAKEDRV
Or
afulnx_64 /MAKEDRV

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 22 of 32

American Megatrends, Inc.
Aptio AFU User Guide

If your Linux's kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
afulnx_32 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
Or
afulnx_64 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default path is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
c. Make Your AMI Flash Driver from driver source files (amifldrv_mod.o):
Using command /GENDRV, it will generate driver source files to specific directory.
afulnx_32 /GENDRV [Option 1] [Option 2]
Or
afulnx_64 /GENDRV [Option 1] [Option 2]
Where,
[Option 1]: Specific kernel source 'KERNEL=XXXX' same as the /MAKEDRV
[Option 2]: Specific output directory 'OUTPUT=XXXX'
Generate files as outlined below:
File Name Description
--------------------------------------------------------------------------amiwrap.c Driver source code.
amiwrap.h Driver header.
amifldrv.o_shipped Object file for driver.
Makefile Makefile
--------------------------------------------------------------------------For most distribution, the command to build the driver is: make.
If your Linux’s kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
make KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
d. Check Your Build:
Check the version of running Linux kernel with 'uname -r'.
Check the version of amifldrv_mod.o with 'modinfo amifdrv_mod.o'.
If they mismatch, you will need to select the correct configuration
File (.config), rebuild your kernel, and then rebuild your driver as described in steps a, b, c
and d.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 23 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Signing Driver and Enrolling Public Key to the System

The following prerequisites are needed on the build system to sign the driver:
1. Login to Linux OS as root otherwise use sudo.
2. The compiler suite (gcc) must be installed. If it’s not installed, the AFU driver cannot be built.
3. OpenSSL: Needed to generate cryptographic keys. OpenSSL tool can be downloaded from
https://www.openssl.org
4. Perl interpreter: Needed to run the signing script. Perl tool can be downloaded from
https://www.perl.org

Follow the below steps to sign the driver:
1. Boot to Linux OS.
2. Generate a Public and Private key pair using below openssl command: & gt; openssl req -x509 new -nodes -utf8 -sha256 -days 36500 -batch -configconfiguration_file.config -outform DER -out
public_key.der -keyout private_key.priv
Note: The configuration file configuration_file.config must be created with the required
information before running the command. A sample configuration file is shown below. The
values in & lt; & gt; must be filled with actual values.
configuration_file.config:
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = myexts
[ req_distinguished_name ]
O = & lt; organization_name & gt;
CN = & lt; organization_name & gt; Signing Key
emailAddress = & lt; email_address & gt;
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 24 of 32

American Megatrends, Inc.
Aptio AFU User Guide

3. Build AFU driver using below command. The driver will be generated in the current directory
with name amifldrv_mod.o.
& gt; afulnx_64 /MAKEDRV
4. Execute below command to sign driver with the key generated in step 2.
& gt; perl /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 private_key.priv
public_key.der amifldrv_mod.o
5. Request addition of public key to MOK list using mokutil. The command will prompt a
password which will be needed during public key enrollment in next step.
& gt; mokutil --import public_key.der
6. Reboot the system which will launch MOK manager application to complete public key
enrollment.
7. Once the public key enrollment is done, Boot to OS and execute below command to ensure
the newly added key is available in system key ring.
& gt; keyctl list %:.system_keyring
8. Install signed driver using insmod command.
& gt; insmod amifldrv_mod.o
9. Ensure it is loaded successfully using lsmod command.
Reference: https://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modulesfor-secure-boot.html

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 25 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Support Table

Command/Option Support in Each Mode
Command
/O
/U
/S
/D
/A
/OAD
/CLNEVNLOG

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Option
/MEUL
/Q
/X
/CAF
/S
/JBC
/SP
/R
/Rn
/B
/P
/N
/K
/Kn
/HOLE:
/HOLEOUT:
/L
/Ln
/ECUF
/E
/ME
/MEUF
/A
/OAD

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported ( *1 )
Supported ( *1 )
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 26 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Option
/CLNEVNLOG
/EC
/REBOOT
/SHUTDOWN

Runtime Mode
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported

Note:
* 1: This option must use with either /P or /B in order to be supported under Capsule Mode.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 27 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Error Codes

Error Code Definition
CODE
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0X0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
0x17
0x18
0x19
0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0x20
0x21

Definition
Error: Unknown command.
Error: BIOS has no flash information available.
Error: ROM file size does not match existing BIOS size.
Error: ROM file ROMID is not compatible with existing BIOS ROMID.
Error: Bootblock error.
Error: This BIOS version has more Non-Critical blocks than supported.
Error: BIOS checksum error.
Error: Invalid option
Error: Size of ROM file does not match the size of system ROM
Error: Unable to update ROM hole
Error: ROMHOLE not exist
Error: BIOS update cancelled by user.
Error: BIOS Report Error.
Error: Kernel source files cannot be found.
Error: Size of PLDM file is more than the FV size.
Error: Unable to load driver.
Error: Unable to unload driver.
Error: No non-critical blocks found in ROM file.
Error: Requested non-critical block not available in ROM file.
Error: Non-critical blocks in ROM image file do not match those in the system.
Error: Secure Flash function is not supported on this platform.
Error: Unable to get Secure Flash policy from BIOS.
Error: Unsupported Secure Flash policy.
Error: Secure Flash Rom Verify fail.
Error: Failed to erase flash chip (at Runtime Secure Flash).
Error: Failed to update flash chip (at Runtime Secure Flash).
Error: Failed to read flash chip (at Runtime Secure Flash).
Error: Failed to verify flash chip (at Runtime Secure Flash).
Error: Failed to load image into memory.
Error: Secure Flash function is not supported on this file.
Error: Reserved for Secure Flash.
Error: Unable to initialize memory manager.
Error: Unable to close memory manager.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 28 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x22
0x23
0x24
0x25
0x26
0x27
0x28
0x29
0x30
0x31
0x32
0x33
0x34
0x35
0x36
0x37
0x40
0x41
0x42
0x43
0x44
0x45
0x46
0x47
0x48
0x49
0x4A
0x4B
0x4C
0x50
0x60
0x61
0x70
0x71
0x80
0x81
0x82
0x90
0x91
0x92
0x93
0x94
0x95
0x96
0x97
0x98

Error: Problem allocating memory.
Error: Problem freeing memory.
Error: Problem allocating BIOS buffer.
Error: Problem freeing BIOS buffer.
Error: Problem freeing mapping BIOS.
Error: Problem freeing unmapping BIOS.
Error: Problem mapping BIOS data.
Error: Problem unmapping BIOS data.
Error: Problem opening file for reading.
Error: Problem reading file.
Error: Problem opening file to write.
Error: Problem writing file.
Error: Using the wrong AFU version, Please use Aptio 4 AFU.
Error: Using the wrong AFU version, Please use Aptio 5 AFU.
Error: Fail with problem of ESP Driver init.
Error: Fail with problem of copy ROM file to ESP driver.
Error: BIOS is write-protected.
Error: Can not close flash interface.
Error: Problem reading flash.
Error: Problem erasing flash.
Error: Problem writing flash.
Error: Problem verifying flash.
Error: Problem getting flash information.
Error: No firmware id.
Error: Power cord not connected. Plug in power cord to flash.
Error: A platform condition has prevented flashing.
Error: Platform data is not empty, And data address is not Alignment Block Address.
Error: SLP key is not empty at all.
Error: Rom file ROM layout is changed.
Error: This program must be run in MS-DOS mode.
Error: Accessing registry.
Error: Program already running.
Error: BSD access IO.
Error: Linux does not support Auto Build Driver when Secure Boot Enable.
Error: Size of system ROM mismatches size of ROM file
Error: ROM ID mismatch
Error: Bootblock checksum error
Error: Error to shutdown
Error: Error to restart...
Error: Can't open ROM ID file
Error: ROM ID file is not a ROM file.
Error: Invalid MAC address
Error: Invalid load current CMOS option
Error: Invalid retry count
Error: Invalid defined ROM ID length
Error: Invalid SMI

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 29 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x99
0x9A
0x9B
0x9C
0x9D
0x9E
0x9F
0xA0
0xA1
0xA2
0xA3
0xA4
0xA5
0xA6
0xA7
0xA8
0xA9
0xAA
0xAB
0xAC
0xAD
0xAE
0xAF
0xB0
0xB1
0xB2
0xB3
0xB4
0xB5
0xB6
0xB7
0xB8
0xB9
0xBA
0xBB
0xBC
0xBD
0xBE
0xBF
0xC0
0xC1
0xC2
0xC6
0xC7
0xD0
0xD1

Error: ROM File ID don't exist
Error: System ROM ID don't exist
Error: Password Retry count exceeded.
Error: BIOS don't support NVRAM/SETUP preserve function
Error: Store SETUP setting error
Error: Restore SETUP setting error
Error: Cannot analyze ROM file. ROM file may be corrupted
Error: Cannot analyze the ME Data. ROM file may be corrupted
Error: BIOS does not support ME Entire Firmware update
Error: BIOS does not support ME Ignition Firmware update
Error: Invalid EC ROM file
Error: EC ROM file checksum error
Error: Can't enter EC flash mode
Error: Erasing EC flash memory fail
Error: Initial EC programming fail
Error: EC flash data transmit error
Error: Writing EC flash memory fail
Error: Exit EC programming mode fail
Error: ROM Chip ID mismatch
Error: Invalid EC Header Table
Error: EC does not permit BIOS update
Error: BIOS doesn’t support OEMCMD function
Error: Store DMI Data error
Error: Restore DMI Data error
Error: Invalid Activation Key file.
Error: File Size is greater than image activation key length.
Error: Image activation key larger than BIOS activation key.
Error: Activation Key checksum error.
Error: No Support Activation Key error.
Error: OA key is available, and OA Key is not the same as BIN file in the system.
Error: OA key is empty.
Error: OA key region incorrect.
Error: BIOS doesn’t support Clear event log function.
Error: Clear event log error.
Error: Rom image layout detected RomHole is redesigned.
Error: BIOS have more than one RomHole’s GUID is the same.
Error: Requested Rom Hole not available in ROM file.
Error: RomHoles in ROM image file do not match those in the system.
Error: OA key is available, and OA Key is the same as BIN file in the system.
Error: BIOS doesn’t support process ME information
Error: BIOS return error, when trying to re-flash ME Firmware data.
Error: Region is write-protected
Error: No EC blocks found in system ROM.
Error: BIOS doesn’t support all ROM flashing function.
Error: OA key data is invalid.
Error: BIOS has already updated OA.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 30 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0xD2
0xD3
0xD4
0xD5

Error: BIOS does not allow updating OA.
Error: BIOS doesn’t support updating OA.
Error: The DMI data size of system is greater than File's DMI data length.
Error: BIOS doesn't support EC Battery Check function.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 31 of 32

American Megatrends, Inc.
Aptio AFU User Guide

FQA

The Error Message Information of ROM
AFU has added the check mechanism of ROM information. AFU would compare the information between
updated ROM and on board ROM. If these ROMs have different information, AFU will show the error of 0x4C.
AMI extremely suggest users to stop choosing “Continue to update” if users do not comprehend ROM structure
very much. The system will be crashed after BIOS update because of ROM information difference.

Windows requires a digitally signed driver

This issue is resolved by a security fix provided by MS. KB3033929 resolves this issue. The certificate used to sign
the driver is higher security and older versions of Win7 don’t support it.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 32 of 32


AMI AFU For Aptio 4.rar > readme.txt

AFU (AMI Firmware Update) is a package of utilities used
to update the system BIOS under various operating systems.

Note: AFU only works for APTIO with SMI FLASH support.
Compatible with Aptio 3, 4, and 4.5.

The package includes:

- AFUWINx64 3.09.03.1462
- AFUWINGUIx64 3.09.03.1462
- AFU User Guide

To run, extract all of the files from the folder with the name corresponding to the desired operating system.


Usage (applies to AFUWIN, AFUDOS, AFUEFI and AFUEFI64...
for usage of AFUBSD and AFULNX see help files provided in their folders):
------------------------------------------------------------------
AFUEFI & lt; BIOS ROM File Name & gt; [Option 1] [Option 2]
Or
AFUEFI & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AFUEFI & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O Save current ROM image to file
- /U Display ROM File's ROMID
- /S Refer to Options: /S
- /D Verification test of given ROM File without flashing BIOS.
- /OAD Refer to Options: /OAD
- /A Refer to Options: /A
- /CLNEVNLOG Refer to Options: /CLNEVNLOG
Options
The optional field used to supply more information for flashing BIOS ROM. Following lists the supported optional parameters and format:
- /CLRCFG Program without preserving setup configuration
- /BCPALL Save all question values before flash
- /DPC Don't Check Aptio 4 and Aptio 5 platform.
- /MEUL: Program ME Entire Firmware Block, which supports
Production.BIN and PreProduction.BIN files.
- /Q Silent execution
- /X Don't Check ROM ID
- /CAF Compare ROM file's data with Systems is different or
not, if not then cancel related update.
- /S Display current system's ROMID
- /JBC Don't Check AC adapter and battery
- /HOLEOUT: Save specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLEOUT:GUID
- /SP Preserve Setup setting.
- /Rn Preserve SMBIOS type N during programming(n=0-255)
- /R Preserve ALL SMBIOS structure during programming
- /B Program Boot Block
- /P Program Main BIOS
- /K Program all non-critical blocks.
- /N Program NVRAM
- /Kn Program n'th non-critical block(n=0-15).
- /HOLE: Update specific ROM Hole according to RomHole GUID.
NewRomHole1.BIN /HOLE:GUID
- /L Program all ROM Holes.
- /Ln Program n'th ROM Hole only(n=0-15).
- /E Program Embedded Controller Block.
- /OAD Delete Oem Activation key
- /A Oem Activation file
- /E Program Embedded Controller Block
- /ECUF Update EC BIOS when newer version is detected.
- /ME Program ME Entire Firmware Block.
- /MEUF Program ME Ignition Firmware Block.
- /CLNEVNLOG Clear Event Log.
- /CAPSULE Override Secure Flash policy to Capsule
- /RECOVERY Override Secure Flash policy to Recovery
- /EC Program Embedded Controller Block. (Flash Type)
- /CMD: Send special command to BIOS. /CMD:{xxx, xxx, xxx}
- /OEMCMD: Send special value to BIOS. /OEMCMD:xxx
- /REBOOT Reboot after programming.
- /SHUTDOWN Shutdown after programming.
- /FDR Flash Flash-Descriptor Region.(*1)
- /GBER Flash GBE Region.(*1)
- /MER Flash Entire ME Region.(*1)
- /OPR Flash Operation Region of SPS.(*1)
- /PDR Flash PDR Region.(*1)

(*1)If BIOS ME Module have report, AFU will be show this command.

Rules
- Any parameter encolsed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options].
- Main BIOS image is default flashing area if no any option present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.


AMI AFU For Aptio 4.rar > AMI_Aptio_AFU_User_Guide_NDA.pdf

AMI Software Utility User Guide

Aptio AFU User Guide
Document Revision 1.11
Apr 28, 2017
Confidential, NDA Required
Copyright © 2017
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All Rights Reserved
Property of American Megatrends, Inc.

American Megatrends, Inc.
Aptio AFU User Guide

Legal
Disclaimer
This publication contains proprietary information which is protected by copyright. No part of this publication
may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language,
or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends,
Inc. American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without
notice.
For Additional Information
Call American Megatrends, Inc. at 1-800-828-9264 for additional information.
Limitations of Liability
In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever,
whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the
support materials provided with the product.
Limited Warranty
No warranties are made, either expressed or implied, with regard to the contents of this work, its
merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and
omissions or for the uses made of the material contained herein or reader decisions based on such use.
Trademark and Copyright Acknowledgments
Copyright © 2017 American Megatrends, Inc. All Rights Reserved.
American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)
All product names used in this publication are for identification purposes only and are trademarks of their
respective companies.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 2 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Table of Contents
Aptio AFU User Guide ................................................................................................................................................ 1
Legal .......................................................................................................................................................................... 2
Table of Contents ....................................................................................................................................................... 3
Document Information .............................................................................................................................................. 5
Purpose .......................................................................................................................................................................... 5
Audience ........................................................................................................................................................................ 5
Change History ............................................................................................................................................................... 5
Introduction ............................................................................................................................................................... 6
Overview ........................................................................................................................................................................ 6
AFU APTIO Features ....................................................................................................................................................... 6
Requirements ................................................................................................................................................................. 6
Supported Operating System ..................................................................................................................................... 6
Firmware Requirements ............................................................................................................................................. 7
Getting Started .......................................................................................................................................................... 8
Installation ..................................................................................................................................................................... 8
AFUAPTIO Operation ................................................................................................................................................. 9
Overview ........................................................................................................................................................................ 9
Commands and Options............................................................................................................................................... 10
Usage ....................................................................................................................................................................... 10
Commands ............................................................................................................................................................... 10
Options ..................................................................................................................................................................... 11
Rules ......................................................................................................................................................................... 12
Usage ....................................................................................................................................................................... 13
Overview ...................................................................................................................................................................... 13
AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] … ................................................................................ 13
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt; ................................................................................................. 15
AfuEfix64 & lt; Command & gt; ................................................................................................................................................ 15
AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt; ............................................................... 16
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt; .............................................................................................. 16
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt; ..................................................................................... 17
Remarks ................................................................................................................................................................... 18
Overview ...................................................................................................................................................................... 18
Preserving Setup Setting – /SP ..................................................................................................................................... 18
Preserving SMBIOS – /R and /Rn ................................................................................................................................. 19
Programming NVRAM Region – /N .............................................................................................................................. 19

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 3 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Programming Specific NCB Block – /Kn ....................................................................................................................... 19
Programming Specific ROM Hole – /Ln ........................................................................................................................ 19
Secured Flash Update – /CAPSULE and /RECOVERY .................................................................................................... 20
Send special command to BIOS – /CMD:{xxx}.............................................................................................................. 21
Linux Pre-Requisites ................................................................................................................................................. 22
Signing Driver and Enrolling Public Key to the System ............................................................................................. 24
Support Table .......................................................................................................................................................... 26
Command/Option Support in Each Mode ................................................................................................................... 26
Error Codes .............................................................................................................................................................. 28
Error Code Definition ................................................................................................................................................... 28
FQA .......................................................................................................................................................................... 32
The Error Message Information of ROM ...................................................................................................................... 32
Windows requires a digitally signed driver .................................................................................................................. 32

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 4 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Document Information

Purpose
This document provides information to use the Aptio AFU for updating system BIOS.

Audience
Generic BIOS Engineers, OEM Engineers, and Aptio Customers.

Change History
Date

Revision

2013-11-19
2014-03-20
2014-04-24

1.00
1.01
1.02

2014-08-22

1.03

2014-11-11
2015-01-30
2015-06-22
2015-11-18

1.04
1.05
1.06
1.07

2016-02-02

1.08

2016-03-25

1.09

2016-10-18

1.10

2017-04-28

1.11

Description
Initial document created and update content to latest released of Afu
Modified 0x18、0xB6、0xB7、0xBF、0xD0 error message text.
Added error message 0x34、0x35.
Added new commands for /meul and /JBC.
Need to be updated the SmiFlash module to 5.001_SmiFlash_13.
Added Windows 2012 R2 in the support list.
Added new’s command /cmd:.
Removed Microsoft®DOS support.
Added Linux Xen note.
Added 0x4A、0x4B error message text.
Added DOS does not support note.
Added an announcement: Linux does not support Secure Boot
Added support Linux Secure Boot.
Added /CLRCFG, /BCPALL, /DPC command.
Added 0x36, 0x37, 0x4C, 0x71 error messages.
Added 0x4C, ROMLayout change error messages.
Added answer for Windows digitally signed driver.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 5 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Introduction

Overview

A

FU (AMI Firmware Update) is a package of utilities used to update the system BIOS under various operating
systems. AFU only works for APTIO with SMI FLASH support.

AFU APTIO Features
This list of features is supported by command line, command prompt, EFI Shell, or BSD/Linux shell.


Read system ROM image



Flash ROM image



Command line operating

Requirements
Supported Operating System
AFU is supported by the following operating systems:
















Microsoft® Windows® 2000
Microsoft® Windows® XP
Microsoft® Windows® 2003
Microsoft® Windows® Server 2008 R2
Microsoft® Windows® Server 2012 R2
Microsoft® Windows® Vista
Microsoft® Windows® 7
Microsoft® Windows® 8
Microsoft® Windows® 8.1
Microsoft® Windows® 10
Microsoft® Windows® PE
EFI Shell Environment
BSD
Linux(*1)
MS-DOS(*2)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 6 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Note:
*1. On Linux Xen environment, AFULNX must be executed in host desktop (Domain 0) of the virtual machine.
*2. DOS version is stopped supporting in AFU 3.08 or later version.

Firmware Requirements


Compatible with Aptio 3, 4, and 4.5.



Requires that the current installed firmware has SMI flashing support enabled.



For supporting Secure Flash, the following eModules are required:
- Secure Flash Pkg (4.6.5.1_SECMOD_003 or later)
- CryptoPkg (4.6.5_CRYPTOAPI_0003 or later)
- Capsule (4.5.6_Capsule_00 or later)
- SMIFlash (4.6.3.6_SMIFLASH_23 or later)
- OFBD (4.6.3.2_OFBD_1.0.2 or later)
- OFBD Secure Flash (4.6.5.0_OFBD_SECURE_FLASH_0.0.5 or later)

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 7 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Getting Started

Installation
To run, extract all of the files from the folder with the name corresponding to the desired operating
system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 8 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AFUAPTIO Operation

Overview
This mostly involves documenting all the SDL tokens and eLinks. This chapter explains the operation
of AFUAPTIO.
The AFUAPTIO operation mode includes all of the AFUAPTIO features such as saving current ROM
image to file, getting and displaying ROM ID from BIOS ROM file.
An example of AFUEFIX64 that getting and displaying ROM ID from BIOS ROM file command screen
are shown below:

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 9 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Commands and Options
The following list is to offer you an overview of the commands and options provided by AFUAPTIO.
The content can also be found in AFUAPTIO’s help information. A more detailed usage of the
commands and options will be explained in the next chapter.

Usage
AfuEfix64 & lt; BIOS ROM File Name & gt; [Option 1] [Option 2] …
Or
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
Or
AfuEfix64 & lt; Command & gt;

BIOS ROM File Name
The mandatory field is used to specify path/filename of the BIOS ROM file with extension.

Commands
The mandatory field is used to select an operation mode.
- /O

Save current ROM image to file

- /U

Get and display ROM ID from BIOS ROM file

- /S

Refer to Option: /S

- /D

Verification test of given ROM File without flashing BIOS.

- /A

Refer to Option: /A

- /OAD

Refer to Option: /OAD

- /CLNEVNLOG Refer to Option: /CLNEVNLOG

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 10 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Options
The optional field is used to supply more information for flashing BIOS ROM. Following lists the
supported optional parameters and format:

- /CLRCFG

Program without preserving setup configuration

-/BCPALL

Save all question values before flash

-/DPC

Don't Check Aptio 4 and Aptio 5 platform.

- /MEUL:

Program ME Entire Firmware Block, which supports Production.BIN and
PreProduction.BIN files.

- /Q

Silent execution

- /X

Do not check ROM ID

- /CAF

Compare ROM file's data with Systems is different or not, if not then cancel
related update.

- /S

Display current system's ROMID

-/JBC

Don't Check AC adapter and battery.

- /HOLEOUT:

Save specific ROM Hole according to given RomHole GUID.

- /SP

Preserve Setup setting.

- /R

Preserve all SMBIOS structures during programming.

- /Rn

Preserve SMBIOS type N during programming.(n=0-255)

- /B

Program Boot Block

- /P

Program main bios image

- /N

Program NVRAM

- /K

Program all non-critical blocks

- /Kn

Program n'th non-critical block (n=0-15)

- /HOLE:

Update specific ROM Hole according to RomHole GUID.

- /L

Program all ROM Holes

- /Ln

Program n'th ROM Hole only (n=0-15)

- /ECUF

Update EC BIOS when newer version is detected.

- /E

Program Embedded Controller block

- /ME

Program ME Entire Firmware Block.

- /MEUF

Program ME Ignition Firmware Block.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 11 of 32

American Megatrends, Inc.
Aptio AFU User Guide

- /A

OEM Activation file.

- /OAD

Delete OEM Activation Key

- /CLNEVNLOG

Clear Event Log.

- /CAPSULE

Override Secure Flash policy by Capsule

- /RECOVERY

Override Secure Flash policy by Recovery

- /EC

Program Embedded Controller Block. (Flash Type)

-/CMD:

Send special command to BIOS. /CMD:{xxx}

- /REBOOT

Reboot after programming.

- /SHUTDOWN

Shutdown after programming.

- /FDR

Flash Flash-Descriptor Region.(*1)

- /GBER

Flash GBE Region.(*1)

- /MER

Flash Entire ME Region.(*1)

- /OPR

Flash Operation Region of SPS.(*1)

- /PDR

Flash PDR Region.(*1)

Note:
*1: If BIOS ME Module reports these commands, AFU will show this command.
To use a command of generic AFU on the Specific platform, please refer the help menu (/?) in generic AFU.

Rules
- Any parameter enclosed by & lt; & gt; is a mandatory field.
- Any parameter enclosed by [ ] is an optional field.
- & lt; Commands & gt; cannot co-exist with any [Options]. They are /O, /U, /D.
- Main BIOS image is default flashing area if no any options present.
- [/REBOOT], [/X], and [/S] will enable [/P] function automatically.
- If [/B] present alone, there is only the Boot Block area to be updated.
- If [/N] present alone, there is only the NVRAM area to be updated.
- If [/E] present alone, there is only the Embedded Controller block to be updated.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 12 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Usage

Overview
The AFUAPTIO offers the following basic command and option usages:




AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AfuEfix64 & lt; Command & gt;

Other usages which are not mentioned in help are:




AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM Hole GUID & gt;
AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;

These usages are explained in more detail in this chapter.

AfuEfix64 & lt; Input or Output File Name & gt; [Option 1] [Option 2] …
The user could put no option or combine multiple options in one command line. Commands cannot
be combined in command line like options unless the command is categorized as both a command
and an option, such as /S and /A.

For option combination case, AFUAPTIO will check its option priority list and execute the options
according to the priority order. Three examples of this usage are provided below.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 13 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; BIOS ROM File Name & gt;

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line would trigger AFUAPTIO to run the default setting which
flashes the system Main Block with the specified BIOS ROM File.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /D /S

Where Output BIOS ROM File Name, the mandatory field is used to specify path/filename of the
BIOS ROM file with extension. /D is to verify the current BIOS and the BIOS ROM File, and /S, which
is categorized as a command and also an option, gets and displays the current system’s ROM ID.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /P /B /N /REBOOT

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line is to flashing current BIOS by BIOS ROM file. /P /B /N are to
specify that the flashing regions are Main Block, Boot Block and NVRAM. /REBOOT is to specify that
reboot action will be performed in this execution. AFUAPTIO would execute the options in the order
of /B, /P, /N and then reboot the system at the end. The order of execution is determined by
AFUAPTIO design.

AfuEfix64 & lt; ME File Name & gt; /ME

Where ME File Name is used to specifying path/filename of the ME file with extension. This
command line programs entire ME block with the specified ME file.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 14 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; Input or Output File Name & gt; & lt; Command & gt;
AFUAPTIO can only execute one command at a time and it does not accept combinations of
command and option in one command line except those can be both command and option. Three
examples of this usage are provided below.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /O

Where BIOS ROM File Name, the mandatory field is used to specify path/filename of the BIOS ROM
file with extension. This command line saves the current ROM image to a file.

AfuEfix64 & lt; Output BIOS ROM File Name & gt; /U

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
This command line gets and displays the ROM ID from the specified BIOS ROM file.

AfuEfix64 & lt; Command & gt;
This command usage is for some commands which do not require inputting any file to complete the
execution. Usually this type of commands accesses the current BIOS only. An example of this usage
is provided:

AfuEfix64 /S

This command line gets and displays the ROM ID of the current BIOS in system.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 15 of 32

American Megatrends, Inc.
Aptio AFU User Guide

AfuEfix64 & lt; ROM Hole File Name & gt; & lt; ROM Hole Option & gt; : & lt; ROM
Hole GUID & gt;
This command usage is for outputting or flashing a certain ROM hole. For example, the command
line for outputting a certain ROM hole whose GUID is 01234567- 89ab- cdef- 0123- 456789abcdef is
as following:

AfuEfix64 & lt; Output ROM Hole File Name & gt; /HOLEOUT:0123456789abcdef0123456789abcdef

Where Output ROM Hole File Name is used to specify path/filename of the output ROM hole file
with extension. The GUID after the option should not contain dashes or spaces in between.

Another example of flashing a certain ROM Hole whose GUID is 01234567- 89ab- cdef- 0123456789abcdef is as following:

AfuEfix64 & lt; ROM Hole File Name & gt; /HOLE:0123456789abcdef0123456789abcdef

Where ROM Hole File Name is used to specify path/filename of the ROM hole file with extension.
Please discard dashes and spaces inside GUID line while typing.

AfuEfix64 & lt; BIOS ROM File Name & gt; & lt; Option & gt; & lt; Number & gt;
This command usage is for /Kn and /Ln commands where n is indicating the numeric order of a
th

certain non-critical block or ROM hole. For example, to program the 4 ROM hole, the command
line could be:

AfuEfix64 & lt; BIOS ROM File Name & gt; /L4

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 16 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension,
th

and 4 is to specify that the 4 ROM hole is the one to perform /L operation.

The next chapter has more detail of the numbering rule of non-critical blocks and ROM holes.

AfuEfix64 & lt; Option /A & gt; & lt; OEM Activation Key Bin File Name & gt;
This command usage is for /A command which insert a specific OEM activation key into the empty
key inside current system BIOS. The command line is as follows:

AfuEfix64 /A & lt; OEM Activation Key Bin File Name & gt;

Where OEM Activation Key Bin File Name is used to specify path/filename of the OEM activation
key file with extension. Please make sure that the OEM Activation Key region is empty before
inserting the key, or please perform /OAD command before insertion.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 17 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Remarks

Overview
This chapter is to describe commands/options which require extra attention and to explain cases
which may occur in certain unique scenarios.

Preserving Setup Setting – /SP
/SP command is designed specifically for “OEM NVRAM/Setup Variable Preserve” module part of
OFBD. If /SP is called, AFUAPTIO would send SMI 0x26 twice to save setup setting before starting
updating NVRAM and to restore setup setting after finishing updating NVRAM. Customer can
customize their OFBD module to preserve certain NVRAM data when AFUAPTIO flashes the NVRAM
area. For example, there are two methods for preserving Setup Password:

Method 1
Enable PRESERVE_PASSWORDS token – The BIOS will preserve its Setup password when AFUAPTIO
calls the SMIFlash module.

Method 2
Control through /SP command – Customer can port PreserveSetupPassword in
OFBDSETUPStoreHandle and RestoreSetupPassword in OFBDSETUPRestoreHandle, and use /SP
command to keep or not to keep the Setup Password while updating the NVRAM:

AfuEfix64 xxx.ROM /N /SP - keep Setup password
AfuEfix64 xxx.ROM /N

- don’t keep Setup password.

This feature needs BIOS’ cooperation. To learn more about preserving setup data, please consult
with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 18 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Preserving SMBIOS – /R and /Rn
If the SMBIOS data is stored in Main Block or Boot Block, AFUAPTIO /R and /Rn options would take
the responsibility to preserve the SMBIOS data. If the SMBIOS data is stored in NVRAM and BIOS
project’s token SMBIOS_PRESERVE_NVRAM=0, the preservation process would take place at OFBD
module. To know more about the detail of preserved data, please consult with your BIOS provider.

/R is used to preserve the whole SMBIOS data. To preserve a certain type of SMBIOS, please use /Rn.
For example, to preserve SMBIOS Type 2 and Type 41 during BIOS flashing and the SMBIOS data is
located in Boot Block, the command could be:
AfuEfix64 & lt; BIOS ROM File Name & gt; /B /R2 /R41

Programming NVRAM Region – /N
Erasing NVRAM may cause important variables lose.

Programming Specific NCB Block – /Kn
/Kn command is designed to program a specific non-critical block, or NCB block. AFUAPTIO would
search ROM and identify the first NCB Block found as K0, and the second one as K1, etc. Therefore,
command /K2 would program the third NCB Block found by AFU.

Programming Specific ROM Hole – /Ln
/Ln command is designed to program a specific ROM Hole. Each ROM Hole is identified in the
following way: AFUAPTIO would search for ROM Holes in the order of Boot Block area and Main
Block area, and identify each ROM Hole in consecutive integers from 0 to 15. So, for example, /L1 is
used to program the second ROM Hole found in ROM.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 19 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Scenarios:
If a ROM contains two ROM Holes in Boot Block area and two in Main Block area,
AFUAPTIO would identify L0 and L1 for the two in Boot Block area and L2 and L3 for the two in Main
Block area.

If a ROM contains 2 ROM Holes in Boot Block area and none in Main Block area, AFUAPTIO
would only find 2 ROM Holes in total and identify them as L0 and L1.

If a ROM contains no ROM Holes in Boot Block area and three in Main Block area,
AFUAPTIO would find nothing in Boot Block area and identify L0, L1 and L2 for the three ROM Holes
in Main Block area.

Secured Flash Update – /CAPSULE and /RECOVERY
For Secured BIOS, the command rule for programming the current BIOS is different. There are two
more modes, Capsule Mode and Recovery Mode, which are different from the regular Runtime
Mode mentioned in the previous contents. Unlike Runtime Mode where all the commands/options
are supported, Capsule Mode and Recovery Mode only support /P, /B, /N, and /E options, or
depending on the BIOS design. The following description explains how to program BIOS under these
two modes.

To override Secure Flash policy and program the BIOS image in Capsule Mode, please use the
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /CAPSULE /P /B /N /E

And to override Secure Flash policy and program the BIOS image in Recovery Mode, please use this
command:
AfuEfix64 & lt; BIOS ROM File Name & gt; /RECOVERY /P /B /N /E

Where BIOS ROM File Name is used to specify path/filename of the BIOS ROM file with extension.
For more detail on Secure Flash, please consult with your BIOS provider.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 20 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Send special command to BIOS – /CMD:{xxx}
Send the string between brackets to OFBD OEM CMD Checking Module. The string is
corresponding to the string which is defined in BIOS by user.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 21 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Linux Pre-Requisites

1. Log in Linux as root otherwise use sudo (if permitted).
2. The compiler suite (gcc) must be installed. If these packages are not installed, the driver CANNOT
be built.
3. For most of the distributions, AFU will generate driver without any notification, if it doesn’t exist
you need to install kernel sources. Also if Initmem fails, Please follow point 4.
4. Kernel sources must be installed, *CONFIGURED*, and then compiled. Following are steps to do
this:
a. Find Running Kernel's Configuration File:
To configure the sources, simply change to the kernel source directory (typically
/lib/modules/$(uname -r)/build). If it doesn't exist, you need to install kernel source.
Typically, the reference configuration for the kernel can be found in the /boot directory with
filename '.config', 'kernel.config', or 'vmlinux-2.4.18-3.config'. Type 'uname -a' and use the
configuration filename that best matches the output from 'uname -a'. Also, check for
/dev/mem directory existence. If it doesn’t exist, you need to install kernel sources.
Normally it comes with the installation unless if the option is deselected.
On some distributions Red Hat for instance, there is a config directory under
/lib/modules/$(uname -r)/build.
Copy this configuration file into the root of the Linux kernel source tree (usually it is
/lib/modules/$(uname -r)/build). This file must be renamed to " .config " (dot config).
b. Make Your AMI Flash Driver (amifldrv_mod.o):
For most distribution, the command to build the driver is:
afulnx_32 /MAKEDRV
Or
afulnx_64 /MAKEDRV

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 22 of 32

American Megatrends, Inc.
Aptio AFU User Guide

If your Linux's kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
afulnx_32 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
Or
afulnx_64 /MAKEDRV KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default path is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
c. Make Your AMI Flash Driver from driver source files (amifldrv_mod.o):
Using command /GENDRV, it will generate driver source files to specific directory.
afulnx_32 /GENDRV [Option 1] [Option 2]
Or
afulnx_64 /GENDRV [Option 1] [Option 2]
Where,
[Option 1]: Specific kernel source 'KERNEL=XXXX' same as the /MAKEDRV
[Option 2]: Specific output directory 'OUTPUT=XXXX'
Generate files as outlined below:
File Name Description
--------------------------------------------------------------------------amiwrap.c Driver source code.
amiwrap.h Driver header.
amifldrv.o_shipped Object file for driver.
Makefile Makefile
--------------------------------------------------------------------------For most distribution, the command to build the driver is: make.
If your Linux’s kernel source tree is under /lib/modules/$(uname -r)/build, instead of being
in the default path '/lib/modules/$(uname -r)/build', then add a KERNEL flag:
make KERNEL=/lib/modules/$(uname -r)/build
If KERNEL is omitted, the default is /lib/modules/$(uname -r)/build.
This should work for MOST distributions.
d. Check Your Build:
Check the version of running Linux kernel with 'uname -r'.
Check the version of amifldrv_mod.o with 'modinfo amifdrv_mod.o'.
If they mismatch, you will need to select the correct configuration
File (.config), rebuild your kernel, and then rebuild your driver as described in steps a, b, c
and d.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 23 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Signing Driver and Enrolling Public Key to the System

The following prerequisites are needed on the build system to sign the driver:
1. Login to Linux OS as root otherwise use sudo.
2. The compiler suite (gcc) must be installed. If it’s not installed, the AFU driver cannot be built.
3. OpenSSL: Needed to generate cryptographic keys. OpenSSL tool can be downloaded from
https://www.openssl.org
4. Perl interpreter: Needed to run the signing script. Perl tool can be downloaded from
https://www.perl.org

Follow the below steps to sign the driver:
1. Boot to Linux OS.
2. Generate a Public and Private key pair using below openssl command: & gt; openssl req -x509 new -nodes -utf8 -sha256 -days 36500 -batch -configconfiguration_file.config -outform DER -out
public_key.der -keyout private_key.priv
Note: The configuration file configuration_file.config must be created with the required
information before running the command. A sample configuration file is shown below. The
values in & lt; & gt; must be filled with actual values.
configuration_file.config:
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = myexts
[ req_distinguished_name ]
O = & lt; organization_name & gt;
CN = & lt; organization_name & gt; Signing Key
emailAddress = & lt; email_address & gt;
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 24 of 32

American Megatrends, Inc.
Aptio AFU User Guide

3. Build AFU driver using below command. The driver will be generated in the current directory
with name amifldrv_mod.o.
& gt; afulnx_64 /MAKEDRV
4. Execute below command to sign driver with the key generated in step 2.
& gt; perl /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 private_key.priv
public_key.der amifldrv_mod.o
5. Request addition of public key to MOK list using mokutil. The command will prompt a
password which will be needed during public key enrollment in next step.
& gt; mokutil --import public_key.der
6. Reboot the system which will launch MOK manager application to complete public key
enrollment.
7. Once the public key enrollment is done, Boot to OS and execute below command to ensure
the newly added key is available in system key ring.
& gt; keyctl list %:.system_keyring
8. Install signed driver using insmod command.
& gt; insmod amifldrv_mod.o
9. Ensure it is loaded successfully using lsmod command.
Reference: https://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modulesfor-secure-boot.html

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 25 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Support Table

Command/Option Support in Each Mode
Command
/O
/U
/S
/D
/A
/OAD
/CLNEVNLOG

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported

Option
/MEUL
/Q
/X
/CAF
/S
/JBC
/SP
/R
/Rn
/B
/P
/N
/K
/Kn
/HOLE:
/HOLEOUT:
/L
/Ln
/ECUF
/E
/ME
/MEUF
/A
/OAD

Runtime Mode
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported ( *1 )
Supported ( *1 )
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Not Supported
Supported
Not Supported
Not Supported
Not Supported
Not Supported

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 26 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Option
/CLNEVNLOG
/EC
/REBOOT
/SHUTDOWN

Runtime Mode
Supported
Supported
Supported
Supported

Capsule Mode
Not Supported
Not Supported
Not Supported
Not Supported

Recovery Mode
Not Supported
Not Supported
Not Supported
Not Supported

Note:
* 1: This option must use with either /P or /B in order to be supported under Capsule Mode.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 27 of 32

American Megatrends, Inc.
Aptio AFU User Guide

Error Codes

Error Code Definition
CODE
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0X0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
0x17
0x18
0x19
0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0x20
0x21

Definition
Error: Unknown command.
Error: BIOS has no flash information available.
Error: ROM file size does not match existing BIOS size.
Error: ROM file ROMID is not compatible with existing BIOS ROMID.
Error: Bootblock error.
Error: This BIOS version has more Non-Critical blocks than supported.
Error: BIOS checksum error.
Error: Invalid option
Error: Size of ROM file does not match the size of system ROM
Error: Unable to update ROM hole
Error: ROMHOLE not exist
Error: BIOS update cancelled by user.
Error: BIOS Report Error.
Error: Kernel source files cannot be found.
Error: Size of PLDM file is more than the FV size.
Error: Unable to load driver.
Error: Unable to unload driver.
Error: No non-critical blocks found in ROM file.
Error: Requested non-critical block not available in ROM file.
Error: Non-critical blocks in ROM image file do not match those in the system.
Error: Secure Flash function is not supported on this platform.
Error: Unable to get Secure Flash policy from BIOS.
Error: Unsupported Secure Flash policy.
Error: Secure Flash Rom Verify fail.
Error: Failed to erase flash chip (at Runtime Secure Flash).
Error: Failed to update flash chip (at Runtime Secure Flash).
Error: Failed to read flash chip (at Runtime Secure Flash).
Error: Failed to verify flash chip (at Runtime Secure Flash).
Error: Failed to load image into memory.
Error: Secure Flash function is not supported on this file.
Error: Reserved for Secure Flash.
Error: Unable to initialize memory manager.
Error: Unable to close memory manager.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 28 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x22
0x23
0x24
0x25
0x26
0x27
0x28
0x29
0x30
0x31
0x32
0x33
0x34
0x35
0x36
0x37
0x40
0x41
0x42
0x43
0x44
0x45
0x46
0x47
0x48
0x49
0x4A
0x4B
0x4C
0x50
0x60
0x61
0x70
0x71
0x80
0x81
0x82
0x90
0x91
0x92
0x93
0x94
0x95
0x96
0x97
0x98

Error: Problem allocating memory.
Error: Problem freeing memory.
Error: Problem allocating BIOS buffer.
Error: Problem freeing BIOS buffer.
Error: Problem freeing mapping BIOS.
Error: Problem freeing unmapping BIOS.
Error: Problem mapping BIOS data.
Error: Problem unmapping BIOS data.
Error: Problem opening file for reading.
Error: Problem reading file.
Error: Problem opening file to write.
Error: Problem writing file.
Error: Using the wrong AFU version, Please use Aptio 4 AFU.
Error: Using the wrong AFU version, Please use Aptio 5 AFU.
Error: Fail with problem of ESP Driver init.
Error: Fail with problem of copy ROM file to ESP driver.
Error: BIOS is write-protected.
Error: Can not close flash interface.
Error: Problem reading flash.
Error: Problem erasing flash.
Error: Problem writing flash.
Error: Problem verifying flash.
Error: Problem getting flash information.
Error: No firmware id.
Error: Power cord not connected. Plug in power cord to flash.
Error: A platform condition has prevented flashing.
Error: Platform data is not empty, And data address is not Alignment Block Address.
Error: SLP key is not empty at all.
Error: Rom file ROM layout is changed.
Error: This program must be run in MS-DOS mode.
Error: Accessing registry.
Error: Program already running.
Error: BSD access IO.
Error: Linux does not support Auto Build Driver when Secure Boot Enable.
Error: Size of system ROM mismatches size of ROM file
Error: ROM ID mismatch
Error: Bootblock checksum error
Error: Error to shutdown
Error: Error to restart...
Error: Can't open ROM ID file
Error: ROM ID file is not a ROM file.
Error: Invalid MAC address
Error: Invalid load current CMOS option
Error: Invalid retry count
Error: Invalid defined ROM ID length
Error: Invalid SMI

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 29 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0x99
0x9A
0x9B
0x9C
0x9D
0x9E
0x9F
0xA0
0xA1
0xA2
0xA3
0xA4
0xA5
0xA6
0xA7
0xA8
0xA9
0xAA
0xAB
0xAC
0xAD
0xAE
0xAF
0xB0
0xB1
0xB2
0xB3
0xB4
0xB5
0xB6
0xB7
0xB8
0xB9
0xBA
0xBB
0xBC
0xBD
0xBE
0xBF
0xC0
0xC1
0xC2
0xC6
0xC7
0xD0
0xD1

Error: ROM File ID don't exist
Error: System ROM ID don't exist
Error: Password Retry count exceeded.
Error: BIOS don't support NVRAM/SETUP preserve function
Error: Store SETUP setting error
Error: Restore SETUP setting error
Error: Cannot analyze ROM file. ROM file may be corrupted
Error: Cannot analyze the ME Data. ROM file may be corrupted
Error: BIOS does not support ME Entire Firmware update
Error: BIOS does not support ME Ignition Firmware update
Error: Invalid EC ROM file
Error: EC ROM file checksum error
Error: Can't enter EC flash mode
Error: Erasing EC flash memory fail
Error: Initial EC programming fail
Error: EC flash data transmit error
Error: Writing EC flash memory fail
Error: Exit EC programming mode fail
Error: ROM Chip ID mismatch
Error: Invalid EC Header Table
Error: EC does not permit BIOS update
Error: BIOS doesn’t support OEMCMD function
Error: Store DMI Data error
Error: Restore DMI Data error
Error: Invalid Activation Key file.
Error: File Size is greater than image activation key length.
Error: Image activation key larger than BIOS activation key.
Error: Activation Key checksum error.
Error: No Support Activation Key error.
Error: OA key is available, and OA Key is not the same as BIN file in the system.
Error: OA key is empty.
Error: OA key region incorrect.
Error: BIOS doesn’t support Clear event log function.
Error: Clear event log error.
Error: Rom image layout detected RomHole is redesigned.
Error: BIOS have more than one RomHole’s GUID is the same.
Error: Requested Rom Hole not available in ROM file.
Error: RomHoles in ROM image file do not match those in the system.
Error: OA key is available, and OA Key is the same as BIN file in the system.
Error: BIOS doesn’t support process ME information
Error: BIOS return error, when trying to re-flash ME Firmware data.
Error: Region is write-protected
Error: No EC blocks found in system ROM.
Error: BIOS doesn’t support all ROM flashing function.
Error: OA key data is invalid.
Error: BIOS has already updated OA.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 30 of 32

American Megatrends, Inc.
Aptio AFU User Guide

0xD2
0xD3
0xD4
0xD5

Error: BIOS does not allow updating OA.
Error: BIOS doesn’t support updating OA.
Error: The DMI data size of system is greater than File's DMI data length.
Error: BIOS doesn't support EC Battery Check function.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 31 of 32

American Megatrends, Inc.
Aptio AFU User Guide

FQA

The Error Message Information of ROM
AFU has added the check mechanism of ROM information. AFU would compare the information between
updated ROM and on board ROM. If these ROMs have different information, AFU will show the error of 0x4C.
AMI extremely suggest users to stop choosing “Continue to update” if users do not comprehend ROM structure
very much. The system will be crashed after BIOS update because of ROM information difference.

Windows requires a digitally signed driver

This issue is resolved by a security fix provided by MS. KB3033929 resolves this issue. The certificate used to sign
the driver is higher security and older versions of Win7 don’t support it.

Copyright © 2017
American Megatrends Inc. ● Confidential, NDA Required

Page 32 of 32