]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Fix constructor invocation ordering
authorSami Mujawar <sami.mujawar@arm.com>
Fri, 2 Oct 2020 21:14:01 +0000 (22:14 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 16 Oct 2020 17:21:04 +0000 (17:21 +0000)
commit1c03498a25dede9cb24481c5e2b9dc0c463f8414
tree2ed8b2ee0a8ebd6896c6ae6a9cb746f7b966ff25
parent69f8ef04a8c30dee5775ea1e23a9f4edc7c0e41d
MdeModulePkg: Fix constructor invocation ordering

The BaseSerialPortLib16550 library does not implement
a constructor. This prevents the correct constructor
invocation order for dependent libraries.
e.g. A PlatformHookLib (for the Serial Port) may have
a dependency on retrieving data from a Hob. A Hob
library implementation may configure its initial state
in the HobLib constructor. Since BaseSerialPortLib16550
does not implement a constructor, the Basetools do not
resolve the correct order for constructor invocation.

To fix this, add an empty constructor to the serial port
library BaseSerialPortLib16550.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <Ard.Biesheuvel@arm.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf