[edk2-devel] [PATCH V2 5/6] MdePkg/Cpuid.h: Move Cpuid.h from UefiCpuPkg to MdePkg

Michael D Kinney michael.d.kinney at intel.com
Tue Jul 30 16:30:42 UTC 2019


Liming,

Yes.  That would be the correct include statement for
a module/lib that depends on MdePkg.

I know we have modules/libs that use the UefiCpuPkg
and use #include <Register/Cpuid.h>.  If we want to 
provide compatibility with all consumers of the UefiCpuPkg,
the Cpuid.h file in the UefiCpuPkg can updated to simply
include <Register/Intel/Cpuid.h> from MdePkg.  We could
also choose to update those consumers to use the new path
in the MdePkg.

Mike

> -----Original Message-----
> From: Gao, Liming
> Sent: Monday, July 29, 2019 8:49 PM
> To: Kinney, Michael D <michael.d.kinney at intel.com>; Ni,
> Ray <ray.ni at intel.com>; devel at edk2.groups.io
> Cc: Dong, Eric <eric.dong at intel.com>; Laszlo Ersek
> <lersek at redhat.com>
> Subject: RE: [PATCH V2 5/6] MdePkg/Cpuid.h: Move
> Cpuid.h from UefiCpuPkg to MdePkg
> 
> Mike:
>   OK. If so, the consumer code also need to obviously
> include vendor header file, such as #include
> <Register/Intel/Cpuid.h>. Right?
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: Kinney, Michael D
> > Sent: Tuesday, July 30, 2019 11:42 AM
> > To: Gao, Liming <liming.gao at intel.com>; Ni, Ray
> <ray.ni at intel.com>;
> > devel at edk2.groups.io; Kinney, Michael D
> <michael.d.kinney at intel.com>
> > Cc: Dong, Eric <eric.dong at intel.com>; Laszlo Ersek
> <lersek at redhat.com>
> > Subject: RE: [PATCH V2 5/6] MdePkg/Cpuid.h: Move
> Cpuid.h from
> > UefiCpuPkg to MdePkg
> >
> > Liming,
> >
> > There is an unresolved discussion on the location of
> this file in the
> > MdePkg.  I prefer a vendor name in the path.
> >
> >     MdePkg/Include/Register/Intel/Cpuid.h
> >
> > Also, after this file is moved to MdePkg, we can
> enter new BZs to
> > update all the modules that call AsmCpuid and
> AsmCpuidEx to use the
> > defines and structures from Cpuid.h.
> >
> > Mike
> >
> > > -----Original Message-----
> > > From: Gao, Liming
> > > Sent: Monday, July 29, 2019 8:29 PM
> > > To: Ni, Ray <ray.ni at intel.com>;
> devel at edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney at intel.com>;
> Dong, Eric
> > > <eric.dong at intel.com>; Laszlo Ersek
> <lersek at redhat.com>
> > > Subject: RE: [PATCH V2 5/6] MdePkg/Cpuid.h: Move
> Cpuid.h from
> > > UefiCpuPkg to MdePkg
> > >
> > > The change is good to me. Reviewed-by: Liming Gao
> > > <liming.gao at intel.com>
> > >
> > > > -----Original Message-----
> > > > From: Ni, Ray
> > > > Sent: Wednesday, July 24, 2019 6:00 PM
> > > > To: devel at edk2.groups.io
> > > > Cc: Kinney, Michael D
> <michael.d.kinney at intel.com>;
> > > Gao, Liming
> > > > <liming.gao at intel.com>; Dong, Eric
> > > <eric.dong at intel.com>; Laszlo Ersek
> > > > <lersek at redhat.com>
> > > > Subject: [PATCH V2 5/6] MdePkg/Cpuid.h: Move
> Cpuid.h
> > > from UefiCpuPkg
> > > > to MdePkg
> > > >
> > > > REF:
> > > https://bugzilla.tianocore.org/show_bug.cgi?id=2008
> > > >
> > > > MdeModulePkg/DxeIpl needs to get CPUID output for
> CPU
> > > 5-level paging
> > > > capability detection.
> > > >
> > > > In order to use the macros/structures defined in
> > > > UefiCpuPkg/Include/Register/Cpuid.h, the patch
> moves
> > > Cpuid.h to
> > > > MdePkg/Include/Register/ directory.
> > > >
> > > > Because almost every module depends on MdePkg.dec
> in
> > > its INF file, the
> > > > move almost has no impact.
> > > >
> > > > Signed-off-by: Ray Ni <ray.ni at intel.com>
> > > > Cc: Michael D Kinney <michael.d.kinney at intel.com>
> > > > Cc: Liming Gao <liming.gao at intel.com>
> > > > Cc: Eric Dong <eric.dong at intel.com>
> > > > Cc: Laszlo Ersek <lersek at redhat.com>
> > > > ---
> > > >  {UefiCpuPkg => MdePkg}/Include/Register/Cpuid.h
> | 0
> > > >  1 file changed, 0 insertions(+), 0 deletions(-)
> > > rename {UefiCpuPkg
> > > > => MdePkg}/Include/Register/Cpuid.h (100%)
> > > >
> > > > diff --git a/UefiCpuPkg/Include/Register/Cpuid.h
> > > > b/MdePkg/Include/Register/Cpuid.h similarity
> index
> > > 100% rename from
> > > > UefiCpuPkg/Include/Register/Cpuid.h
> > > > rename to MdePkg/Include/Register/Cpuid.h
> > > > --
> > > > 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44635): https://edk2.groups.io/g/devel/message/44635
Mute This Topic: https://groups.io/mt/32582439/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list