From owner-svn-src-head@FreeBSD.ORG Sat Mar 7 19:14:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B5A6334; Sat, 7 Mar 2015 19:14:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05F02915; Sat, 7 Mar 2015 19:14:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27JE2FF011998; Sat, 7 Mar 2015 19:14:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27JE2xr011997; Sat, 7 Mar 2015 19:14:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071914.t27JE2xr011997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279738 - head/sys/boot/amd64/boot1.efi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:14:03 -0000 Author: trasz Date: Sat Mar 7 19:14:01 2015 New Revision: 279738 URL: https://svnweb.freebsd.org/changeset/base/279738 Log: Add error reporting (but not actual handling yet, apart from reporting them) for EFI calls to boot1.efi. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/amd64/boot1.efi/boot1.c Modified: head/sys/boot/amd64/boot1.efi/boot1.c ============================================================================== --- head/sys/boot/amd64/boot1.efi/boot1.c Sat Mar 7 18:48:00 2015 (r279737) +++ head/sys/boot/amd64/boot1.efi/boot1.c Sat Mar 7 19:14:01 2015 (r279738) @@ -307,12 +307,19 @@ load(const char *fname) /* XXX: For secure boot, we need our own loader here */ status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, buffer, bufsize, &loaderhandle); + if (EFI_ERROR(status)) + printf("LoadImage failed with error %d\n", status); status = systab->BootServices->HandleProtocol(loaderhandle, &LoadedImageGUID, (VOID**)&loaded_image); + if (EFI_ERROR(status)) + printf("HandleProtocol failed with error %d\n", status); + loaded_image->DeviceHandle = bootdevhandle; status = systab->BootServices->StartImage(loaderhandle, NULL, NULL); + if (EFI_ERROR(status)) + printf("StartImage failed with error %d\n", status); } static void