Phoenix WinFlash for UEFI


Manufacturers like Lenovo have recently used EFI 
technology from Phoenix.

The flashing tools:

WinFlash.exe for windows
and
PFlash.exe for DOS

Both of them are using 
command lines:

Phoenix WinFlash for UEFI Command Options

Code:

Phoenix WinFlash for UEFI Command Options

 

This section lists WinFlash command options and parameters.

 

Syntax

 

WINFLASH [options] [romfile] [@rspfile]

 

 

romfile        The new BIOS p_w_picpath name, eg: BIOS.FD

@rspfile       The response file (PFLASH.RSP by default) contains all command parameters in text format.

 

/? or /help or /h Displays help screen

/all           Flash the entire p_w_picpath including the descriptor region

/bak:filename Backup ROM to a file.

/bbl           Program the boot block. By default, bootblock is not updated.

/bios          Flash the BIOS region

/cs            Verify BIOS.FD p_w_picpath checksum

/cvar          Clear variables

/console       Console mode (only progress bar)

/desc          Flash the descriptor the region

/dmc:string    Specify chassis manufacturer DMI string

/dmm:string    Specify motherboard manufacturer DMI string

/dms:string    Specify system manufacturer DMI string

/dpc:string    Specify chassis asset tag number

/dpm:string    Specify motherboard product ID DMI string

/dps:string    Specify system product ID DMI string

/dsc:string    Specify chassis serial number DMI string

/dsm:string    Specify motherboard serial number DMI string

/dss:string    Specify system serial number DMI string

/dus:string    Specify UUID DMI string

/dvc:string    Specify chassis version DMI string

/dvm:string    Specify motherboard version DMI string

/dvs:string    Specify system version DMI string

/ec            Flash the EC region

/exit          Exit without rebooting

/gbe           Flash the GbE region

/hash          ??

/ls            Reserve logos in BIOS ROM

/logo:p_w_picpathfile Replace the BIOS logo with an p_w_picpathfile in jpeg or bmp format.

/me            Flash the ME region

/mfg           Manufacturing mode. Automatically reboots without the need for pressing a key.

/mod:filename  Updates the module in the BIOS with the module contained in the file (such as /MOD:vga.ffs); the rest of the BIOS p_w_picpath remains unchanged.

/mode=n        Specify dmi mode n = {0, 1, 2, 3}

        0: Just update BIOS with new file, don’t update DMI variables.

        1: Just update DMI variables, keep ROM BIOS as before.

        2: Update BIOS, merge ROM DMI variables with command line(default).

               3: Update BIOS, merge p_w_picpath variables with command line.

/noflash       Perform all steps that do not update the flash part

/p             Production mode (minimize messages and delays)

/pfaefv:filename Loads and runs PFAE modules in specified volume file

/raw:uuid:filename Replace the RAW module content.

/remote2       Execute WinFlash without GUI, allowing other applications or other computers to call WinFlash.

/ro[=name]     Read contents of flash part and save to a file.

/v             Verify each block after programming it.

/vcpu:filename Update variable size CPU micocode

/vbl           Show warning for Microsoft Bitlocker

/sm            Skip all WinFlash messages

/swm           Skip all WinFlash warning messages

/sd            Skip BIOS date check.

/sn            Skip BIOS part number check.

/sp            Skip BIOS product code check.

/sv            Skip BIOS version check.

/svs           Skip BIOS same version check.

/sa            Skip all BIOS checks.

 

/slp:filename  Replace SLP marker (bin size=182 octets)

/spu:filename  Replace SLP pubkey (bin size=156 octets)

/ss            Use current SLP

Phoenix PFlash for UEFI Command Options

Code:

Phoenix PFlash for UEFI Command Options

 

Syntax

 

PFLASH [options] [romfile]

 

 

/cvar          Clear variables

/mode=n        Specify dmi mode n = {0, 1, 2, 3}

        0: Just update BIOS with new file, don’t update DMI variables.

        1: Just update DMI variables, keep ROM BIOS as before.

        2: Update BIOS, merge ROM DMI variables with command line(default).

               3: Update BIOS, merge p_w_picpath variables with command line.

