From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.67.59; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067059.outbound.protection.outlook.com [40.92.67.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 53B80207E5401 for ; Fri, 25 May 2018 03:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=46LzR6AhvOCRm67FnX/XxmHfMWNLcYGaR2SRPHX3LEM=; b=NTKr8Q75OyBmoI0efkmWrzegfrG6HpgZFLQ7q1t5OJWMDvmMKmRqJHDwLeFM6qgtZ6LV1W2nWTHNetIqar3aZPK0Rah9SKRxUkYjKHqI/0/Vl8WU3kuZAz+zCij5h9gycxaSdPxqQMvvQ+pbhWThlCpamgrsPLAZwPcl1xi9yU1N+DUz0+TSD48/QfKULmU/YlH3W8VCAg7fWpY9fzf2j1xcuHI0FTzCLd3MaNNweeXrhQtInt+unGXI2mEKechwIWIhBkU59K8IR9pRA0fmwiKtBiO4i4nC0Fq9NKGo3x7G4jGG0NQ59txFQWOUCdbb88CNyRaGtNak7ivwxfCu5A== Received: from VE1EUR02FT058.eop-EUR02.prod.protection.outlook.com (10.152.12.57) by VE1EUR02HT146.eop-EUR02.prod.protection.outlook.com (10.152.13.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.797.11; Fri, 25 May 2018 10:54:24 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.12.51) by VE1EUR02FT058.mail.protection.outlook.com (10.152.13.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.797.11 via Frontend Transport; Fri, 25 May 2018 10:54:24 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7010:5d5e:8dcf:d92e]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7010:5d5e:8dcf:d92e%17]) with mapi id 15.20.0797.011; Fri, 25 May 2018 10:54:24 +0000 From: Marvin H?user To: "edk2-devel@lists.01.org" , "eric.dong@intel.com" , "lersek@redhat.com" Thread-Topic: CpuS3DataDxe / DxeRegisterCpuFeaturesLib dependency. Thread-Index: AdP0FKyKttYo63uiQsS46d6wcJBt3A== Date: Fri, 25 May 2018 10:54:24 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:8D7DEFB74C9743687B9EE635915633974CABBC0BF298DFF69D75F3EABC760834; UpperCasedChecksum:5035D8D5732773EF64DA5CBB70A9B03DA8689AC8AB1C78516BDCB69F45188A01; SizeAsReceived:6992; Count:43 x-tmn: [qXujQcz/4OsBWV8dcz98JyfKjyeyE7c5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR02HT146; 7:CDBUeMBLpCcd7+O/+MwAt2ov0SvKoxyuzmcmJDUfjQaVEcWkqjPlkaQxRqQ9TzA4aEEPGjdHLGv/JHuQFrciKFAXeetenCCg/J4GfH7KlF3/Hd4nMHPErXjNsaMYWJ4K85btb5dH/DOH4VnYKFyEhRQiuwdibOCVrCLpHdGZ5WE7+mQ5wUBUVWY9B5UQFoYiwyEaMu/94D3AHrQb8j/gyx6PrHP8B+6Gy8CHCLKRE2lqR/RuoWSuoI+j+CjDS7iS x-incomingheadercount: 43 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125466)(1603101448)(1701031045); SRVR:VE1EUR02HT146; x-ms-traffictypediagnostic: VE1EUR02HT146: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:VE1EUR02HT146; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR02HT146; x-forefront-prvs: 06833C6A67 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(199004)(189003)(68736007)(59450400001)(102836004)(87572001)(486006)(82202002)(105586002)(20460500001)(97736004)(25786009)(106356001)(476003)(99286004)(426003)(5250100002)(86362001)(2501003)(2201001)(6346003)(26005)(81156014)(7696005)(8676002)(790700001)(8936002)(110136005)(104016004)(6436002)(3660700001)(606006)(3280700002)(5660300001)(2900100001)(74316002)(72206003)(14454004)(966005)(236005)(6306002)(54896002)(55016002)(33656002)(32563001)(213903007)(19627235001); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR02HT146; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: QXjKBNNTWVAPuCI3BBkV8olyD5Sv+x1wHMnpzb84em7sE3ojPV+R+qCEH9gPmUJ/aAerHZP1Y/b1UrEFiS8ZV7x08kuiBUf/+4nX0Z9hi5mjzwDLPeI9P+yQnfWAAgLrX1sdzA3xzksfh6XRVEnBZ6Q0HO4BlWLDP7Vg3AepwIEf43Y2VaBwXFv4dl1s7qn+ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: aa816530-0598-4b8c-170f-08d5c22de0db X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: aa816530-0598-4b8c-170f-08d5c22de0db X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2018 10:54:24.3627 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT146 X-Content-Filtered-By: Mailman/MimeDel 2.1.26 Subject: CpuS3DataDxe / DxeRegisterCpuFeaturesLib dependency. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 10:54:27 -0000 Content-Language: de-DE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Good day, While I was inspecting CpuS3DataDxe and the modules depending on its PCD Pc= dCpuS3DataAddress, I noticed that DxeRegisterCpuFeaturesLib seemingly has a= n asserted dependency on the PCD being ready when it its executed. I did ne= ither see a Depex entry, nor an event callback ensuring CpuS3DataDxe has be= en loaded, neither exposed by CpuS3DataDxe, nor consumed by this library. https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/RegisterCp= uFeaturesLib/DxeRegisterCpuFeaturesLib.c#L211 Is there anything I'm missing that ensures the execution of CpuS3DataDxe pr= ior to executing the dependent code? If not, should there be a dummy protoc= ol exposed? PiSmmCpuDxeSmm also retrieves this PCD, however safely quits wh= en it has not been set. However, this could cause unexpected behavior when = the PCD is set after this code has been executed. I did not notice any depe= ndency satisfaction actions here either. Furthermore, not directly related to this dependency issue, the DXE code ob= viously does not implement AllocateAcpiCpuData() entirely. Hence, the if-br= anch following its call, will either add another layer of firing ASSERTs, o= r it will plainly do nothing. Maybe it could be moved into the current Allo= cateAcpiCpuData() function and it be renamed accordingly? https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/RegisterCp= uFeaturesLib/RegisterCpuFeaturesLib.c#L526 Thanks for your time. Best regards, Marvin.