AMI ROM Tool - AFUEFI

Description :
	AMI Firmware Update utility(APTIO) for EFI SHELL.

Release Date :
	2018-03-29

Source Control Location :
	SS: AptioV;$/AptioV/RomUtils/Afu/AfuEfi/64;

Reference Document :	
	readme.txt
	AMI_Aptio_5.x_AFU_User_Guide_NDA.pdf

Known Issues :
	Use "/Rn" parameter will have no effect or caused an exception error, when 
	the SMBIOS module version is between "4.6.1_ALPHA_01.26.2_DMIRW_TEST" and 
	"(INT)4.6.1_ALPHA_01.29_Type39".

Release Notes:
==============================================================================
5.10.01.1648
Issues Fixed
	Fixed issue where PS2 keyboard / mouse cannot be used normally under EFI Shell.
	Fixed issue where ROM Layout Change option list will not be displayed when commands are /capsule, /recovery, and /D.
	Fixed issue where AFU will not inspect ROM Layout Change if ROM file or on-board BIOS cannot be got ROM Layout FFS data. [EIP394360] 
Rule Changes
	Changed title when ROM Layout Change, the title would become as following:
		Press \"E\" - This option will update entire ROM and exit.
		Press \"A\" - This option will be no ROM update.
		Press \"F\" - This option will be forcing to follow the command by user provided.
	Modified to inspect the mechanism of BIN file of ME + BIOS. [EIP381008]
	[LNX]Modified the order of Linux loading driver. [EIP398938]
==============================================================================
5.10.00.1615
Issues Fixed
	Fixed issue OAD command can't delete OA Key.
==============================================================================
5.10.00.1610
New Features
	Added a mechanism that tool will provide 3 options, “(F)Force, (E)Exit, (A)All” when ROM layout change. [EIP353462]
	Added a scenario that is while performing APL and FTF EMMC mode, tool only can use /p /n /e /a
	Added 2 error messages in APL EMMC mode.
	Error: EMMC Mode cannot be used runtime flash command, please use capsule or recovery to update BIOS.
 	Error: Capsule and Recovery command cannot be used together.
	Added OFBD OAKEY Statue Flag.
	Added OFBD OAKEY Func Flag.
	Added a mechanism that tool cannot use command /p /b /n to update BIOS in runtime flash if the system is EMMC.
	Added command /a in Fault Tolerance Flash EMMC mode. [EIP373363]
	Added command /OAD in Fault Tolerance Flash EMMC mode. [EIP373363]
	Added a retry mechanism for ME Flash. [EIP375769]
	Added to use Fault Tolerance Flash when Secure Flash is disabled. [EIP382585]
	Added a mechanism to detect BIN file size of “BIOS+ME”. [EIP381008]
	Added command /pw: to general command list.
	Added more detailed descriptions of error message if parameter only has command /Recovery or /Capsule. [EIP353002]
	Added a string which is “Process completed” when a process has done successfully. [EIP385941]
Driver Updates
	[LNX] Added that tool supports Linux kernel 4.13. [EIP369928, EIP370558, EIP372572, EIP377663]
Rule Changes
	Changed Copyright to 2018.
	Removed command “/caf”, “/clnevnlog”, and “/meuf”.
	Changed the flash process of command /a. When OA is OA Block in single BIN file, the tool will skip the behavior of Reading Flash. [EIP350874]
	Changed the process of OA OFBD update under Fault Tolerance Flash EMMC mode. [EIP373363]
	Changed that AFU will not read SPI ROM data when the tool does ME flash individually.
	Changed command /A to /A:.	
	[LNX] Changed that using Linux Driver to map ACPI table. [EIP379929]
Issues Fixed
	Fixed issue where using Flash Lib Read API ROM cannot retry. [EIP375769]
	Fixed issue where JBC cannot be used before adjusting the order of module.
	Fixed issue where reading NCB will cause the accumulation problem.
	[LNX] Fixed issue where UCP will show error message of UAF when users are loading AFU Linux.
