From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.34450.1683643324899307087 for ; Tue, 09 May 2023 07:42:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VoZAfq7/; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683643323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DTddoK6WAUWhf1DCOOkmjxATP+S1qxBLxxJwmoNgaUo=; b=VoZAfq7/NUz8dcYd554a9B9pSOjm0S9fKQmitbqrNWmc7QNCNLi6lGiTSSkUm8TXs1I+wa QeOXnBqGiOd7WJxRlJSr4EZb2X95yGXRrDhRPFIx77yHPSms/1BSwsdF3TS8uEjLdaFgH5 LbUQSGgelInn/i2UylkjG1YYORw1nX8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-6FuLYjNlOQS0PnicmNxXYw-1; Tue, 09 May 2023 10:42:00 -0400 X-MC-Unique: 6FuLYjNlOQS0PnicmNxXYw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 14F67100F656; Tue, 9 May 2023 14:42:00 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.221]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C9D2C63F5F; Tue, 9 May 2023 14:41:59 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8A5CB18000A6; Tue, 9 May 2023 16:41:58 +0200 (CEST) Date: Tue, 9 May 2023 16:41:58 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, jiaxin.wu@intel.com Cc: Eric Dong , Ray Ni , Zeng Star , Rahul Kumar Subject: Re: [edk2-devel] [PATCH v1 2/3] UefiCpuPkg/CpuMpPei: Enable PAE page table if CR0.PG is not set Message-ID: References: <20230509102253.16632-1-jiaxin.wu@intel.com> <20230509102253.16632-3-jiaxin.wu@intel.com> MIME-Version: 1.0 In-Reply-To: <20230509102253.16632-3-jiaxin.wu@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > + // > + // Check CPU runs in 32bit mode. > + // > + MsrEfer.Uint64 = AsmReadMsr64 (MSR_CORE_IA32_EFER); > + if (MsrEfer.Bits.LMA == 1) { Checking this at runtime is pointless. 32bit code would simply not work in long mode and visa versa. take care, Gerd