From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.52]) by mx.groups.io with SMTP id smtpd.web11.32321.1620656710806583014 for ; Mon, 10 May 2021 07:25:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=SK9iEUaP; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.237.52, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mITBCihzCn6Z8Eyw6GJVnDWfUXdW+2h60i9A1fsGrw95n5N/5iq9xKFMclcvtDCXuuEp0N/Klm7goervLUYjfgLK3CE9G/8AFvcDop716nKrPswCV51i0syTA2pqRmUhUnBtCIIDJwYC6WmXfhTMBlfZ06Gkcl3XcfzRZW2feR4eSkAZuhIAKH/iLn2uTtcr13Rj+DYjyeI4eXgMGFjlvYfH0vyw4sWCGx5DpbvQCZlnxTPrK8O7nRG3VD/w0RPDEyB2InqdzonQG4gl8egedoh6rjs+qbdf9FOIbFyL4UQeiXQuphAXIOzugAx591tQ6LY4WbICA9Yb05MRbospsA== 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=Nwzn+FKc8R1xR24Oto5YxsW8NXVK9DuoQRXJNT7fozI=; b=GgN2xiS80QB66ZDGsuSny7EXdDTulf9yxZ6h8oF4Z7OfJ82UjdAePIlRoW7JP2E8NfMc89Zzk6Ox7rEAtS3IJOewzruA3LbAss/tjcSk6kolqjxDdPAKTQIIKGT5qA8LTbwi8JNAoAaAaSZDMsAlV0ICOCGRGbmn9pgetgOuricRzP23h1E3nNChzIl9XWDoB7MDY/bXEDrciSXS1t0Xnt1rPQenhIGZsfAPwg070tybJH8vdZ3rEOm5+Anc712ARYyLPxmuPey7+4CyYSeuTD4avNMBBIm1MDhoO7rOYED1sX3Xd988SzRRvVIV1M/1NH69zHfccQg/RQU/7lLkyg== 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=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Nwzn+FKc8R1xR24Oto5YxsW8NXVK9DuoQRXJNT7fozI=; b=SK9iEUaPaSkTTQBn6JF/XcVWnJwfX3CE/9EN7SMK9yrski1tPsfYxSAwYZWA3bDw5XRt/nlEFyutBd11ZbXBeICmy3VTD9N66HpLZzV9/H3xhJMtACaasUoCSidhI187Vi9xpF/Wb22doIpK4TIiR4X9d33hNvlC1n+uo0sXs5s= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM5PR1201MB0123.namprd12.prod.outlook.com (2603:10b6:4:50::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 14:25:07 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9%12]) with mapi id 15.20.4108.031; Mon, 10 May 2021 14:25:06 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io CC: Brijesh Singh , Eric Dong , Ray Ni , Laszlo Ersek , Rahul Kumar Subject: [PATCH] UefiCpuPkg/MpInitLib: Properly cast from PCD to SEV-ES jump table pointer Date: Mon, 10 May 2021 09:24:55 -0500 Message-ID: X-Mailer: git-send-email 2.31.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN4PR0601CA0017.namprd06.prod.outlook.com (2603:10b6:803:2f::27) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from tlendack-t1.amd.com (165.204.77.1) by SN4PR0601CA0017.namprd06.prod.outlook.com (2603:10b6:803:2f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 14:25:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d23e2da7-89b8-4864-8aec-08d913bf68b5 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0123: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qh6uw3x2IIxedyLwtZz2C4jqfNU6EuOQOVBNiIUEHoyYFP1HD/6AIzMpdSm1nkkrQlp52HlBQtdLaoNaGLNEKYLz2uBtIV0j5vJDYWgAFiYkQjLTfWXCgx6JzzzqS7gzz1BOnz7BIfIQmY69T7BEjcJOxX4YDuTl8yPQnBooqZiXwSoJB44ISnDnaKH5GtoD79QCqudYrUBBAuCNREZZCO+GDTYroqfPM8duA85b5pRZmfqxc85IPaAoh2OWadczC94p/chW/OXq8IFqAGuZnWeszoGRudiA5mkSTq9xoqqqgqpFLzozBr4G0lNyDN2UT6Sw4mnCAIh1834hMkWgE0DVOWVJwW3Wz52d2ORGfcQaf2Reiu47PxvqycCbHWXkHr65JyIRV0cQ1JhBL5TvKDB8NOwj1CkjNxk2RQR4hcbSsUb61SOEeAovGNBSdQNIi+7jp/bXYQNS8k8JqGVH/Q1F+kw9J06K0qZnTMxLnUhUj3IoYOzKuB5DXUtWBC/kaFHzzZpB1FlvQpQLeqbjRmu0OPUmByd3YTam5MpUiSG5Y0jbm1X6oI06tvKJCS9zjYazpQwsPl81orzWGMidADJzH1C8YLd4yR5sRGarXvldG1ZbVwYnkxXpHfHrtLobhE/aXzAHAoEPzgxpU62HrR4On5D1YgmLXrb1M/XrKBcaqxZRE2z3Bylvna81DK+dgH2Vp3z3Km6qQ5B1FdmoZG/at45O47Ew7LSuW1LI1+w= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB1355.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(366004)(396003)(39860400002)(376002)(136003)(346002)(26005)(38350700002)(38100700002)(7696005)(6666004)(66946007)(5660300002)(4326008)(316002)(66556008)(66476007)(6486002)(2616005)(8676002)(186003)(16526019)(956004)(8936002)(2906002)(36756003)(83380400001)(52116002)(54906003)(966005)(6916009)(478600001)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?AC5lECpsa3qGuRfe6gHurfsfwu1i7nnm++4v5cygrF9uPD74bniHRxzXSXPo?= =?us-ascii?Q?gP2matY8FQSa9yAT3b7DNJKDVogsm3ST63gLlGs2Njt2jPog9F4vjQyBMAA5?= =?us-ascii?Q?q0EPjeQ5QpjFKcB7zI7HD9CSHursiamkLtDrE4cb9Sm6+PkEM5aSw4SxLhNp?= =?us-ascii?Q?KVanUrnsqtBpwl9qpgnxq70XFVdbNrHF7TedfgIS1czDK4oVijzUFMqFWDGK?= =?us-ascii?Q?iLt/H7SI3gAAxWorx3IdsEWJ6WJXT7trRs3JftuU7KN+pIXLihSRYArmR1Gd?= =?us-ascii?Q?T03ic7tbf6GlaQ+bKQMjHFNLkG8H46TX9dbAFRiW/NCE3VsTPJ8Ukk5W1LUM?= =?us-ascii?Q?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c35kSRbBvN?= =?us-ascii?Q?Il21QOjm8dc/VK7ugNKxGMHq8LmYcuKSRcGOaIdZ31kVb1mjehea/7MxAMV7?= =?us-ascii?Q?Hc4VFnUQBGSPPIyMQTZ83eiS?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d23e2da7-89b8-4864-8aec-08d913bf68b5 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 14:25:06.8254 (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: GR5P7Uj+YnmEZ2QP5I/YQv1ARMC0wkEaMCDt8FHFOuAQGs/k0Nn+hifiYXIS/0n4xX53mbYUu/aG46WVAzcL0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0123 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3385 A VS2012 build fails with a cast conversion warning when the SEV-ES work area PCD is cast as a pointer to the SEV_ES_AP_JMP_FAR type. When casting from a PCD value to a pointer, the cast should first be done to a UINTN and then to the pointer. Update the code to perform a cast to a UINTN before casting to a pointer to the SEV_ES_AP_JMP_FAR type. Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Signed-off-by: Tom Lendacky --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index 3d945972a025..dc2a54aa31e8 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1265,7 +1265,7 @@ SetSevEsJumpTable ( UINT32 Offset, InsnByte; UINT8 LoNib, HiNib; =20 - JmpFar =3D (SEV_ES_AP_JMP_FAR *) FixedPcdGet32 (PcdSevEsWorkAreaBase); + JmpFar =3D (SEV_ES_AP_JMP_FAR *) (UINTN) FixedPcdGet32 (PcdSevEsWorkArea= Base); ASSERT (JmpFar !=3D NULL); =20 // --=20 2.31.0