diff options
author | Guo Dong <guo.dong@intel.com> | 2021-09-23 21:56:16 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-09-29 05:08:50 +0000 |
commit | dc430ccf3f664d26fe2a963cf2e21dca80069bf1 (patch) | |
tree | 8c39b874301c14ecaa61687529a0475bfdb9ec10 /UefiPayloadPkg/Library | |
parent | cc5a67269eee7fe807a01c30f7ca7af48b42b621 (diff) | |
download | edk2-dc430ccf3f664d26fe2a963cf2e21dca80069bf1.tar.gz |
UefiPayloadPkg: Use dummy constructor for PlatformHookLib
The Library constructor is only used for library dependency.
So use a dummy function to make it clear instead of using an
actual function.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
Diffstat (limited to 'UefiPayloadPkg/Library')
-rw-r--r-- | UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c | 17 | ||||
-rw-r--r-- | UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c index bd433bdbe0..004fcd8b7c 100644 --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c @@ -13,6 +13,23 @@ #include <Library/PcdLib.h>
#include <Library/HobLib.h>
+
+/** Library Constructor
+
+ @retval RETURN_SUCCESS Success.
+**/
+EFI_STATUS
+EFIAPI
+PlatformHookSerialPortConstructor (
+ VOID
+ )
+{
+ // Nothing to do here. This constructor is added to
+ // enable the chain of constructor invocation for
+ // dependent libraries.
+ return RETURN_SUCCESS;
+}
+
/**
Performs platform specific initialization required for the CPU to access
the hardware associated with a SerialPortLib instance. This function does
diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf index 2dfd8b1216..7ac6bfa1b1 100644 --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf @@ -14,7 +14,7 @@ MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = PlatformHookLib
- CONSTRUCTOR = PlatformHookSerialPortInitialize
+ CONSTRUCTOR = PlatformHookSerialPortConstructor
[Sources]
PlatformHookLib.c
|