On 1 November 2018 at 17:19, Kinney, Michael D <[email protected]> wrote: > > Leif, > > The MSR definitions are only used by Mtrr.c, and Mtrr.c is only > used for IA32 and X64 builds in the INF file.
Ah, yes, that actually means the rest of the application may be completely valid on ARM. > It would be simpler to move the #include <Register/Msr.h> > into Mtrr.c. That would avoid the use of #if. Yeah, that sounds like the better fix. I was being lazy :) Thanks, will do that for v2. Regards, Leif > Mike > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel- > > [email protected]] On Behalf Of Leif Lindholm > > Sent: Thursday, November 1, 2018 8:37 AM > > To: [email protected] > > Cc: Carsey, Jaben <[email protected]>; Daryl > > McDaniel <[email protected]> > > Subject: [edk2] [PATCH 1/6] AppPkg: fix webserver build > > for !Ia32/X64 > > > > The WebServer application is really quite Ia32/X64 > > specific, but fundamentally > > it builds for other architectures as long as the > > architecture-specific > > #include <Register/Msr.h> > > header file is filtered out. > > So add an architecture-based filter on that to enable > > AppPkg.dsc to build for > > AARCH64/ARM (both listed in SUPPORTED_ARCHITECTURES). > > > > Cc: Daryl McDaniel <[email protected]> > > Cc: Jaben Carsey <[email protected]> > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm <[email protected]> > > --- > > > > Note: there is definitely a case here for just > > disabling this component > > for !Ia32/X64, but the _interesting_ bits of this > > application are > > completely architecture independent, so my > > preference would be to > > do this for now, and worry about remaining issues > > (like MTRR dump) > > at some point in the future. > > > > AppPkg/Applications/Sockets/WebServer/WebServer.h | 2 > > ++ > > 1 file changed, 2 insertions(+) > > > > diff --git > > a/AppPkg/Applications/Sockets/WebServer/WebServer.h > > b/AppPkg/Applications/Sockets/WebServer/WebServer.h > > index 21b07b63df..610abdcf9e 100644 > > --- a/AppPkg/Applications/Sockets/WebServer/WebServer.h > > +++ b/AppPkg/Applications/Sockets/WebServer/WebServer.h > > @@ -20,7 +20,9 @@ > > > > #include <Guid/EventGroup.h> > > > > +#if defined(__x86_64__) || defined(__i386__) > > #include <Register/Msr.h> > > +#endif > > #include <Library/BaseMemoryLib.h> > > #include <Library/DebugLib.h> > > #include <Library/MemoryAllocationLib.h> > > -- > > 2.11.0 > > > > _______________________________________________ > > edk2-devel mailing list > > [email protected] > > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

