Module Name: src Committed By: jmcneill Date: Sat Jan 25 11:24:20 UTC 2020
Modified Files: src/sys/stand/efiboot: Makefile.efiboot boot.c efiacpi.c src/sys/stand/efiboot/bootaa64: Makefile src/sys/stand/efiboot/bootarm: Makefile Log Message: Clean up the banner so it fits in 80 columns and add some extra details to the "version" command output. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/stand/efiboot/Makefile.efiboot cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/boot.c cvs rdiff -u -r1.5 -r1.6 src/sys/stand/efiboot/efiacpi.c cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/bootaa64/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/stand/efiboot/bootarm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/stand/efiboot/Makefile.efiboot diff -u src/sys/stand/efiboot/Makefile.efiboot:1.9 src/sys/stand/efiboot/Makefile.efiboot:1.10 --- src/sys/stand/efiboot/Makefile.efiboot:1.9 Sat Nov 30 13:02:18 2019 +++ src/sys/stand/efiboot/Makefile.efiboot Sat Jan 25 11:24:20 2020 @@ -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 @@ NOLIBCSANITIZER=# defined NOSANITIZER= # defined NORELRO= # defined PROG?= boot.efi -NEWVERSWHAT?= "EFI Boot" +NEWVERSWHAT?= "efiboot" EFIDIR= ${S}/external/bsd/gnu-efi/dist GNUEFIARCH?= ${MACHINE_CPU} Index: src/sys/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.19 src/sys/stand/efiboot/boot.c:1.20 --- src/sys/stand/efiboot/boot.c:1.19 Wed Dec 18 21:46:03 2019 +++ src/sys/stand/efiboot/boot.c Sat Jan 25 11:24:20 2020 @@ -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 <non...@netbsd.org> @@ -115,6 +115,7 @@ const struct boot_command commands[] = { { "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 @@ command_version(char *arg) 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 @@ void 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 Index: src/sys/stand/efiboot/efiacpi.c diff -u src/sys/stand/efiboot/efiacpi.c:1.5 src/sys/stand/efiboot/efiacpi.c:1.6 --- src/sys/stand/efiboot/efiacpi.c:1.5 Sat Nov 30 13:02:18 2019 +++ src/sys/stand/efiboot/efiacpi.c Sat Jan 25 11:24:20 2020 @@ -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 @@ efi_acpi_available(void) 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 @@ efi_acpi_get_model(void) 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) { Index: src/sys/stand/efiboot/bootaa64/Makefile diff -u src/sys/stand/efiboot/bootaa64/Makefile:1.6 src/sys/stand/efiboot/bootaa64/Makefile:1.7 --- src/sys/stand/efiboot/bootaa64/Makefile:1.6 Mon Sep 23 13:42:37 2019 +++ src/sys/stand/efiboot/bootaa64/Makefile Sat Jan 25 11:24:20 2020 @@ -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 Index: src/sys/stand/efiboot/bootarm/Makefile diff -u src/sys/stand/efiboot/bootarm/Makefile:1.3 src/sys/stand/efiboot/bootarm/Makefile:1.4 --- src/sys/stand/efiboot/bootarm/Makefile:1.3 Fri Jan 3 11:44:33 2020 +++ src/sys/stand/efiboot/bootarm/Makefile Sat Jan 25 11:24:20 2020 @@ -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