/doxx:string   Specify the OEMxx DMI string

/dus:string    Specify UUID DMI string

/dsc:string    Specify chassis serial number DMI string

/dvc:string    Specify chassis version DMI string

/dpc:string    Specify chassis asset tag number

/dmc:string    Specify chassis manufacturer DMI string

/dss:string    Specify system serial number DMI string

/dvs:string    Specify system version DMI string

/dps:string    Specify system product ID DMI string

/dms:string    Specify system manufacturer DMI string

/dsm:string    Specify motherboard serial number DMI string

/dvm:string    Specify motherboard version DMI string

/dpm:string    Specify motherboard product ID DMI string

/dmm:string    Specify motherboard manufacturer DMI string

/pfaefv:filename Loads and runs PFAE modules in specified volume file

/ioset:port,value Set IO port value after restart

/ls            Reserve logos in BIOS ROM     

/write:Fname:PhyAddr   Write a binary file to specific physical address

/? or /help or /h      Displays this help screen

/sm            Skip all WinFlash messages

/swm           Skip all WinFlash warning messages

/sd            Skip BIOS date check.

/sn            Skip BIOS part number check.

/sp            Skip BIOS product code check.

/sv            Skip BIOS version check.

/svs           Skip BIOS same version check.

/sa            Skip all BIOS checks. 

/ss            Use current SLP

/me            Flash the ME region

/gbe           Flash the GbE region

/desc          Flash the descriptor the region

/ec            Flash the EC region

/bios          Flash the BIOS region

/all           Flash the entire p_w_picpath including the descriptor region

/prog:start:end Flash by address block

/v             Verify each block after programming it.

/bbl           Program the boot block. By default, bootblock is not updated.

/endkey        Press a key to continue after flashing

/shutdown      Shutdown the system after flashing

/exit          Return to DOS after flashing

/cs            Verify the checksum of FFS file

/bak:filename Backup ROM to a file.

/noflash       Perform all steps that do not update the flash part

/logo:p_w_picpathfile:index  Replace the current BIOS logo with an p_w_picpathfile in jpeg or bmp format.

/mod:filename  Replace a FFS module

/raw:uuid:filename Replace a RAW module content.

/rsbr:GUID,... Preserve subregions with specified GUIDs during BIOS update

/vcpu:filename Update variable size CPU micocode

/silent        Silent operation (no beeps)

/p             Production mode (minimize messages and delays)

/vbl           Show warning for Microsoft Bitlocker

/force         Update BIOS without modification

 

/slp:filename  Replace SLP marker (bin size=182 octets)

/spu:filename  Replace SLP pubkey (bin size=156 octets)

Tips:

If using a moded Bios the 
flash fails, open WINFLASH.LOG

if you see the following errors, a hack of environment.dll is needed.

Code:

[0403/001701:INFO:utils.cpp(29)] p_w_picpathDigest fail!

[0403/001701:INFO:utils.cpp(29)]

  Fail to authenticate p_w_picpath!

[0403/001701:INFO:utils.cpp(29)] Fail to authenticate p_w_picpath!

Fail: UNSUPPORTED!

Verified for WinFlash for UEFI versions 1.4.64.0 to 1.4.83.0

in environment.dll

replace 
68 01 00 83 C4 0C 85 C0 74 15
by
68 01 00 83 C4 0C 85 C0 EB 15
to suppress "p_w_picpathDigest fail!" error

or
83 C4 14 89 45 E0 83 7D E0 00 74 31
by
83 C4 14 89 45 E0 83 7D E0 00 EB 31
to suppress "Fail to authenticate p_w_picpath!" error

(this second hack is not necessary if first is applied)

SLIC insertion/replacement

These tools allow the marker and pubkey insertion by command line:

/slp:filename Replace SLP marker (bin size=182 octets)
/spu:filename Replace SLP pubkey (bin size=156 octets)
/ss Use current SLP


BIOS recovery instructions 
are explained in a 
packard bell document, but the needed files are not yet available on the net.

Hope these informations will help modders

regards