Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/stand/efiboot Clean up the banner so it fits in 80 colum...



details:   https://anonhg.NetBSD.org/src/rev/cadc9fe13c68
branches:  trunk
changeset: 744130:cadc9fe13c68
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Jan 25 11:24:20 2020 +0000

description:
Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.

diffstat:

 sys/stand/efiboot/Makefile.efiboot  |   4 +-
 sys/stand/efiboot/boot.c            |  12 ++++++----
 sys/stand/efiboot/bootaa64/Makefile |   4 +-
 sys/stand/efiboot/bootarm/Makefile  |   4 +-
 sys/stand/efiboot/efiacpi.c         |  42 +++++++++++++++++++++++++-----------
 5 files changed, 42 insertions(+), 24 deletions(-)

diffs (160 lines):

diff -r 909a1126d533 -r cadc9fe13c68 sys/stand/efiboot/Makefile.efiboot
--- a/sys/stand/efiboot/Makefile.efiboot        Sat Jan 25 10:53:13 2020 +0000
+++ b/sys/stand/efiboot/Makefile.efiboot        Sat Jan 25 11:24:20 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.9 2019/11/30 13:02:18 jmcneill Exp $
+# $NetBSD: Makefile.efiboot,v 1.10 2020/01/25 11:24:20 jmcneill Exp $
 
 S=             ${.CURDIR}/../../..
 
@@ -8,7 +8,7 @@
 NOSANITIZER=   # defined
 NORELRO=       # defined
 PROG?=         boot.efi
-NEWVERSWHAT?=  "EFI Boot"
+NEWVERSWHAT?=  "efiboot"
 
 EFIDIR= ${S}/external/bsd/gnu-efi/dist
 GNUEFIARCH?= ${MACHINE_CPU}
diff -r 909a1126d533 -r cadc9fe13c68 sys/stand/efiboot/boot.c
--- a/sys/stand/efiboot/boot.c  Sat Jan 25 10:53:13 2020 +0000
+++ b/sys/stand/efiboot/boot.c  Sat Jan 25 11:24:20 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.19 2019/12/18 21:46:03 riastradh Exp $      */
+/*     $NetBSD: boot.c,v 1.20 2020/01/25 11:24:20 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -115,6 +115,7 @@
        { "reboot",     command_reset,          "reboot|reset" },
        { "reset",      command_reset,          NULL },
        { "version",    command_version,        "version" },
+       { "ver",        command_version,        NULL },
        { "help",       command_help,           "help|?" },
        { "?",          command_help,           NULL },
        { "quit",       command_quit,           "quit" },
@@ -271,12 +272,13 @@
        char *ufirmware;
        int rv;
 
-       printf("EFI version: %d.%02d\n",
+       printf("Version: %s (%s)\n", bootprog_rev, bootprog_kernrev);
+       printf("EFI: %d.%02d\n",
            ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff);
        ufirmware = NULL;
        rv = ucs2_to_utf8(ST->FirmwareVendor, &ufirmware);
        if (rv == 0) {
-               printf("EFI Firmware: %s (rev 0x%x)\n", ufirmware,
+               printf("Firmware: %s (rev 0x%x)\n", ufirmware,
                    ST->FirmwareRevision);
                FreePool(ufirmware);
        }
@@ -393,8 +395,8 @@
 print_banner(void)
 {
        printf("\n\n"
-           ">> %s, Revision %s (from NetBSD %s)\n",
-           bootprog_name, bootprog_rev, bootprog_kernrev);
+           ">> %s, Revision %s\n",
+           bootprog_name, bootprog_rev);
 }
 
 static void
diff -r 909a1126d533 -r cadc9fe13c68 sys/stand/efiboot/bootaa64/Makefile
--- a/sys/stand/efiboot/bootaa64/Makefile       Sat Jan 25 10:53:13 2020 +0000
+++ b/sys/stand/efiboot/bootaa64/Makefile       Sat Jan 25 11:24:20 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.6 2019/09/23 13:42:37 christos Exp $
+# $NetBSD: Makefile,v 1.7 2020/01/25 11:24:20 jmcneill Exp $
 
 PROG=          bootaa64.efi
 OBJFMT=                binary
-NEWVERSWHAT=   "EFI Boot (aarch64)"
+NEWVERSWHAT=   "efiboot (arm64)"
 
 EXTRA_SOURCES= efibootaa64.c
 EXTRA_SOURCES+=        cache.S
diff -r 909a1126d533 -r cadc9fe13c68 sys/stand/efiboot/bootarm/Makefile
--- a/sys/stand/efiboot/bootarm/Makefile        Sat Jan 25 10:53:13 2020 +0000
+++ b/sys/stand/efiboot/bootarm/Makefile        Sat Jan 25 11:24:20 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2020/01/03 11:44:33 skrll Exp $
+# $NetBSD: Makefile,v 1.4 2020/01/25 11:24:20 jmcneill Exp $
 
 PROG=          bootarm.efi
 OBJFMT=                binary
-NEWVERSWHAT=   "EFI Boot (arm)"
+NEWVERSWHAT=   "efiboot (arm)"
 GNUEFIARCH=    arm
 LIBGNUEFI_ARCH=        arm
 
diff -r 909a1126d533 -r cadc9fe13c68 sys/stand/efiboot/efiacpi.c
--- a/sys/stand/efiboot/efiacpi.c       Sat Jan 25 10:53:13 2020 +0000
+++ b/sys/stand/efiboot/efiacpi.c       Sat Jan 25 11:24:20 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiacpi.c,v 1.5 2019/11/30 13:02:18 jmcneill Exp $ */
+/* $NetBSD: efiacpi.c,v 1.6 2020/01/25 11:24:20 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,6 +34,18 @@
 #include "efifdt.h"
 #include "smbios.h"
 
+struct acpi_rdsp {
+       char signature[8];
+       uint8_t checksum;
+       char oemid[6];
+       uint8_t revision;
+       uint32_t rsdtphys;
+       uint32_t length;
+       uint64_t xsdtphys;
+       uint8_t extcsum;
+       uint8_t reserved[3];
+};
+
 #include <libfdt.h>
 
 #define        ACPI_FDT_SIZE   (128 * 1024)
@@ -66,18 +78,6 @@
        return acpi_root != NULL;
 }
 
-void
-efi_acpi_show(void)
-{
-       if (!efi_acpi_available())
-               return;
-
-       printf("ACPI: RSDP %p", acpi_root);
-       if (smbios3_table)
-               printf(", SMBIOS %p", smbios3_table);
-       printf("\n");
-}
-
 static char model_buf[128];
 
 static const char *
@@ -111,6 +111,22 @@
        return model_buf;
 }
 
+void
+efi_acpi_show(void)
+{
+       struct acpi_rdsp *rsdp = acpi_root;
+
+       if (!efi_acpi_available())
+               return;
+
+       printf("ACPI: v%02d %c%c%c%c%c%c\n", rsdp->revision,
+           rsdp->oemid[0], rsdp->oemid[1], rsdp->oemid[2],
+           rsdp->oemid[3], rsdp->oemid[4], rsdp->oemid[5]);
+
+       if (smbios3_table)
+               printf("SMBIOS: %s", efi_acpi_get_model());
+}
+
 int
 efi_acpi_create_fdt(void)
 {



Home | Main Index | Thread Index | Old Index