NetBSD Problem Report #54191

From mgorny@pomiocikbsd.local  Fri May 10 15:13:05 2019
Return-Path: <mgorny@pomiocikbsd.local>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B88E47A1AC
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 10 May 2019 15:13:04 +0000 (UTC)
Message-Id: <20190510151300.A8D039B6B3@pomiocikbsd.local>
Date: Fri, 10 May 2019 15:13:00 +0000 (UTC)
From: mgorny@NetBSD.org
Reply-To: mgorny@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: i386 kernel does not boot via 64-bit EFI
X-Send-Pr-Version: 3.95

>Number:         54191
>Category:       port-i386
>Synopsis:       i386 kernel hangs/reboots when running via 64-bit EFI bootloader
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 10 15:15:00 +0000 2019
>Originator:     Michal Gorny
>Release:        NetBSD 8.99.37
>Organization:
>Environment:
System: NetBSD pomiocikbsd.local 8.99.37 NetBSD 8.99.37 (GENERIC) #0: Thu May 9 14:42:33 UTC 2019 root@pomiocikbsd.local:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
I have installed NetBSD/amd64 on UEFI using information from [1]. I have
added the EFI bootloader to my systemd-boot instance, and the amd64
version is working just fine.

Afterwards, I wanted to install i386 version of the system. However,
the kernel fails to boot when started via 64-bit EFI bootloader
(from /usr/mdec/bootx64.efi). If CSM is disabled, it reboots immediately
after loading the kernel. If CSM is enabled, it just hangs with blank
screen (and non-blinking cursor at top).

For completeness, I should add that 32-bit EFI bootloader (bootia32.efi)
can not be used on 64-bit UEFI (EFI says that the binary is invalid).

[1] https://wiki.netbsd.org/Installation_on_UEFI_systems/

>How-To-Repeat:
Install NetBSD according to the linked guide (I had to enable CSM
and boot BIOS-compatible bootloader from install image).  Then start
64-bit EFI bootloader and try to boot the kernel.

I have also tried building and installing the kernel from trunk. 

>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.