From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (NAM02-BL2-obe.outbound.protection.outlook.com [40.107.75.75]) by mx.groups.io with SMTP id smtpd.web09.385.1582659629933721466 for ; Tue, 25 Feb 2020 11:40:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=H+odfWVm; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.75.75, mailfrom: leo.duran@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PjnkzFuyNAe0kwBtvHR88jkyyGPUGNBuFT1E8mAQxx8XvhEAJrJJVFX2tIJqBpmUm7qX5V4jmF+rry3JWUgcQGGulxRj9Muq7Wb6BvTvfGO8K0cpSK4V7aa3teCkNlEePGE9WYoNQIQRrJHSADz6xWfxYOCHfwypHrDTgJZd9tSjRrB/42b+knRXLIHwcM7O2lps5yd4/Yxtc0qno6FzmxhMdTmYGMYOUCi3+sBN0GusXL+WiHcdelYSDJWUYxg3aIbnRFN1zsAqJfFDubFUJIOptxg02DR+n3ReG7JO26aoEp+LjiN1uYDf+SWGTVeJTGhhzowKF+xMpEj3L2/H4Q== 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-SenderADCheck; bh=rvkKxHE89hr9VLRArHWpu6byvH5OmYUFkBwKbm3SrL4=; b=TUPXXL8gdu5COuGdMYDxZt5otVkocnFfXOPmYy0OrLWU+osokVHXaAblGO10Sis9ntj+GJ2b2mBtk1ghEvIMIDckvvdUT0uONUI6PiSILFHQps7Wv1asozTk4n84CyYYSueld+DGbXB/33yl0/rxNQHEd9Qnb2M8AU3orjCdBu9+a9k0u0NPHFdimeAKGIf7ZnrScR7LuKwAdMDdJ5Iu0obw65MpfOmNMrQ0gORqzlhDNrL7WKZ8LYWTSlahRRubWdXVEKa/CkrdrL/o+u9hShjwlgW/Sp715VqTcpI8c3gpbYxW6NW3UCNJXslYTmxstTeSMFtRdGw9SRdsqriJsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rvkKxHE89hr9VLRArHWpu6byvH5OmYUFkBwKbm3SrL4=; b=H+odfWVmJfS+LdE7UWEXdfqufqMTziK9RH9VpKv2KajGJg0oxMmfqv/ZeXrYeqflkXAHo9U0Ix4FK2L9koa2uCauN3pP/6tlNZWfdR9n5TrdeOJ9HnCrlsNl18Kb+Imx4O+6F8gGOkQ16XytAWuUwqYOKH3+FeW5MEGoV+FrV+I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; Received: from BN6PR12MB1922.namprd12.prod.outlook.com (2603:10b6:404:106::14) by BN6PR12MB1282.namprd12.prod.outlook.com (2603:10b6:404:1d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.22; Tue, 25 Feb 2020 19:40:28 +0000 Received: from BN6PR12MB1922.namprd12.prod.outlook.com ([fe80::d931:1942:a6b5:d74c]) by BN6PR12MB1922.namprd12.prod.outlook.com ([fe80::d931:1942:a6b5:d74c%7]) with mapi id 15.20.2750.021; Tue, 25 Feb 2020 19:40:28 +0000 From: Leo Duran To: devel@edk2.groups.io Cc: Leo Duran Subject: [PATCH 0/2] UefiCpuPkg/Library: Fix bug in MpInitLib Date: Tue, 25 Feb 2020 13:39:24 -0600 Message-Id: <1582659566-9893-1-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 X-ClientProxiedBy: SN4PR0801CA0024.namprd08.prod.outlook.com (2603:10b6:803:29::34) To BN6PR12MB1922.namprd12.prod.outlook.com (2603:10b6:404:106::14) Return-Path: leo.duran@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.78.2) by SN4PR0801CA0024.namprd08.prod.outlook.com (2603:10b6:803:29::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2750.17 via Frontend Transport; Tue, 25 Feb 2020 19:40:27 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [165.204.78.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 42181999-3dbc-4b9a-19af-08d7ba2a90ff X-MS-TrafficTypeDiagnostic: BN6PR12MB1282:|BN6PR12MB1282: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 0324C2C0E2 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6029001)(4636009)(136003)(376002)(39860400002)(366004)(396003)(346002)(189003)(199004)(16526019)(8936002)(956004)(186003)(36756003)(81156014)(66556008)(6486002)(4326008)(26005)(2616005)(44832011)(7696005)(81166006)(52116002)(8676002)(478600001)(5660300002)(6916009)(2906002)(66946007)(6666004)(19627235002)(66476007)(316002)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1282;H:BN6PR12MB1922.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6Eas5x22q8pwb3o4+9QD3o+oQwalADOK8VESNTumkNftoVMpDlrDIkexW1RWCuuRRxfZA4H8d7M1EBUPMspwcS7vfj21gCZPr3PEq7IWRIGpmkVGvjUtl044kYd3dwUeWzVq1jyWsh5hZnepGt4EAUCodQ0Q96eSGwnkW5ul70XyjFzucKxrhSK8OHMiodA8Xop3RufZux9+t/tlzYSr0izQG6f534ti7+dI3pDUFBUjVD0Li5J75aZrXwg3v3mYrWeH6zvG4aZHruOLxWcVq1MBQwklpc2HpFT8t71ER2kFhTlImW6ECWxK8GQfiw5ZQxZoQWKQ0WQMAd+gr0PigxxbIt6CXkJgcy/vkPd+fZP4/nUGPem5J3C0lx7OqIYD+EDPHZwItu5jXmVhwxsRCfa4Kt8PYBiwoFvmKM5xw9JVeNiJMxhC/JPRcwdnBnyJ X-MS-Exchange-AntiSpam-MessageData: ch0cpQn7fGglbk478cHp/9yGY7R/4RMgxNF5Kt2rguW/Az2TaU6WD9JUzswFG0oiYRaoyJoPBWuZQJKWjMUkY6VF7qA5QB0L5Is4aYmRolqsZkdgCjLCwi8fXdLPMdu97g9C5aLg8Onfdn551hayOA== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42181999-3dbc-4b9a-19af-08d7ba2a90ff X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2020 19:40:28.3273 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GNaaPnAFL8Z9OzrwbSCkLc2Y+HXvpgQsHj3L6JTITDp/wXFPKuZyPy/qXWKY/I59 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1282 Content-Type: text/plain This patch set fixes an issue introduced recently in MpInitLib, where we read a PlatformId MSR that is not implemented on AMD processors. The proposed solution is to export the StandardSignatureIsAuthenticAMD function from LocalApicLib, so that it may be used by MpInitLib or any other module that consumes LocalApicLib. Alternatively, we considered creating a new library, but opted against it as that would incur quite a bit of churning across modules that consume MpInitLib. BTW, reading the PlatformId MSR was already being done by MicrocodeDetect(), but it never affected AMD-based platforms as the flow never gets that far, since the Detect routine bails out early when it finds the size of the patch is zero. Leo Duran (2): UefiCpuPkg: LocalApicLib: Export StandardSignatureIsAuthenticAMD function UefiCpuPkg: MpInitLib: Exclude code no pertinent to AMD processors. UefiCpuPkg/Include/Library/LocalApicLib.h | 15 +++++++ UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 47 +++++++++++----------- .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 47 +++++++++++----------- UefiCpuPkg/Library/MpInitLib/Microcode.c | 17 +++++++- UefiCpuPkg/Library/MpInitLib/MpLib.c | 11 ++++- 5 files changed, 87 insertions(+), 50 deletions(-) -- 2.7.4