Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/stand/efiboot efiboot: Add support for changing the vide...
details: https://anonhg.NetBSD.org/src/rev/2580612c0761
branches: trunk
changeset: 1023853:2580612c0761
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Sep 28 11:37:45 2021 +0000
description:
efiboot: Add support for changing the video mode.
Add a new "gop" command that can query the list of available video modes.
With a mode number as argument (eg. "gop 16"), the new display mode will
be selected.
The "version" command prints the current display mode.
diffstat:
sys/stand/efiboot/Makefile.efiboot | 6 +++---
sys/stand/efiboot/boot.c | 19 ++++++++++++++++++-
sys/stand/efiboot/efiboot.c | 3 ++-
sys/stand/efiboot/efiboot.h | 8 +++++++-
sys/stand/efiboot/version | 3 ++-
5 files changed, 32 insertions(+), 7 deletions(-)
diffs (127 lines):
diff -r 093c83208ee7 -r 2580612c0761 sys/stand/efiboot/Makefile.efiboot
--- a/sys/stand/efiboot/Makefile.efiboot Tue Sep 28 06:57:48 2021 +0000
+++ b/sys/stand/efiboot/Makefile.efiboot Tue Sep 28 11:37:45 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.22 2021/06/20 19:10:47 jmcneill Exp $
+# $NetBSD: Makefile.efiboot,v 1.23 2021/09/28 11:37:45 jmcneill Exp $
S= ${.CURDIR}/../../..
@@ -24,8 +24,8 @@
SOURCES+= boot.c bootmenu.c conf.c console.c dev_net.c devopen.c exec.c \
module.c overlay.c panic.c prompt.c
SOURCES+= efiboot.c efichar.c efidev.c efigetsecs.c efifdt.c \
- efifile.c efiblock.c efinet.c efipxe.c efiacpi.c efirng.c efiwatchdog.c \
- smbios.c
+ efifile.c efiblock.c efinet.c efipxe.c efiacpi.c efirng.c \
+ efiwatchdog.c efigop.c smbios.c
.PATH: ${S}/external/bsd/libfdt/dist
CPPFLAGS+= -I${S}/external/bsd/libfdt/dist
diff -r 093c83208ee7 -r 2580612c0761 sys/stand/efiboot/boot.c
--- a/sys/stand/efiboot/boot.c Tue Sep 28 06:57:48 2021 +0000
+++ b/sys/stand/efiboot/boot.c Tue Sep 28 11:37:45 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.36 2021/09/07 11:41:31 nia Exp $ */
+/* $NetBSD: boot.c,v 1.37 2021/09/28 11:37:45 jmcneill Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -99,6 +99,7 @@
void command_load(char *);
void command_unload(char *);
void command_ls(char *);
+void command_gop(char *);
void command_mem(char *);
void command_menu(char *);
void command_reset(char *);
@@ -118,6 +119,7 @@
{ "load", command_load, "load <module_name>" },
{ "unload", command_unload, "unload <module_name>" },
{ "ls", command_ls, "ls [hdNn:/path]" },
+ { "gop", command_gop, "gop [mode]" },
{ "mem", command_mem, "mem" },
{ "menu", command_menu, "menu" },
{ "reboot", command_reset, "reboot|reset" },
@@ -290,6 +292,20 @@
}
void
+command_gop(char *arg)
+{
+ UINT32 mode;
+
+ if (!arg || !*arg) {
+ efi_gop_dump();
+ return;
+ }
+
+ mode = atoi(arg);
+ efi_gop_setmode(mode);
+}
+
+void
command_mem(char *arg)
{
EFI_MEMORY_DESCRIPTOR *md, *memmap;
@@ -347,6 +363,7 @@
efi_acpi_show();
efi_rng_show();
efi_md_show();
+ efi_gop_show();
}
void
diff -r 093c83208ee7 -r 2580612c0761 sys/stand/efiboot/efiboot.c
--- a/sys/stand/efiboot/efiboot.c Tue Sep 28 06:57:48 2021 +0000
+++ b/sys/stand/efiboot/efiboot.c Tue Sep 28 11:37:45 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.c,v 1.20 2020/06/26 03:23:04 thorpej Exp $ */
+/* $NetBSD: efiboot.c,v 1.21 2021/09/28 11:37:45 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -98,6 +98,7 @@
efi_file_system_probe();
efi_block_probe();
efi_rng_probe();
+ efi_gop_probe();
boot();
diff -r 093c83208ee7 -r 2580612c0761 sys/stand/efiboot/efiboot.h
--- a/sys/stand/efiboot/efiboot.h Tue Sep 28 06:57:48 2021 +0000
+++ b/sys/stand/efiboot/efiboot.h Tue Sep 28 11:37:45 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.h,v 1.16 2021/09/07 11:41:31 nia Exp $ */
+/* $NetBSD: efiboot.h,v 1.17 2021/09/28 11:37:45 jmcneill Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -106,6 +106,12 @@
/* efiwatchdog.c */
void efi_set_watchdog(uint32_t, uint64_t);
+/* efigop.c */
+void efi_gop_probe(void);
+void efi_gop_show(void);
+void efi_gop_dump(void);
+void efi_gop_setmode(UINT32);
+
/* exec.c */
int exec_netbsd(const char *, const char *);
diff -r 093c83208ee7 -r 2580612c0761 sys/stand/efiboot/version
--- a/sys/stand/efiboot/version Tue Sep 28 06:57:48 2021 +0000
+++ b/sys/stand/efiboot/version Tue Sep 28 11:37:45 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.28 2021/08/08 21:50:10 andvar Exp $
+$NetBSD: version,v 1.29 2021/09/28 11:37:45 jmcneill Exp $
NOTE ANY CHANGES YOU MAKE TO THE EFI BOOTLOADER HERE. The format of this
file is important - make sure the entries are appended on end, last item
@@ -31,3 +31,4 @@
2.8: Add bi-endian disklabel and FFS support.
2.9: Watchdog support.
2.10: Use disk I/O protocol for block devices.
+2.11: Add support for changing the video mode.
Home |
Main Index |
Thread Index |
Old Index