On Sat, Mar 09, 2019 at 10:10:19PM -0800, h...@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

Reply via email to