]> git.proxmox.com Git - mirror_edk2.git/commit
UefiPayloadPkg/BlSupportPei: fix MMCONFIG assignment from XSDT
authorLaszlo Ersek <lersek@redhat.com>
Tue, 17 Sep 2019 15:44:30 +0000 (17:44 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 9 Oct 2019 07:40:10 +0000 (09:40 +0200)
commit04a0c3e8e1384fc054243b61712a4bd6e454e7df
tree2155f006d0bc4f689744765546d8775e509a645c
parent7f72ec0b15fdc30899452279c988bf5dfb311951
UefiPayloadPkg/BlSupportPei: fix MMCONFIG assignment from XSDT

(This patch is unrelated to the rest of this series; its purpose is to
enable building the UefiPayloadPkg DSC files with GCC.)

When building "UefiPayloadPkg/UefiPayloadPkgIa32.dsc" with GCC48 for the
DEBUG target, the compiler reports that "Entry32" may be used
uninitialized in ParseAcpiInfo(), in the XSDT branch.

Code inspection proves the compiler right. In the XSDT branch, the code
from the RSDT branch must have been duplicated, and "Entry32" references
were replaced with "Entry64" -- except where "MmCfgHdr" is assigned.

Fix this bug by introducing a helper variable called "Signature", so that
we have to refer to "Entry32" or "Entry64" only once per loop body.

Cc: Benjamin You <benjamin.you@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
UefiPayloadPkg/BlSupportPei/BlSupportPei.c