Change Capsule Header using INF

Hi, I am developing a device firmware update through UEFI Capsule Framework. In Microsoft’s document mentioned changing the Capsule Flags by INF file but not provide any example in it:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/processing-updates
Could someone point me a way or give me an example of doing such thing? I tried several ways but seems like not hit the keyword properly. My target is set the Capsule flags into CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE. Here is my INF so far:

[Version]
Signature = “$WINDOWS NT$”
Provider = %Provider%
Class = Firmware
ClassGuid = {xxxxxx-6468-4e36-b6f1-6488f42c1b52}
DriverVer = 03/19/2018,99.9.9.9
CatalogFile = xxCapsule.cat
PnpLockdown = 1
CapsuleFlags = 0x70000

[Manufacturer]
%MfgName% = Firmware,NTAMD64

[Firmware.NTAMD64]
%FirmwareDesc% = Firmware_Install,UEFI\RES_{xxxxxx-C3EB-44AA-B906-39CD03170770}

[Firmware_Install.NT]
CopyFiles = Firmware_CopyFiles

[Firmware_CopyFiles]
fmp.cap

[Firmware_Install.NT.Hw]
AddReg = Firmware_AddReg

[Firmware_AddReg]
HKR,FirmwareId,{xxxxxx-C3EB-44AA-B906-39CD03170770}
HKR,FirmwareVersion,%REG_DWORD%,0x99999999
HKR,FirmwareFilename,{xxxxxx-C3EB-44AA-B906-39CD03170770}\fmp.cap
HKR,CapsuleFlags,%REG_DWORD%,0x70000

[SourceDisksNames]
1 = %DiskName%

[SourceDisksFiles]
fmp.cap = 1

[DestinationDirs]
DefaultDestDir = %DIRID_WINDOWS%,Firmware{xxxxxx-C3EB-44AA-B906-39CD03170770}

[Strings]
; localizable
Provider = “xxx”
MfgName = “xxx”
FirmwareDesc = “xxFirmware”
DiskName = “Firmware Update”

; non-localizable
DIRID_WINDOWS = 10
REG_DWORD = 0x00010001

Thank a lot!

xxxxx@gmail.com wrote:

Hi, I am developing a device firmware update through UEFI Capsule Framework. In Microsoft’s document mentioned changing the Capsule Flags by INF file but not provide any example in it:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/processing-updates
Could someone point me a way or give me an example of doing such thing? I tried several ways but seems like not hit the keyword properly. My target is set the Capsule flags into CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE.

That’s clearly a documentation problem.  It mentions “if the capsule
flag was specified in the INF” and “proprietary capsule flags may also
be specified in the INF”, but nowhere does it say how to specify those
flags. 


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

There is no way to set additional flags in the INF. The documentation is incorrect and it will be addressed.

d

-----Original Message-----
From: xxxxx@lists.osr.com On Behalf Of xxxxx@gmail.com
Sent: Tuesday, March 27, 2018 12:19 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Change Capsule Header using INF

Hi, I am developing a device firmware update through UEFI Capsule Framework. In Microsoft’s document mentioned changing the Capsule Flags by INF file but not provide any example in it:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fbringup%2Fprocessing-updates&data=04|01|Doron.Holan%40microsoft.com|441840237b7d4387ef5008d593b3121d|72f988bf86f141af91ab2d7cd011db47|1|0|636577319668125060|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D|-1&sdata=LZaixeeGBL4NXGAjnxi2D%2BBdJ1u1IcnMd5X91xteNPQ%3D&reserved=0
Could someone point me a way or give me an example of doing such thing? I tried several ways but seems like not hit the keyword properly. My target is set the Capsule flags into CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE. Here is my INF so far:

[Version]
Signature = “$WINDOWS NT$”
Provider = %Provider%
Class = Firmware
ClassGuid = {xxxxxx-6468-4e36-b6f1-6488f42c1b52}
DriverVer = 03/19/2018,99.9.9.9
CatalogFile = xxCapsule.cat
PnpLockdown = 1
CapsuleFlags = 0x70000

[Manufacturer]
%MfgName% = Firmware,NTAMD64

[Firmware.NTAMD64]
%FirmwareDesc% = Firmware_Install,UEFI\RES_{xxxxxx-C3EB-44AA-B906-39CD03170770}

[Firmware_Install.NT]
CopyFiles = Firmware_CopyFiles

[Firmware_CopyFiles]
fmp.cap

[Firmware_Install.NT.Hw]
AddReg = Firmware_AddReg

[Firmware_AddReg]
HKR,FirmwareId,{xxxxxx-C3EB-44AA-B906-39CD03170770}
HKR,FirmwareVersion,%REG_DWORD%,0x99999999
HKR,FirmwareFilename,{xxxxxx-C3EB-44AA-B906-39CD03170770}\fmp.cap
HKR,CapsuleFlags,%REG_DWORD%,0x70000

[SourceDisksNames]
1 = %DiskName%

[SourceDisksFiles]
fmp.cap = 1

[DestinationDirs]
DefaultDestDir = %DIRID_WINDOWS%,Firmware{xxxxxx-C3EB-44AA-B906-39CD03170770}

[Strings]
; localizable
Provider = “xxx”
MfgName = “xxx”
FirmwareDesc = “xxFirmware”
DiskName = “Firmware Update”

; non-localizable
DIRID_WINDOWS = 10
REG_DWORD = 0x00010001

Thank a lot!


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

Thanks Tim and Doron for your quick and clear respond. So I think the only way to add “CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE” flag into capsule header is modify the ESRT Entry.
There is one field in ESRT Entry that represent the Capsule Flags:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/esrt-table-definition

Thank you so much!