From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.83]) by mx.groups.io with SMTP id smtpd.web11.5082.1688034251877800573 for ; Thu, 29 Jun 2023 03:24:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cPbebSeQ; spf=pass (domain: arm.com, ip: 40.107.13.83, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mV3vqx+lB+w6JhdOLZ4T2qJXiO4NcXuWVPwKEUp9iHM=; b=cPbebSeQ4E3xL7e6B/yWTG+lBDwjo/cQeAeX7fzF/31HnBk9iJIBgN7X3HGgg/Rrp1IR+tqCTb+b0f2CknTr4CdYHrtHgUUgi8gsxMHjuGxnoc6Jn2zcpJ+T7Ljozltr8QOWbF8vVQCvDnSrMghFbDhaLn46ydrCMbDdc/JvSC8= Received: from DUZPR01CA0133.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bc::28) by AS4PR08MB8118.eurprd08.prod.outlook.com (2603:10a6:20b:58a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Thu, 29 Jun 2023 10:24:01 +0000 Received: from DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4bc:cafe::41) by DUZPR01CA0133.outlook.office365.com (2603:10a6:10:4bc::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Thu, 29 Jun 2023 10:24:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT009.mail.protection.outlook.com (100.127.143.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.20 via Frontend Transport; Thu, 29 Jun 2023 10:24:01 +0000 Received: ("Tessian outbound d6c4ee3ba1eb:v142"); Thu, 29 Jun 2023 10:24:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: aac180eecfaeda27 X-CR-MTA-TID: 64aa7808 Received: from d317201a1981.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9809F2D7-04C9-43BB-847A-2377E6F847A4.1; Thu, 29 Jun 2023 10:23:49 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d317201a1981.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 29 Jun 2023 10:23:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vsz49q8+KMRJ/kWsskqWk3vo8cVtP/bJMwbnnjajRJ+mJajqB5OWqmTmEs7oA04VvpZiPKDQ+gH5eXKRqqtcx/m/7a96DI7bxogZfEGjaXJ/iNECC2wMTOv1jNADn4y/pABxlud9fQZwAF2FcOeO57Ll/K8AkC4o2d8QqAuoiFpMq5X0Q1cL5An6d3BheLCCB4O2M3FCDtSgQWS9I/FGvjvHcWEorASDdJeaj61uHzPKBCIYRHpv8TgJznJncpUWUAvL+9jt4gdG/aZGh2BcFiP8NayHBYkXItxAXMH4XG/LZJVrceYDBJau/vrVLKP8UoGKW54qRM41m+aWxvzjhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mV3vqx+lB+w6JhdOLZ4T2qJXiO4NcXuWVPwKEUp9iHM=; b=QbTlsuD39sJl6IUNUvtRwQUIv8PbLnP0s05kX5T9UZR2x4rbTqfIA0ktqk+ru0dXORo17gnxnoNDIy4wOZLYKX1qclwwpfyYv4utfTUr9T70TQsNbhaOtEbY62yZQWKuPX5HlE0HZRdvN9g8BTJ/lPM6R8jhcVnIwixiaiq+qIC3y8LUk1V6o/W1eY7M4YKW+BgBRVWAk/XfcQ+Xo285HpiDiIJAmagmG99q5+q4X3yN5FIZISEsFkdhuI82ioQgp5aO2sejudF7PCd2zyHKrBRjGIpp+IG7QweFdemc1AXsU37ja7iLe/zPAvLHdlZoKMfPcorBBvfozvIrTECcOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mV3vqx+lB+w6JhdOLZ4T2qJXiO4NcXuWVPwKEUp9iHM=; b=cPbebSeQ4E3xL7e6B/yWTG+lBDwjo/cQeAeX7fzF/31HnBk9iJIBgN7X3HGgg/Rrp1IR+tqCTb+b0f2CknTr4CdYHrtHgUUgi8gsxMHjuGxnoc6Jn2zcpJ+T7Ljozltr8QOWbF8vVQCvDnSrMghFbDhaLn46ydrCMbDdc/JvSC8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by PAWPR08MB9996.eurprd08.prod.outlook.com (2603:10a6:102:35a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Thu, 29 Jun 2023 10:23:46 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::8ef4:aa57:6248:7850]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::8ef4:aa57:6248:7850%4]) with mapi id 15.20.6544.019; Thu, 29 Jun 2023 10:23:46 +0000 Message-ID: <3f1caf4c-a25f-53c0-ed52-3580283315e2@arm.com> Date: Thu, 29 Jun 2023 11:23:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v1 2/8] MdePkg/MdePkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg To: pierre.gondois@arm.com, devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao , Jian J Wang , Ard Biesheuvel , Jose Marinho , Samer El-Haj-Mahmoud , "nd@arm.com" References: <20230509074042.1523428-1-pierre.gondois@arm.com> <20230509074042.1523428-3-pierre.gondois@arm.com> From: "Sami Mujawar" In-Reply-To: <20230509074042.1523428-3-pierre.gondois@arm.com> X-ClientProxiedBy: LNXP123CA0021.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::33) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|PAWPR08MB9996:EE_|DBAEUR03FT009:EE_|AS4PR08MB8118:EE_ X-MS-Office365-Filtering-Correlation-Id: 73f52fb9-3af2-4a20-5b9e-08db788af4d7 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: K5RAIT1bOCSB2IUrAl67C+38GkWgh0/8LWgttzkrJ7a+qjF8VTNngMTy3LLhYenH8NbgLsgQhAbYEqopDSbQ3utWjL6eHv9FjCjHwDprq8xb3jCs8Z/FpTw0vH1+F4nRx4L4/yRPVV6gdWJ89oUT+FqhENuhn2ilz6/9VppjlbNvfvMSUA/1jvtaw31G5YBNR3DJxQ13fTKLl3XbqhIKod2NicypwCa38veptPEhVnK7pZax4zwcKOqZxn+6VAiqiWftKMsWt/NYBFU80YNxmwgr/4J5vRS/qZ3QNP8bfz9lc+DFrAXBh/wdESzMLaBYdcB2JYC08sHm592A9ORy9EeJtIvgOmMkhJm/9fIO1AofSePJzwYF6VQphqZ0anmMHOs43YobTtY4AbG0LheZga4YbdHyWwPZ0HZ9XT03ek2mJg3WCVQldrFmaKEb7Bob4W84LYvYf0vS67uIWTFYp3puXSxHXV21djdaNZsZLeGAeqLHaf9jFfQppnbXBtdv1HkCl5Qtrfa4j9KUKJN96s8Ei5fPAiHNrdVpfiqPV6yNUgUz1xYzxIlgDZJphEn7G5jIAiCdLKHh0U0x6+k56QpXB7UE0OJr+HPI0aBmXcDtTyjxwsVLDgpuMIoCfiInRKv663ZORqdzoIqjQiXK5SCa7PyhqQF0TdVRTMS+kmNm2YHgMOZUudhgblx5vIUn1554ECd/+ir+cr2F0zulCQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(39860400002)(376002)(396003)(136003)(451199021)(36756003)(6486002)(26005)(2616005)(38100700002)(186003)(53546011)(6512007)(83380400001)(6506007)(86362001)(31696002)(478600001)(5660300002)(2906002)(31686004)(8676002)(316002)(4326008)(8936002)(41300700001)(66476007)(66946007)(66556008)(44832011)(54906003)(213903007)(43740500002)(45980500001)(14943795004);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9996 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f689a702-6730-4ef4-691f-08db788aec11 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mwRvMPOqYeGTSnOiuaJUizBkItS2ihSalzBNa+FZEfoMXcXzQjXC3GxlvxDSAuVM/3ojKtAZXUtRaaKKgfm3CkVmf/u4UtMK7CjI5yR6sQEZiG+727axA28iIs0nkeq8t4pUnFiAKl/N0wcM2Aum4cCN+RwHbTBGc5Eqyq+9WbNIyU688PfLcvMUGs3Tl87qrQXFKtjOg28d7HA60P2A4LjsFdSD1VR4I8q55OfiQAEVPwNxDSpJd5dkImOMn41sb52hsy5+7rBAqs5itIrshyBwZqK8O7V5DzgT74D8458k5Mt/ooZtAzl+BF6KBdSxEcuT+ZEP5vr/48pZS7rBqwGe05Qv1YpZwf3KvVvcrK06zq1AglBTXGIAz2AcW5usslvYl57l8m+xVbHsmQiRmQMg48kqdMW9IcmW0PHjeHu4yusbKVbNqto+skZA7LF+z+SzL+zM3V4MdZ/NG0kgf++xHGOFJwAUF5773raqw3f6eiIulV1w++loieMKV9XaCeuy5WCt7flkhTeUtvV+iAAcj2ajs8RuvrnV6gz7P1oCyF2TT1G5R5yWyz7OcUbWEJveVJ9SyukxsSDCqohHjR3kslbKF1L5YELm7kHDmSshsU7gEg0Xg9J/rkVkbWocSCOGwlx0VF290BjR9MIwB6iEIHJDqoIQO8+UPtYXcgTXpa9aH3m+OUHHImB+iCXDqfmrVqh1b0sF1Lu6nS9q9EYgXgKn6hGoXQSZotN3nHSHA7MHPy6y1x5VEcBtmbdsQ9IZ6UnAv2alG6gbbnNrModuDs4cbOtHI6ZegIVVn7Npp5RYCS0V8R4EOWuSPCrzCYtXWKutJgfVV5pccHzWYg== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(39860400002)(346002)(376002)(451199021)(46966006)(36840700001)(40470700004)(8676002)(8936002)(2616005)(36756003)(5660300002)(86362001)(6506007)(40460700003)(40480700001)(36860700001)(31696002)(82740400003)(47076005)(83380400001)(336012)(81166007)(356005)(41300700001)(316002)(70586007)(4326008)(70206006)(186003)(26005)(6486002)(53546011)(6512007)(478600001)(2906002)(54906003)(82310400005)(31686004)(44832011)(213903007)(43740500002)(14943795004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2023 10:24:01.1475 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73f52fb9-3af2-4a20-5b9e-08db788af4d7 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB8118 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Pierre, Please see my response inline marked [SAMI]. With that fixed, Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 09/05/2023 08:40 am, pierre.gondois@arm.com 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 [SAMI] Apparently the token value 0x00000032 is already used when rebased with latest edk2 code and results in the following build error: The TokenValue [0x00000032] of PCD [gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm] is conflict with: [gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifSmbusSlaveAddr] I believe changing this to 0x00000037 should fix the issue. [/SAMI] > + > [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.