Agree, I will replace it with simple assert check: ASSERT (sizeof (UINTN) == sizeof (UINT32));
Thanks, Jiaxin > -----Original Message----- > From: Gerd Hoffmann <kra...@redhat.com> > Sent: Tuesday, May 9, 2023 10:42 PM > To: devel@edk2.groups.io; Wu, Jiaxin <jiaxin...@intel.com> > Cc: Dong, Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Zeng, Star > <star.z...@intel.com>; Kumar, Rahul R <rahul.r.ku...@intel.com> > Subject: Re: [edk2-devel] [PATCH v1 2/3] UefiCpuPkg/CpuMpPei: Enable PAE > page table if CR0.PG is not set > > 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104461): https://edk2.groups.io/g/devel/message/104461 Mute This Topic: https://groups.io/mt/98780501/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-