==============================================================================
5.09.04.1503
	[AFU][Added] 
	1.Added to support Coffee Lake ME flash.
	[AFU][Changed] 
	1.Updated PLDM SCE Library.
	2.Changed if using command /p /n, AFU will do Flash All for APL platform.
	[Windows GUI][Fixed]
	1.Fixed issue where WINGUI ROM file ID and ROM file Path show garbled.
	[PLDM Library List]
	UefiLib 32:
	NvramImageLibEfi.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/NvramLib/NvramLibEfi/Ia32;(INT)NvramLibEfi_STDLIB-1.0.2_9
	SceEfiLib32.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/AmiSce/SceEfi/Ia32; (INT)SceEfi_5_03_1112
	UefiLib 64:
	NvramImageLibEfiX64.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/NvramLib/NvramLibEfi/X64;(INT)NvramLibEfi_STDLIB-1.0.2_9
	SceEfiLib64.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/AmiSce/SceEfi/X64; (INT)SceEfi_5_03_1112
	WinLib 32:
	NVRAMImageLibWin.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/NvramLib/NvramLibWin/Ia32; (INT)NvramLibWin-1.0.2_8
	SceWinLib32.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/AmiSce/SceWin/Ia32; (INT)SceWin_5_03_1112
	WinLib 64:
	NVRAMImageLibWinX64.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/NvramLib/NvramLibWin/X64; (INT)NvramLibWin-1.0.2_8
	SceWinLib64.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/AmiSce/SceWin/X64; (INT)SceWin_5_03_1112
	LnxLib 32:
	NvramLibLnx.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/NvramLib/NvramLibLnx/Ia32; (INT)NvramLibLnx-1.0.2_8
	SceLnxLib32.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/AmiSce/SceLnx/Ia32; (INT)SceLnx_5_03_1112
	LnxLib 64:
	NvramLibLnxX64.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/NvramLib/NvramLibLnx/X64; (INT)NvramLibLnx-1.0.2_8
	SceLnxLib64.lib => $/AptioV/RomUtils/Eta2/Binary/Modules/AmiSce/SceLnx/X64; ((INT)SceLnx_5_03_1112
==============================================================================
5.09.03.1470
	[AFU][Fixed]
	1. Fixed issue where tool will have a chance to search scope which is over 
	   than original setting and will be crashed when using command /r or /rn.[EIP353984]
	[Windows GUI][Added]
	1.Added support ApolloLake platform flash.[EIP352902]
	[Windows GUI][Fixed]
	1.Fixed issue where entering password will cause system feedback incorrect issue.[EIP351719]
==============================================================================
5.09.03.1456
	[AFU][Changed]
	1.Changed that will not check ACPI's WSMT table.[EIP354442, EIP346731]
==============================================================================
5.09.03.1448
	[AFU][Fixed]
	1.Fixed issue where FaultToleranceFlash will be flashed to wrong block.
	[AFU][Changed]
	1.Changed that command /CAF removed to write back _FVH command /caf.
==============================================================================
5.09.03.1445
	[AFU][Fixed]
	1.Fixed issue where an error of ME detection on APL platform.
	2.Fixed issue where when FaultToleranceFlash is enable in APL which will execute the process of FaultToleranceFlash.
	
	[AFU][Added] 
	1.Added OEMCMD command.[EIP334724]
	2.Added that PLDM will not generate a PldmData.bin when platform does not support BCP (BiosConfigPreserve) module.[EIP346731]
	3.Added that PLDM will not generate a PldmData.bin when platform supports BCP (BiosConfigPreserve) 
	  module and Token ENABLE_FV_BCP_SUPPORT = 1.
	
	[AFU][Changed]
	1.Changed AFU will not calculate FID again when OA key in NCB. [EIP325353]
	2.Changed only GetPattern can be enabled in the block of BIOS flash. [EIP326007]
	3.Changed that AFU can support Block size is over 64KB with above 32MB BIOS by structure of sROMInfoEX. [EIP340328]
	4.Changed that the system will look for ACPI table whether is support or not before using WSMT.
	5.Changed that cannot use SMI for updating OA to ACPI table directly under WSMT state. [EIP333352, EIP340049]
	6.Changed that PLDM fail error message.
	7.Changed that it is no function for command /reboot or /shutdown when combines /capsule or/recovery together.
==============================================================================
5.09.02.1384
	[AFU][Fixed]
	1. Fixed issue where cannot inspect smaller block size of every flash during verification phase. [EIP306554]
	2. Fixed issue where command /r and /rn cannot preserve data. [EIP327552]
	3. Fixed issue where flashing NCB will not be ended when have error. 
	4. Fixed issue where PLDM cannot be workable for some RC related options. [EIP314849]
	5. Fixed issue where cannot update OA3 when the /A is an optional command. [EIP331115]

	[AFU][Added] 
	1. Added 64 MB ROM support, but need to have new version of SMIFlash module. [EIP308819, EIP314202, EIP297537, EIP297539]
	2. Added when detect multi-ROM ID, AFU will only adopt the ROM ID data of boot block. 
	3. Added Apollo Lake Normal Flash and Fault Tolerance Flash. [EIP314749]
        
	[AFU][Changed]
	1. Changed the error message of ROM layout change.
	2. Update ROM layout checking rule if the FFS header is not matched, which will continue to compare with FFS data. [EIP327457]
	3. Modified the description of error code 0xB6 0xB7 0xBF.

	[EFI][Added]
	1. Added PLDM EFI platform support.
==============================================================================
5.09.01.1317
	[AFU][Fixed]
	1. Fixed issue where using AFU types file name without any command, 
	   AFU will automatically use command /p as the default setting but will 
       not execute getpattern.
	2. Fixed Kn issue where when the size of bin file is bigger than Block size, 
	   AFU will only flash the data of bin file which equals the data of block size. 
	   Others, will be ignored.
	3. Fixed PLDM issue where AFU cannot execute when system cannot look for smi variable.
	[AFU][Added]
	1. Added WSMT support.
	[AFU][Changed]
	1. Changed NCB /K /Kn for which when detecting to use a BIOS, AFU will 
	   flash the BIOS by using secure flash to upload the verification.
	2. Changed RomHole /R /Rn for which when detecting to use a BIOS, 
	   AFU will flash the BIOS by using secure flash to upload the verification.
	[AFU][Improved]
	1. Improved the solution of search cap header. [EIP304238]
	[Linux][Added]
	1. Added PLDM support into Linux.
==============================================================================
5.09.00.1284
	[AFU][Fixed]
	1.Fixed issue where system has FFS check sum error when insufficient size of FV.[EIP268717]
	2.Fixed issue where /caf command has to add _FVH.[EIP271440] 

	[AFU][Added]
	1.Added getpattern check function.[EIP250565] 
	2.Added DPC command which can skip A4 and A5 check.[EIP273186] 
	3.Added COPY ROM TO ESP DISK function.[EIP247139] 
	4.Added secure boot error ID.[EIP247139]

	[Windows][Added]
	1.Added PLDM module into AFU.[EIP277472]

	[Linux][Added]
	1.Added flash support when Linux secure boot enable.[EIP248314] 

	[Linux][Changed]
	2.Changed Help menu to added /makedrv and /gendrv. 

	[Windows GUI][Added]
	1.Added multi-language, Traditional Chinese, Simplified Chinese, and Korean, for AFUWINGUI.[EIP253971][EIP259139]
==============================================================================
5.08.02.1189
	[AFU][Fixed]
	1. Fixed issue where MEUL CAPSULE does not execute normally.
	2. Fixed issue where when BIOS does not include SLP Key, the function of checking 
	   SLP will inspect the size, which results in AFU crash. [EIP258017][EIP258384][EIP258901][EIP257903]
	3. Fixed issue where AFU cannot write verify when Block size is 64KB. [EIP242783]
	4. Fixed issue where always display Error of 0x4A when using /hole:<GUID>. [EIP259374]
	5. Fixed issue where cannot Write and Verify when inspect Data is Aligment.

	[AFU][Added]
	1. Added support more ME region.[EIP256965]
		
	[AFU][Changed]
	1. Changed the file size of modifying MEUL as the size of default memory of MEUL.
		
	[Windows GUI][Fixed]
	1. Fixed issue where AFUWINGUI cannot get Core Version, Project Version, Firmware ID, and Firmware GUID.
	2. Fixed issue where the boundary of right side interface in Windows 10 by AFUWINGUI.
	3. Fixed issue where AFUWINGUI Copyright is 2016.

	[Linux][Fixed]
	1. Fixed issue where the error of Linux when using /makedrv and /gendrv.
==============================================================================
5.08.01.1167
	[AFU][Fixed]
	01. Fixed issue where /hole:<SLP GUID> always replies an error of 0x4B Error: SLP key is not empty at all. [EIP254169]
	02. Fixed issue where GetPattern will not display the error message.
	03. Fixed issue where tool cannot update MSDN immediately when OA3.0 using FID location. [EIP253279]

	[Windows][Fixed]
	01. Fixed issue where AFUWIN using /A will result in system crash issue. [EIP253279]
==============================================================================	
5.08.01
	[AFU][Fixed]
	01. Fixed issue where /p /b detect SLP Data whether is NULL or not.
	02. Fixed issue where sending twice smi0x20/0x24 when recovery and capsule. [EIP248734]
	03. Fixed issue where AFU results in memory overloading by ME DATA Check when 
	    ROM file is less than FLASH_PAGE_SIZE. [EIP225601]
	04. Fixed issue where simultaneously Buffering will make the wrong size simultaneously 
	    which results in wrong data of Flash buffer. [EIP232707]
	05. Fixed issue where Verify module cannot show ROM size fail.		
	06. Fixed issue where 2+2Mode cannot pass through verification of Secure flash.
	07. Fixed issue where system cannot stop when GetPatternrom finds out errors.
	
	[AFU][Added]
	01. Added ETA_BUILD Usagehead which can add a string of "Manufacture".
	02. Added error message of write-once. [EIP243432] 
	03. Added SKL platform whcih can use PS2 keyboard to input password in EFI.
	04. Added /A and /OAD which add 2+2mode.

	[AFU][Changed]
	01. Changed Usagehead from 2015 to 2016.
	02. Changed /l /ln /hole:<guid> /a command whcih adds feature of write-once. [EIP243432] 
	03. Changed search solution of SMBIOS DATA from orginally searching Main block and 
	    Boot block to expanding to search all of ROM DATA. [EIP234657]

	[Linux][Fixed]
	01. Fixed issue where Get ACPI TABLE cannot find out the error of DSTD TABLE 
	    during LINUX UEFI BOOT. [EIP233270]

	[Linux][Added]
	01. Added to support ubuntu 15.10 which can generate a flash driver. [EIP247183]

	[Windows GUI][Fixed]
	01. Fixed issue where system will not do "Exit button Disable" during WINGUI auto run.

	[Windows GUI][Added]
	01. Added AFUWINGUI can identify windows 10.

	[EFI][Fixed]
	01. Fixed issue where getting the wrong size due to free memory in advance 
	    when EFI in Get ACPI Table. [EIP238562]
==============================================================================
5.08.00
	[AFU][New]
	01.Add support Check ACPI Table "BIMC" would run 2x2 mode.[EIP179199]
	02.Add support SmiFlash_17;[EIP204308]	
	03.Add supports ME capsule update function.[EIP205035]
	04.Add support OFBD MFG control.
	
	[AFU][Modify]
	01.Modify more condition to identify the SLP2.0 key is empty or not.[EIP215239]
	
	[AFU][FIX]
	01.Fix OFBD Get Pattern of Rom File would show other error message.[EIP204355]	
	02.Fix /cmd:{xxx} command can't use issue.[EIP215444]
==============================================================================
5.07.01
	[AFU][New]
	01.Add error message for OEM CMD Checking module.	
	02.Add support SMBIOS data in FV_DATA.
	03.Add support /cmd: command.
	04.Add support watchdog value restore.[EIP197706]
	[AFU][FIX]
	01.Fix oemcmd and cmd together use have crash issue. 
	02.Fix oem get pattern of rom file debug message have not disabled.
	03.Fix Windows driver.
	[AFU][Modify]
	01.Modify command: "/OAD", remove upload bin file to BIOS verify step.[[MY6] AFU tool /OAD fail]
==============================================================================
5.07.00
	[AFU][New]
	01.Add new's command /JBC.[EIP174535].
	02.Add new's command /MEUL.[EIP174535].
	03.Add new's feature /Recovery:<Path>, AFU will copy rom file to specified 
	   directory.(Rom file can't auto delete.)
	04.Add new's OFBD module Get Pattern Module.[EIP159961]
	05.Add new's capsule:0 ,AFU run capsule mode will enable shutdown step.
	06.Add support Android OS AFU Linux Version.[EIP159621]
	07.Add new hide command /b2.[EIP164320]

	[AFU][Modify]
	01.Modify disable all hide commands.
	02.Modify command:"/d", show capsule header check string, form "ok/fail" to "Enable/Disable".
	03.Modify printf flash message way, reduce the frequency of use of printf function.
	04.Modify init platform step, AFU will priority use "Runtime memory hole".

	[AFU][FIX]
	01.Fix Aptio5 rom file have many _FVH string, it will cause AFU check FFS error.
	02.Fix AFU can't show OFBD_CFG BIOS report error.
	03.Fix update SLP key AFU will modify ffs attribute issue, this issue will cause 
	   secure flash verify fail.[EIP162159]
	04.Fix rom file check sum will cause AFU execute crash.
	05.Fix hide command "/cmd:" /Axxx.bin + /cmd:{xxx} issue.
	06.Fix hide command "/oemcmd:" /Axxx.bin + /oemcmd:xxx issue.

	[WIN][Modify]
	01.Modify add check driver version function.
	02.Modify AFU only delete windows driver made by UCP produced, It will not delete all driver.

	[WIN][FIX]
	01.Fix when use UCP add driver into AFU. From another directory call AFU, It will decompress 
	   into wrong directory, cause AFU can't find driver.

	[WINGUI][FIX]
	01.Fix AFUWINGUI use command /LR will show error message issue.
	02.Fix AFUWINGUI have add rom file and add command. In command line, input command 
	   run AFUWINGUI, it will show Unknown command message box.
==============================================================================
5.06.01
	[AFU]
	1.Fix Alignment RomHole block issue bring SLP2.0 offset calculate error.
	2.After flash error, afu will add blank line continue print error message.
	3.Add check aptio platform's feature.
	4.Add new egm command sfmdt:n1:n2.[EIP151370]
	5.Add new egm command preset:n.
	6.Add new command /MEUL.
	[AFU-WIN]
	1.Fix when use ucp adding windows driver to AFU inside, afu will decompress to error path.
	[Error Message]	
	1.Error: Using the wrong AFU version, Please use Aptio 4 AFU.
	2.Error: Using the wrong AFU version, Please use Aptio 5 AFU.
==============================================================================
5.06.00
	[AFU]
	1.Fix ECX erase size issue.[EIP105071]
	2.Fix UCP insert ROM file AFU can't open issue.
	3.Fix command /OAD can't flash issue, when secure flash enable.
	4.Fix, AFU can't find FID OA key issue, when ROM data have many _FVH string.
	5.Fix When NVRAM is full, and SMIBIOS data in NVRAM, AFU can't preserve this data.
	6.Fix When flash /p /b /n add /me command, AFU will not preserve need preserve data.
	7.Fix When ROM Hole size exceed two block size, /holeout bin file is not right data.
	8.Fix When new rom Rom Hole offset different old rom rom hole offset, use /p /b /n /ln, 
	  ln rom hole data will be update to old rom offset.[EIP157284]
	9.Modify Copright to 2014.
	10.Modify when use command /ln, AFU check platform have not rom hole, AFU will show,
	   "Error: Rom Hole not exist."

	[Error Message Change]
	1."Error: OA Data invalid." to "Error: OA key data is invalid."
	2."Error: OA key is not NULL at all. And OA Key is the same as Bin File in system." to 
	  "Error: OA key is not empty at all. And OA Key is the same as Bin File in system."
	3."Error: OA key is NULL at all already." to "Error: OA key is empty at all already."
	4."Error: OA key is not NULL at all. And OA Key is no the same as Bin File in system." to 
	  "Error: OA key is not empty at all. And OA Key is no the same as Bin File in system."
	5."Error: Unable to start a Secure Flash session." to "Error: Secure Flash Rom Verify fail."
==============================================================================
5.05.04
	[AFU]
	1.Fix SMBIOS Data can't restore, when SMBIOS Data in NVRAM and NVRAM is full. [EIP145538],[EIP145305]
==============================================================================
5.05.03
	[AFU]
	1.Change Version 3.05.02 to 5.05.03.
	2.Fix check EC bin file header data return result error.
	3.Fix Rom Hole does not Alignment block error.[EIP143348]

	[AFUGUI-MFC]
	1.Fix WINGUI Show OFBD ROM ID Check dialog issue.[ECR191374]
	2.Fix WINGUI Show OFBD EC dialog issue.
