From owner-freebsd-stable@freebsd.org Mon Dec 2 08:23:45 2019 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 901081C9F33 for ; Mon, 2 Dec 2019 08:23:45 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47RJ6S74PVz4nSK for ; Mon, 2 Dec 2019 08:23:44 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id xB28Nhfm026214 for ; Mon, 2 Dec 2019 09:23:43 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 6349B8EE for ; Mon, 2 Dec 2019 09:23:43 +0100 (CET) From: Harry Schmalzbauer Subject: Re: UEFI ISO boot not working in 12.1 ? To: FreeBSD-STABLE Mailing List References: <20191106191711.GK1177@westeros.distal.com> <20191106210256.GL1177@westeros.distal.com> <1db62ff2-e7df-5bef-7c6d-424f4367370a@freebsd.org> <24bd3c37-e834-9599-acd9-2f4966916eae@freebsd.org> <20191107195325.GO1177@westeros.distal.com> <20191109164233.GB1053@westeros.distal.com> Organization: OmniLAN Message-ID: Date: Mon, 2 Dec 2019 09:23:42 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------7ED70A944226CF0887322411" Content-Language: en-US X-Greylist: ACL 136 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Mon, 02 Dec 2019 09:23:43 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: 47RJ6S74PVz4nSK X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@omnilan.de designates 2a00:e10:2800::a130 as permitted sender) smtp.mailfrom=freebsd@omnilan.de X-Spamd-Result: default: False [-3.61 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_ATTACHMENT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[omnilan.de]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:61157, ipnet:2a00:e10:2800::/38, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-2.31)[ip: (-9.19), ipnet: 2a00:e10:2800::/38(-4.56), asn: 61157(2.20), country: DE(-0.01)] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2019 08:23:45 -0000 This is a multi-part message in MIME format. --------------7ED70A944226CF0887322411 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Am 09.11.2019 um 18:24 schrieb Kyle Evans: > On Sat, Nov 9, 2019 at 10:42 AM Chris Ross wrote: >> On Thu, Nov 07, 2019 at 02:53:25PM -0500, Chris Ross wrote: >>>>> On Thu, Nov 7, 2019 at 9:46 AM Julian Elischer wrote: >>>>>> You could try some bisection back along the 12 branch.. >>> Yeah. I was hoping for an easier path, but. I can try slogging back >>> through stable-12 a month or two at a time. >> Okay. I spent a bunch of time moving around stable-12 by date, and >> an ISO build from stable-12 as of 2019-10-14 works (rev 353483), and >> 2019-10-15 (rev 353541) does not. … >> That helps- thanks! I'm CC'ing tsoome@, as this is basically just >> r353501 in that range. Can you give the latest -CURRENT snapshot boot >> as another data point? I can confirm that reverting r353501 on stable/12 from yesterday solves my problem with booting the setup media. (My symptoms on ESXi 6.7 guest using SATA vODD: r355263 loads kernel/modules but stucks with 100%CPU while trying to hand over to kernel) My svn skills are as lousy as my C skills, but to me it seems like a mismerge. The attached patch (against r355263, stable/12 from yesterday _without_ reverting r353501!) solves my problem. But please could someone familiar with svn&code inspect what happened and verify/correct/commit the fix. Solving my problem doesn't mean my approach is correct.  I don't know HandleProtocol() nor OpenProtocol() nor did I read the code trying to understand what's happening in "proto.c". I just text-edited a obvious cannotbe… Maby I missed a lot of things… In case attachment won't make it to the list (white space nits to be expected): Index: stand/efi/boot1/proto.c =================================================================== --- stand/efi/boot1/proto.c     (Revision 355263) +++ stand/efi/boot1/proto.c     (Arbeitskopie) @@ -61,7 +61,7 @@         int preferred;         /* Figure out if we're dealing with an actual partition. */ -       status = BS->HandleProtocol(h, &DevicePathGUID, (void **)&devpath); +       status = OpenProtocolByHandle(h, &DevicePathGUID, (void **)&devpath);         if (status == EFI_UNSUPPORTED)                 return (0); @@ -77,7 +77,7 @@                 efi_free_devpath_name(text);         }  #endif -       status = BS->HandleProtocol(h, &BlockIoProtocolGUID, (void **)&blkio); +       status = OpenProtocolByHandle(h, &BlockIoProtocolGUID, (void **)&blkio);         if (status == EFI_UNSUPPORTED)                 return (0); Index: stand/efi/gptboot/proto.c =================================================================== --- stand/efi/gptboot/proto.c   (Revision 355263) +++ stand/efi/gptboot/proto.c   (Arbeitskopie) @@ -146,7 +146,7 @@         EFI_STATUS status;         /* Figure out if we're dealing with an actual partition. */ -       status = BS->HandleProtocol(h, &DevicePathGUID, (void **)&devpath); +       status = OpenProtocolByHandle(h, &DevicePathGUID, (void **)&devpath);         if (status != EFI_SUCCESS)                 return;  #ifdef EFI_DEBUG @@ -169,7 +169,7 @@                         return;                 }         } -       status = BS->HandleProtocol(h, &BlockIoProtocolGUID, (void **)&blkio); +       status = OpenProtocolByHandle(h, &BlockIoProtocolGUID, (void **)&blkio);         if (status != EFI_SUCCESS) {                 DPRINTF("Can't get the block I/O protocol block\n");                 return; But reading this thread leaves one question: Does 12.1-RELEASE refuse to boot on regular ESXi UEFI guests!? Thanks, -Harry (resent due to ?expired? subscription…; original message was addressed to all other recipients) --------------7ED70A944226CF0887322411 Content-Type: text/x-patch; name="efiloader_MFCfix-HandleProtocol2OpenProtocol.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="efiloader_MFCfix-HandleProtocol2OpenProtocol.patch" Index: stand/efi/boot1/proto.c =================================================================== --- stand/efi/boot1/proto.c (Revision 355263) +++ stand/efi/boot1/proto.c (Arbeitskopie) @@ -61,7 +61,7 @@ int preferred; /* Figure out if we're dealing with an actual partition. */ - status = BS->HandleProtocol(h, &DevicePathGUID, (void **)&devpath); + status = OpenProtocolByHandle(h, &DevicePathGUID, (void **)&devpath); if (status == EFI_UNSUPPORTED) return (0); @@ -77,7 +77,7 @@ efi_free_devpath_name(text); } #endif - status = BS->HandleProtocol(h, &BlockIoProtocolGUID, (void **)&blkio); + status = OpenProtocolByHandle(h, &BlockIoProtocolGUID, (void **)&blkio); if (status == EFI_UNSUPPORTED) return (0); Index: stand/efi/gptboot/proto.c =================================================================== --- stand/efi/gptboot/proto.c (Revision 355263) +++ stand/efi/gptboot/proto.c (Arbeitskopie) @@ -146,7 +146,7 @@ EFI_STATUS status; /* Figure out if we're dealing with an actual partition. */ - status = BS->HandleProtocol(h, &DevicePathGUID, (void **)&devpath); + status = OpenProtocolByHandle(h, &DevicePathGUID, (void **)&devpath); if (status != EFI_SUCCESS) return; #ifdef EFI_DEBUG @@ -169,7 +169,7 @@ return; } } - status = BS->HandleProtocol(h, &BlockIoProtocolGUID, (void **)&blkio); + status = OpenProtocolByHandle(h, &BlockIoProtocolGUID, (void **)&blkio); if (status != EFI_SUCCESS) { DPRINTF("Can't get the block I/O protocol block\n"); return; --------------7ED70A944226CF0887322411--