[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190312095026.obzxv65roj3fcu32@kshutemo-mobl1>
Date: Tue, 12 Mar 2019 12:50:26 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: hpa@...or.com
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Pitam Mitra <pitamm@...il.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Bockjoo Kim <bockjoo@...s.ufl.edu>, bp@...en8.de
Subject: Re: [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@...or.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
Powered by blists - more mailing lists