From owner-svn-src-head@freebsd.org Sat Jul 14 06:43:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD08104146D; Sat, 14 Jul 2018 06:43:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAEE38CA51; Sat, 14 Jul 2018 06:43:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7A6C1B828; Sat, 14 Jul 2018 06:43:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6E6hboY024265; Sat, 14 Jul 2018 06:43:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6E6hbgG024264; Sat, 14 Jul 2018 06:43:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807140643.w6E6hbgG024264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 14 Jul 2018 06:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336272 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336272 X-SVN-Commit-Repository: base 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.27 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, 14 Jul 2018 06:43:38 -0000 Author: imp Date: Sat Jul 14 06:43:37 2018 New Revision: 336272 URL: https://svnweb.freebsd.org/changeset/base/336272 Log: Minor adjustments: o Fix the parsing of the device path. a last minute change terminated it too soon. o Kill setting LINES. We don't need to do it, and even if we did hard coding it to 24 is wrong. o Now that the console is working again for the loader, adjust the printfs to be more in line with other platforms. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Sat Jul 14 01:46:19 2018 (r336271) +++ head/stand/efi/loader/main.c Sat Jul 14 06:43:37 2018 (r336272) @@ -316,11 +316,6 @@ find_currdev(EFI_LOADED_IMAGE *img) if (dp->pd_parent != NULL) { dp = dp->pd_parent; STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { - text = efi_devpath_name(pp->pd_devpath); - if (text != NULL) { - printf("And now the part: %S\n", text); - efi_free_devpath_name(text); - } /* * Roll up the ZFS special case * for those partitions that have @@ -454,7 +449,7 @@ parse_uefi_con_out(void) goto out; ep = buf + sz; node = (EFI_DEVICE_PATH *)buf; - while ((char *)node < ep && !IsDevicePathEndType(node)) { + while ((char *)node < ep) { pci_pending = false; if (DevicePathType(node) == ACPI_DEVICE_PATH && DevicePathSubType(node) == ACPI_DP) { @@ -469,7 +464,6 @@ parse_uefi_con_out(void) uart = (void *)node; snprintf(bd, sizeof(bd), "%d", uart->BaudRate); setenv("efi_com_speed", bd, 1); - printf("Console speed is %d\n", uart->BaudRate); } else if (DevicePathType(node) == ACPI_DEVICE_PATH && DevicePathSubType(node) == ACPI_ADR_DP) { /* Check for AcpiAdr() Node for video */ @@ -560,6 +554,7 @@ main(int argc, CHAR16 *argv[]) * eg. the boot device, which we can't do yet. We can use * printf() etc. once this is done. */ + setenv("console", "efi", 1); cons_probe(); /* @@ -622,8 +617,6 @@ main(int argc, CHAR16 *argv[]) */ boot_howto_to_env(howto); - printf(" Keyboard: %s", has_kbd ? "yes" : "no"); - if (efi_copy_init()) { printf("failed to allocate staging area\n"); return (EFI_BUFFER_TOO_SMALL); @@ -643,18 +636,17 @@ main(int argc, CHAR16 *argv[]) } else printf("efipart_inithandles failed %d, expect failures", i); - printf("Command line arguments:"); + printf("%s\n", bootprog_info); + printf(" Command line arguments:"); for (i = 0; i < argc; i++) printf(" %S", argv[i]); printf("\n"); - printf("Image base: 0x%lx\n", (u_long)img->ImageBase); - printf("EFI version: %d.%02d\n", ST->Hdr.Revision >> 16, + printf(" EFI version: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff); - printf("EFI Firmware: %S (rev %d.%02d)\n", ST->FirmwareVendor, + printf(" EFI Firmware: %S (rev %d.%02d)\n", ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff); - printf("\n%s", bootprog_info); /* Determine the devpath of our image so we can prefer it. */ text = efi_devpath_name(img->FilePath); @@ -710,7 +702,6 @@ main(int argc, CHAR16 *argv[]) return (EFI_NOT_FOUND); efi_init_environment(); - setenv("LINES", "24", 1); /* optional */ #if !defined(__arm__) for (k = 0; k < ST->NumberOfTableEntries; k++) {