lkml.org 
[lkml]   [2018]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/efi: Don't unmap EFI boot services code/data regions for EFI_OLD_MEMMAP and EFI_MIXED_MODE

* Prakhya, Sai Praneeth <sai.praneeth.prakhya@intel.com> wrote:

> > > > + /*
> > > > + * To Do: Remove this check after adding functionality to unmap EFI
> > boot
> > > > + * services code/data regions from direct mapping area because
> > > > + * "efi=old_map" maps EFI regions in swapper_pg_dir.
> > > > + */
> > > > + if (efi_enabled(EFI_OLD_MEMMAP))
> > > > + return;
> > > > +
> > > > + /*
> > > > + * EFI mixed mode has all RAM mapped to access arguments while
> > making
> > > > + * EFI runtime calls, hence don't unmap EFI boot services code/data
> > > > + * regions.
> > > > + */
> > > > + if (!efi_is_native() && IS_ENABLED(CONFIG_EFI_MIXED))
> >
> > AFAIK efi_is_native() can only return false is CONFIG_EFI_MIXED is set, so this
> > expression can be simplified.
>
> Makes sense.
> efi_is_native() returns true for 32-bit machines running 32-bit firmware.

Forgot to mention that I performed this simplification in the commit I
applied:

+ /*
+ * To Do: Remove this check after adding functionality to unmap EFI boot
+ * services code/data regions from direct mapping area because
+ * "efi=old_map" maps EFI regions in swapper_pg_dir.
+ */
+ if (efi_enabled(EFI_OLD_MEMMAP))
+ return;
+
+ /*
+ * EFI mixed mode has all RAM mapped to access arguments while making
+ * EFI runtime calls, hence don't unmap EFI boot services code/data
+ * regions.
+ */
+ if (!efi_is_native())
+ return;

Thanks,

Ingo

\
 
 \ /
  Last update: 2018-12-25 10:51    [W:0.077 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site