]> git.proxmox.com Git - mirror_edk2.git/commit - IntelFsp2Pkg/Tools/GenCfgOpt.py
IntelFsp2Pkg/GenCfgOpt.py: Support UPD offset auto assignment
authorChasel, Chiu <chasel.chiu@intel.com>
Wed, 26 Sep 2018 11:21:11 +0000 (19:21 +0800)
committerChasel, Chiu <chasel.chiu@intel.com>
Fri, 28 Sep 2018 03:58:49 +0000 (11:58 +0800)
commit1d7eed4182f34fcd3172c4f62df5c0518ae5190e
treec6ec5bc996a34763a387d91d2719734d12ba97d6
parentccacc4d273dee8f376385505373b649ace7f5b26
IntelFsp2Pkg/GenCfgOpt.py: Support UPD offset auto assignment

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1211

For reducing maintenance effort, the UPD offset can be
automatic assigned by GenCfgOpt.py following by alignment
requirements.

The usage model as below:
. If UPD offset in DSC file are all '*', GenCfgOpt.py will
  assign offset for all UPD automatically. In this case no
  need to manually hardcode offset to all UPD in DSC.

. If UPD offset in DSC file are all not '*', GenCfgOpt.py
  will use hardcoded offset directly (original usage model)

. Tool does not support mixing scenario so UPD offset in DSC
  should be all '*' or all hardcoded but not mixed.

In auto mode UPD offset will be assigned following natural
alignment (size aligned) rule and the whole structure size
will align to either 32bits or 64bits depends on maximal UPD
size in the structure.

Test: Verified by both UPD offset hardcoded or '*' in DSC and
      generated UPD header files are correct.

Cc: Jiewen Yao <Jiewen.yao@intel.com>
Cc: Gao Liming <liming.gao@intel.com>
Cc: Zhu Yonghong <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
IntelFsp2Pkg/Tools/GenCfgOpt.py