From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mx.groups.io with SMTP id smtpd.web10.19146.1688144461588569403 for ; Fri, 30 Jun 2023 10:01:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HjqVTsj1; spf=pass (domain: gmail.com, ip: 209.85.215.174, mailfrom: kuqin12@gmail.com) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-55b0e7efb1cso1167105a12.1 for ; Fri, 30 Jun 2023 10:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688144461; x=1690736461; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dQ+e6sZIXPSuOUF64kuCbnCT8k9R25bgpQVRRVtXGFE=; b=HjqVTsj1VEVeYI/W/X2KWHROQCBHhaRib5zK6YU37H2vBF6I+Th13hFl4bO1CPkbIK PYcV/mwf8W/jgMpeZwG1Udj1eocjoV0oF/+/iq5vQ/XIV277gNH1EiDjmWtDhHSAwLGd A6Yvu6mk0gK/IH5DPVniZ/+NSslEeMwuJllehIcK4wwDf2Z1w1KTpVfeOLI22Z9DkesL Dutv2e0QkD2JkOLgw5lFVUb5vXnSS7XC+UkA+FaL5jBz+bSrUXZIor3n+Y/bbPIKOKVG HXMLdH9D6IVLZCgh0n4S3UOCskeblZ0yynX4MuavJF7OJMkKYSxTgwWFB5qij0kh3OD7 Vy1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688144461; x=1690736461; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dQ+e6sZIXPSuOUF64kuCbnCT8k9R25bgpQVRRVtXGFE=; b=QfDuaXgS2AYprXsoKGWBeL+4IIBuft1rP90Mc1aV0Oee4GETkV1osmzuRzDr9akqLA +v7D06vGXBfRweyn8TskrVZ0OSzsNgzmwpglPi/4kK0LCGgaqK5M/t71V31Zl4Db3dHq M0QiotwFzRbsPnS4Z5OEhUACfRUBa1az0p8eyrTmRcl0wLCoJZFU5GrvPmN7l35KE/nP xLzqSLeWuwdePURIgFtrEoTLhEexjb6BgIjfkMqrCEtgZA7Tyse1QuCvRX8BjfQIfS5X yWYE3H3jc02BSLl0KxBhXixbu1NHRbxFmiMuj5goGd22RbLiBfoGdTjSZaYJ9K1V4gZV 7itg== X-Gm-Message-State: AC+VfDxDMKyVnC1BClAQKzRnJf3NbTOpVdddAdaZjxqG/yLACcLDrwBs oloLcv3wg/LWtQdLTSnulOA= X-Google-Smtp-Source: ACHHUZ4v8PzAXrJ8183aqVEzchYvHAbDGMqk3Efnvu5tZpe5S4XZr3QeglINzGokM9V+nPeeCShnSQ== X-Received: by 2002:a05:6a20:be1b:b0:12c:e12:bbe9 with SMTP id ge27-20020a056a20be1b00b0012c0e12bbe9mr2482811pzb.38.1688144460767; Fri, 30 Jun 2023 10:01:00 -0700 (PDT) Return-Path: Received: from ?IPV6:2001:4898:d8:33:b007:3633:349e:ab2f? ([2001:4898:80e8:37:2ff3:3633:349e:ab2f]) by smtp.gmail.com with ESMTPSA id g7-20020aa78187000000b006687da3db65sm10200204pfi.75.2023.06.30.10.00.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jun 2023 10:00:59 -0700 (PDT) Message-ID: Date: Fri, 30 Jun 2023 10:00:58 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [edk2-devel] [PATCH v1 2/8] MdePkg/MdePkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg To: Pierre Gondois , devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao , Jian J Wang , Ard Biesheuvel , Sami Mujawar , Jose Marinho , Samer El-Haj-Mahmoud References: <20230509074042.1523428-1-pierre.gondois@arm.com> <20230509074042.1523428-3-pierre.gondois@arm.com> <39d07743-80f9-8595-1a33-db86a7f3323d@gmail.com> <41ca0871-70af-7310-215a-6dfa45973bac@arm.com> From: "Kun Qin" In-Reply-To: <41ca0871-70af-7310-215a-6dfa45973bac@arm.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Pierre, Thanks for the example. If we are to keep this in one commit, I think we should mention SecurityPkg in the title? To follow the example, can we rename it to `SecurityPkg/SecurityPkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg`? At least this makes it more obvious that it is touching 2 packages in one commit? Thanks, Kun On 6/30/2023 7:30 AM, Pierre Gondois wrote: > Hello Kun, > > On 6/29/23 22:36, Kun Qin wrote: >> This patch seems to have some discrepancy between the title and >> content :) > > I'm not sure I see the discrepancy between the title/content, > should I have mentioned the SecurityPkg ? > >> >> Can you please break this patch into 2, so that MdePkg change and >> SecurityPkg can be their >> own commit? > > I think the change is small enough to be in one patch, > I think I already saw patches touching 2 different packages for this > kind of cases, like: > commit 9a24c3546ebe ("MdeModulePkg: Move CPU_EXCEPTION_INIT_DATA to > UefiCpuPkg") > > > Regards, > Pierre > >> >> Thanks, >> Kun >> >> On 5/9/2023 12:40 AM, PierreGondois wrote: >>> From: Pierre Gondois >>> >>> In order to use PcdCpuRngSupportedAlgorithm in the MdePkg in a >>> following patch and to avoid making the MdePkg dependent on another >>> package, move PcdCpuRngSupportedAlgorithm to the MdePkg. >>> >>> As the Pcf is only used for AARCH64, place it in an AARCH64 >>> specific sections. >>> >>> Signed-off-by: Pierre Gondois >>> --- >>>    MdePkg/MdePkg.dec                                   | 5 +++++ >>>    SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf | 4 ++-- >>>    SecurityPkg/SecurityPkg.dec                         | 2 -- >>>    3 files changed, 7 insertions(+), 4 deletions(-) >>> >>> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec >>> index d6c4179b2a48..0ecfad5795e4 100644 >>> --- a/MdePkg/MdePkg.dec >>> +++ b/MdePkg/MdePkg.dec >>> @@ -2357,6 +2357,11 @@ [PcdsFixedAtBuild,PcdsPatchableInModule] >>>      # @Prompt IPMI KCS Interface I/O Base Address >>> gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsIoBaseAddress|0xca2|UINT16|0x00000031 >>> >>>    +[PcdsFixedAtBuild.AARCH64, PcdsPatchableInModule.AARCH64] >>> +  ## GUID identifying the Rng algorithm implemented by CPU >>> instruction. >>> +  # @Prompt CPU Rng algorithm's GUID. >>> + >>> gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm|{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}|VOID*|0x00000032 >>> + >>>    [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, >>> PcdsDynamicEx] >>>      ## This value is used to set the base address of PCI express >>> hierarchy. >>>      # @Prompt PCI Express Base Address. >>> diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf >>> b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf >>> index c8e0ee4ae5d9..d6c2d30195bf 100644 >>> --- a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf >>> +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf >>> @@ -79,8 +79,8 @@ [Guids] >>>    [Protocols] >>>      gEfiRngProtocolGuid                ## PRODUCES >>>    -[Pcd] >>> - gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm ## CONSUMES >>> +[Pcd.AARCH64] >>> +  gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm ## CONSUMES >>>       [Depex] >>>      TRUE >>> diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec >>> index 0a8042d63fe1..6bb02d58bdf0 100644 >>> --- a/SecurityPkg/SecurityPkg.dec >>> +++ b/SecurityPkg/SecurityPkg.dec >>> @@ -325,8 +325,6 @@ [PcdsFixedAtBuild, PcdsPatchableInModule] >>> gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeFvVerificationPass|0x0303100A|UINT32|0x00010030 >>> gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeFvVerificationFail|0x0303100B|UINT32|0x00010031 >>>    - >>> gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm|{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}|VOID*|0x00010032 >>> - >>>    [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, >>> PcdsDynamicEx] >>>      ## Image verification policy for OptionRom. Only following >>> values are valid:

>>>      #  NOTE: Do NOT use 0x5 and 0x2 since it violates the UEFI >>> specification and has been removed.