From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web12.3249.1605182999833987322 for ; Thu, 12 Nov 2020 04:10:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=ZgMoLZRf; spf=pass (domain: akeo.ie, ip: 209.85.221.53, mailfrom: pete@akeo.ie) Received: by mail-wr1-f53.google.com with SMTP id c17so5705459wrc.11 for ; Thu, 12 Nov 2020 04:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hd1vYdiLji69K21tT0bzkaAIaBMv8FFxhiHKgSXYOnU=; b=ZgMoLZRf9xClWEhz3p85qlQclR5IeY7xOLHnhNtF0NqGbZUn9/iS20TwgsrIzS2QSM hqKy4GNjAT9bg8NQ+c/w54jKm1uWXFIogX1ob16BBWdCDUcwy1NEdhZ6EFYEaf8XJes0 N1PwuQJQIJB+J4DyZbpEzfq3Gm/TG1gektZ25FYr3PAES5fT0ZZeADSwyNhI+1tndjMT q7YSIjYMEJG2l9wGg14EWmKW3WZCWfWB5jVPwu4GZTZw/LxU4Xp+E13mV0YrMzugnR7b R6SaPzWfgYZxnf49vsSJWR/+d7vYKzVX7/jDBIsnuOMKbhDNzWPqaDkH74hd4+WK5ntA 6dbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hd1vYdiLji69K21tT0bzkaAIaBMv8FFxhiHKgSXYOnU=; b=mWV1oHwen7lj5sx4Nfp+maIv1rpiyBg9p3vfXhl8hkhk0HR+OGXBTTjce3NHEU4MGl t3+eMMpPg0PgGbOPyrcP3ndlh6g+gDFPD6ewI7CuECsV1tpYzNp9oXFgAuykPzETO+7o /0pJB34LQOCDyirnzauWy1iFdO3oiCIp53oiv1gX09ue/FMXPI/Wwzf0FayNQ4FiGMc+ MShbEetqFiXp7SbFc3ZhvvfmLhVM9d/+IbSQ7lRdLaFq4Rs5OkXJCQXeoXiyZH28ivHo xSgHPj+NFFcm4SUY/tEtXk04tx0dDGk66TeMd2+7Rf3ZhjJv8G6quQYqJF1Q+amRVEop 2aXw== X-Gm-Message-State: AOAM532IPDIBQfMSh2re+ZdPN6Xw1s3le/PdXBpu+v1lCE4lxvIX6N2z FQ/NUtREG8fyvJyAvW8SgB7WJw== X-Google-Smtp-Source: ABdhPJzC45iXErHCdVHC2YVQzBJznqt0CJjKa40hYw/JRhiASPpsuQzDiVf77Em/f7DcwFdn8RaX1g== X-Received: by 2002:a5d:52c1:: with SMTP id r1mr15236550wrv.255.1605182998217; Thu, 12 Nov 2020 04:09:58 -0800 (PST) Return-Path: Received: from [10.0.0.122] ([84.203.72.30]) by smtp.googlemail.com with ESMTPSA id o63sm6357712wmo.2.2020.11.12.04.09.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Nov 2020 04:09:57 -0800 (PST) Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSCAxLzFdIE1kZVBrZy9CYXNlUm5nTGliRHhlOiBBZGQgRFhFX1JVTlRJTUVfRFJJVkVSIGNsYXNzIHRvIFJuZ0xpYg==?= To: gaoliming , devel@edk2.groups.io, samer.el-haj-mahmoud@arm.com Cc: michael.d.kinney@intel.com, zhiguang.liu@intel.com References: <20201104190346.8096-1-pete@akeo.ie> <001a01d6b896$755a0f90$600e2eb0$@byosoft.com.cn> From: "Pete Batard" Message-ID: <6ad8a441-ddce-d379-954c-fb2e3e0dabb2@akeo.ie> Date: Thu, 12 Nov 2020 12:09:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.2 MIME-Version: 1.0 In-Reply-To: <001a01d6b896$755a0f90$600e2eb0$@byosoft.com.cn> Content-Type: text/plain; charset=gbk; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Hi Liming, On 2020.11.12 01:52, gaoliming wrote: > I agree this library instance can be used for RUNTIME driver before boot to > OS. > > Can you let me know which runtime driver consumes it? It's OpenSslLib. As per https://github.com/tianocore/edk2-platforms/commit/1e09147a01aeb45aa43e36923d96a1d6b0ec9106 we had to introduce a dependency to RngLib to keep OpenSslLib happy, and the build breaks in VariableRuntimeDxe since it depends on OpenSslLib which itself now depends on RngLib. Here's the verbose build output that shows it: Library instances of module [/usr/src/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf] [AARCH64]: MemoryAllocationLib : /usr/src/edk2/MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf BaseLib : /usr/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf SynchronizationLib : /usr/src/edk2/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf UefiLib : /usr/src/edk2/MdePkg/Library/UefiLib/UefiLib.inf UefiBootServicesTableLib : /usr/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf BaseMemoryLib : /usr/src/edk2/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf DebugLib : /usr/src/edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf UefiRuntimeLib : /usr/src/edk2/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf DxeServicesTableLib : /usr/src/edk2/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf UefiDriverEntryPoint : /usr/src/edk2/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf PcdLib : /usr/src/edk2/MdePkg/Library/DxePcdLib/DxePcdLib.inf HobLib : /usr/src/edk2/MdePkg/Library/DxeHobLib/DxeHobLib.inf TpmMeasurementLib : /usr/src/edk2/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf AuthVariableLib : /usr/src/edk2/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf VarCheckLib : /usr/src/edk2/MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf NULL2 : /usr/src/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf NULL1 : /usr/src/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL4 : /usr/src/edk2/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf DevicePathLib : /usr/src/edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf PrintLib : /usr/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf BaseCryptLib : /usr/src/edk2/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf PlatformSecureLib : /usr/src/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf UefiRuntimeServicesTableLib : /usr/src/edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf OpensslLib : /usr/src/edk2/CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib : /usr/src/edk2/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf build.py... /usr/src/edk2-platforms/Platform/RaspberryPi/RPi4/RPi4.dsc(...): error 1001: Module type [DXE_RUNTIME_DRIVER] is not supported by library instance [/usr/src/edk2/MdePkg/Library/DxeRngLib/DxeRngLib.inf] consumed by [/usr/src/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf] > And, please make sure > the consumer code runs in boot phase only. That's for Secure Boot, so I think we should be okay. Regards, /Pete > > Thanks > Liming >> -----邮件原件----- >> 发件人: bounce+27952+67295+4905953+8761045@groups.io >> 代表 Samer >> El-Haj-Mahmoud >> 发送时间: 2020年11月12日 1:38 >> 收件人: Pete Batard ; devel@edk2.groups.io >> 抄送: michael.d.kinney@intel.com; gaoliming@byosoft.com.cn; >> zhiguang.liu@intel.com >> 主题: Re: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLibDxe: Add >> DXE_RUNTIME_DRIVER class to RngLib >> >> Reviewed-by: Samer El-Haj-Mahmoud >> >>> -----Original Message----- >>> From: Pete Batard >>> Sent: Wednesday, November 4, 2020 2:04 PM >>> To: devel@edk2.groups.io >>> Cc: michael.d.kinney@intel.com; gaoliming@byosoft.com.cn; >>> zhiguang.liu@intel.com; Samer El-Haj-Mahmoud >> Mahmoud@arm.com> >>> Subject: [PATCH 1/1] MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER >>> class to RngLib >>> >>> The Raspberry Pi platform with Secure Boot enabled currently fails to > build >>> with error: >>> >>> Module type [DXE_RUNTIME_DRIVER] is not supported by library >> instance >>> >>> [/home/appveyor/projects/rpi4/edk2/MdePkg/Library/DxeRngLib/DxeRngLi >>> b.inf] >>> >>> Add the missing class to fix this issue. >>> >>> Signed-off-by: Pete Batard >>> --- >>> MdePkg/Library/DxeRngLib/DxeRngLib.inf | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/MdePkg/Library/DxeRngLib/DxeRngLib.inf >>> b/MdePkg/Library/DxeRngLib/DxeRngLib.inf >>> index 68554ad21146..9c11959f8aeb 100644 >>> --- a/MdePkg/Library/DxeRngLib/DxeRngLib.inf >>> +++ b/MdePkg/Library/DxeRngLib/DxeRngLib.inf >>> @@ -14,7 +14,7 @@ [Defines] >>> FILE_GUID = FF9F84C5-A33E-44E3-9BB5-0D654B2D4149 >>> MODULE_TYPE = DXE_DRIVER >>> VERSION_STRING = 1.0 >>> - LIBRARY_CLASS = RngLib|DXE_DRIVER UEFI_APPLICATION >> UEFI_DRIVER >>> + LIBRARY_CLASS = RngLib|DXE_DRIVER DXE_RUNTIME_DRIVER >>> UEFI_APPLICATION UEFI_DRIVER >>> >>> [Packages] >>> MdePkg/MdePkg.dec >>> -- >>> 2.21.0.windows.1 >> >> IMPORTANT NOTICE: The contents of this email and any attachments are >> confidential and may also be privileged. If you are not the intended > recipient, >> please notify the sender immediately and do not disclose the contents to > any >> other person, use it for any purpose, or store or copy the information in > any >> medium. Thank you. >> >> >> >> > > >