From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (NAM02-CY1-obe.outbound.protection.outlook.com [40.107.76.52]) by mx.groups.io with SMTP id smtpd.web09.9418.1610031693894910778 for ; Thu, 07 Jan 2021 07:01:34 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=MfoeFvJv; 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.76.52, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KbYCxxZoMQtuO2yCwWKoCgkZAZvbnIU5a5G2zXm7TleV7+S1K6SBGpxXwD346n91SorU9j4tyXAKbhPhxercWJivkP2xqNh75/PNNGsdB/LokJyjCA7nJ+VN+ZwZgC3/51dNVrTMFED3pwrbzNjsgvlFCF2/B5S1pLSApH5axenf4gnDAOTbUAji4+CzXzLL33yzw9Q3N3iwB0EahI6eITY/+WfPVolbaeNBBQfGB3vtANLthF0ldDdO9vCJyCFb0vnYSwbi3T5bS+lIKtVALXJ3iD+UmCppE6yZdOxeuH1cia8L2XIXcCpEL1uDqZpYK6MjQIP8wrwj64ZkfToR3g== 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=gdp72Xz/k2x4+D2O1Lhs9DqgdT/DEe4jXZ22sqiBM5M=; b=ku7QAilLBwlPzQxPdP5RVapmO9mwdj1EbtR+Hh0UrvSPw04CCdaYmGdc1aB7aMH4eQ1j4mMgszkQCatQZ2fZ4CLQC+6aJ3oAo8x84KgErEqHfxBbemOd5n8DDWnC6I3dOsqyEyxf8Ay2YlTzZkXWCnUe9Ky801LNDmH1zNSeSIVpKlrpb6eplavecgEv8ccNOqT6detDDoN/ZNw/DK/JyUDpjbMngOTPDPWqs6J22PKAZdD85xZxGCWfe0V0t9UuMD6WlKVBZZ9vma59TLcZflTv+Rs+mAQmu6uDktjrQqrGDZhXiG/zj3TCpT2gF1hNfypl80LXjIEr2ONaQmeR0Q== 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=gdp72Xz/k2x4+D2O1Lhs9DqgdT/DEe4jXZ22sqiBM5M=; b=MfoeFvJv1VDQH/ipAHeWQyys1QnNsp4G9kjixzD6oRBItqGEahYTUu0WBxJlnEGybz7wDP2K9XuoOv2GGA3bl1h49czakW2Ek4D/lOyLxy+C52BCiOJoxOvzuhdUKK4Zc5H1bqguM2v05/+iFte9qz5aY/PjM1U6XtFc4f1YBUY= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM6PR12MB4960.namprd12.prod.outlook.com (2603:10b6:5:1bc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Thu, 7 Jan 2021 15:01:32 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::d95e:b9d:1d6a:e845]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::d95e:b9d:1d6a:e845%12]) with mapi id 15.20.3721.024; Thu, 7 Jan 2021 15:01:32 +0000 Subject: Re: [edk2-devel] [PATCH V2] UefiCpuPkg/CpuDxe: Fix boot error To: devel@edk2.groups.io, guo.dong@intel.com Cc: eric.dong@intel.com, ray.ni@intel.com, lersek@redhat.com, rahul1.kumar@intel.com References: <20210107031045.6760-1-guo.dong@intel.com> From: "Lendacky, Thomas" Message-ID: <3bf2b64d-0125-beea-9c68-51deafc54d6a@amd.com> Date: Thu, 7 Jan 2021 09:01:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: <20210107031045.6760-1-guo.dong@intel.com> X-Originating-IP: [67.79.209.213] X-ClientProxiedBy: SN4PR0501CA0021.namprd05.prod.outlook.com (2603:10b6:803:40::34) 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 office-linux.texastahm.com (67.79.209.213) by SN4PR0501CA0021.namprd05.prod.outlook.com (2603:10b6:803:40::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.2 via Frontend Transport; Thu, 7 Jan 2021 15:01:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8634e8f6-5b48-46bd-7968-08d8b31d1f0c X-MS-TrafficTypeDiagnostic: DM6PR12MB4960: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JE7IlyZDEfrt4n6rNW/Wjj2QUZPSra9xCtZ5odXUXHG+OXqxb7WSW5Z5b1zG9ID74vCvTJoBSWArFakuLicxh5JhNgTC5P/+SIpr/XUzoM/sO0NKPq0cVhC4dZkoT0XF678kDt0myKoysuidGPGmMNocH6qBpq0TlFJdqJTgXdsx+RzNjmnzQOSMFX5VwGZhisZIm8vX9qvZUMjdFSM6o97kDHYvMXy2pIiDKlVz8UsatzSJuBrx4AKX+EhD2Cn8WZbvrafVtZ1o4GvnLJVyxd31ipK9srgpauqO+Fl3x1imsB/ZvMvxWshiK8NSvx5hUm0/UMYfnalaGr7wVAeXd5IhYDfxYPUyP7J/TKlWiqfe3AC4fO98mfxNPN8Z0IIeklBpdh2sCtH0DY8DqAtjlV9sOmN44WJvqs7WC5P4hjKO6/5RKx8W474UTqnDxfZ3iEXaGmSKkBMMAx0XWqvABttd7ABVubO3jANqeeqMZrqGtVCmFbVEUijas65spauGH397vwfRMdep63c6KRsdrPfSPSsF5L3vHd9vIAUJRuQkXkuAoImLjIQKS5m7AEr+ 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:(4636009)(346002)(376002)(396003)(39860400002)(136003)(366004)(6512007)(66946007)(66476007)(19627235002)(4326008)(86362001)(8676002)(8936002)(66556008)(6486002)(52116002)(2906002)(956004)(83380400001)(36756003)(2616005)(5660300002)(26005)(478600001)(6506007)(16526019)(31696002)(31686004)(966005)(53546011)(316002)(186003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?WjVLMC9ZM3BYb25xZkwzeGo1RnlucENzMGQ5WkQ4ZXlzZENwb3BlSHF1OFEw?= =?utf-8?B?Q1N1a2R2Yks2Sm1QY2Y1TjJLTVFtTy8ydVYrK2ozcjkxV2xWSW1Qak1uc3FP?= =?utf-8?B?V2pBaWVRRW5CSGYzNGNkYjRUaVljZURxaWVHT2Nnd0cyckZsN1NRSTV1dmw5?= =?utf-8?B?R0xLVUZrYStHZUVreFFWQnVveStGSWRNaG1mR09IL2MxK3FmNG5vVkVRWlZB?= =?utf-8?B?ejlNODBEa3dqaStOSVBWeUh3Nko5RDJPc1VGNkRzTzEweXNqR00vTEZxZWNr?= =?utf-8?B?UkJWemNLQ1V1NjNyY3l2aG02bVZ3alRGL1B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pvVXh1TDVLcWxRTjhyQTc3bFBPWitBTGFYamhVc2Fta255?= =?utf-8?B?NHNOeENaWW5ycHNtdGdrVERjRm5yYWZ6VE03bXVhYTU4bkpnZjdxdjlhWmZy?= =?utf-8?Q?9galRQA1DFs24aYodT1cvM83hKxwABIFrL?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2021 15:01:32.8670 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-Network-Message-Id: 8634e8f6-5b48-46bd-7968-08d8b31d1f0c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: L7UqHPJG1kuCG//Fz6prCkaFZQOAFenyMccleKJs2AALeDQOICR0cPmSanH5lB8exfPtmiPpVJMBc8hBeuwfKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4960 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 1/6/21 9:10 PM, Guo Dong via groups.io wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3084 > > When DXE drivers are dispatched above 4GB memory in 64bit > mode, the address setCodeSelectorLongJump in stack will > be override by parameter. Jump to Qword is not supported > by some processors. So use "o64 retf" instead. > > Signed-off-by: Guo Dong With one little comment below, I verified this method allows my system to boot. Tested-by: Tom Lendacky > --- > UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm > index c3489bcc3e..a8216cd56f 100644 > --- a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm > +++ b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm > @@ -20,13 +20,11 @@ > ;------------------------------------------------------------------------------ > global ASM_PFX(SetCodeSelector) > ASM_PFX(SetCodeSelector): > - sub rsp, 0x10 > + push rcx, Extraneous comma after rcx. Thanks, Tom > lea rax, [setCodeSelectorLongJump] > - mov [rsp], rax > - mov [rsp+4], cx > - jmp dword far [rsp] > + push rax > + o64 retf > setCodeSelectorLongJump: > - add rsp, 0x10 > ret > > ;------------------------------------------------------------------------------ >