lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.0 30/46] x86/boot/compressed/64: Do not read legacy ROM on EFI system
On Sat, Mar 09, 2019 at 10:10:19PM -0800, hpa@zytor.com wrote:
> >@@ -47,8 +50,18 @@ static unsigned long find_trampoline_pla
> > * This code is based on reserve_bios_regions().
> > */
> >
> >- ebda_start = *(unsigned short *)0x40e << 4;
> >- bios_start = *(unsigned short *)0x413 << 10;
> >+ /*
> >+ * EFI systems may not provide legacy ROM. The memory may not be
> >mapped
> >+ * at all.
> >+ *
> >+ * Only look for values in the legacy ROM for non-EFI system.
> >+ */
> >+ signature = (char *)&boot_params->efi_info.efi_loader_signature;
> >+ if (strncmp(signature, EFI32_LOADER_SIGNATURE, 4) &&
> >+ strncmp(signature, EFI64_LOADER_SIGNATURE, 4)) {
> >+ ebda_start = *(unsigned short *)0x40e << 4;
> >+ bios_start = *(unsigned short *)0x413 << 10;
> >+ }
> >
> > if (bios_start < BIOS_START_MIN || bios_start > BIOS_START_MAX)
> > bios_start = BIOS_START_MAX;
>
> Only one objection: the explanation is nonsensical.

Well, that's the best explanation I've come up with :/

I would be glad for any insight here.

--
Kirill A. Shutemov

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