CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Mon Mar 9 09:48:00 UTC 2020 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: eficons.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1519): sys/arch/i386/stand/efiboot/eficons.c: revision 1.10 sys/arch/i386/stand/efiboot/eficons.c: revision 1.11 If the default GOP mode is unavailable, fallback to the first mode defined. PR# port-amd64/55000 Remove check for bestmode==-1 (shouldn't happen) To generate a diff of this commit: cvs rdiff -u -r1.4.2.5 -r1.4.2.6 src/sys/arch/i386/stand/efiboot/eficons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/eficons.c diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.5 src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.6 --- src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.5 Tue Feb 11 11:38:33 2020 +++ src/sys/arch/i386/stand/efiboot/eficons.c Mon Mar 9 09:48:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: eficons.c,v 1.4.2.5 2020/02/11 11:38:33 martin Exp $ */ +/* $NetBSD: eficons.c,v 1.4.2.6 2020/03/09 09:48:00 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -37,6 +37,7 @@ #ifndef DEFAULT_GOP_MODE #define DEFAULT_GOP_MODE "1024x768" #endif +#define FALLBACK_GOP_MODE 0 extern struct x86_boot_params boot_params; @@ -420,7 +421,7 @@ bi_framebuffer(void) EFI_STATUS status; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info; struct btinfo_framebuffer fb; - INT32 bestmode = -1; + INT32 bestmode; UINTN sz; if (efi_gop == NULL) @@ -431,9 +432,9 @@ bi_framebuffer(void) } else { /* If a mode has not been selected, choose a default */ bestmode = efi_find_gop_mode(DEFAULT_GOP_MODE); + if (bestmode == -1) + bestmode = FALLBACK_GOP_MODE; } - if (bestmode == -1) - goto nofb; status = uefi_call_wrapper(efi_gop->SetMode, 2, efi_gop, bestmode);
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Tue Feb 11 11:38:33 UTC 2020 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: eficons.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1502): sys/arch/i386/stand/efiboot/eficons.c: revision 1.9 Use 1024x768 as the default GOP mode. It is the only option available for Hyper-V Gen.2 VMs and it seems to be the de facto standard and part of WHQL requirements. To generate a diff of this commit: cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/arch/i386/stand/efiboot/eficons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/eficons.c diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.4 src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.5 --- src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.4 Mon Feb 10 16:47:29 2020 +++ src/sys/arch/i386/stand/efiboot/eficons.c Tue Feb 11 11:38:33 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: eficons.c,v 1.4.2.4 2020/02/10 16:47:29 martin Exp $ */ +/* $NetBSD: eficons.c,v 1.4.2.5 2020/02/11 11:38:33 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -35,7 +35,7 @@ #include "vbe.h" #ifndef DEFAULT_GOP_MODE -#define DEFAULT_GOP_MODE "800x600" +#define DEFAULT_GOP_MODE "1024x768" #endif extern struct x86_boot_params boot_params;
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Mon Feb 10 16:49:48 UTC 2020 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: efiboot.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1499): sys/arch/i386/stand/efiboot/efiboot.c: revision 1.12 Do not clear the screen before exiting boot services as this may cause an undesired display mode switch. PR# 54615 To generate a diff of this commit: cvs rdiff -u -r1.4.10.5 -r1.4.10.6 src/sys/arch/i386/stand/efiboot/efiboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/efiboot.c diff -u src/sys/arch/i386/stand/efiboot/efiboot.c:1.4.10.5 src/sys/arch/i386/stand/efiboot/efiboot.c:1.4.10.6 --- src/sys/arch/i386/stand/efiboot/efiboot.c:1.4.10.5 Wed Sep 18 17:30:05 2019 +++ src/sys/arch/i386/stand/efiboot/efiboot.c Mon Feb 10 16:49:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: efiboot.c,v 1.4.10.5 2019/09/18 17:30:05 martin Exp $ */ +/* $NetBSD: efiboot.c,v 1.4.10.6 2020/02/10 16:49:48 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -113,8 +113,6 @@ efi_cleanup(void) UINT32 DescriptorVersion; size_t allocsz; - clearit(); - memset(_efi, 0, sizeof(btinfo_efi)); btinfo_efi.systblpa = (intptr_t)ST; #ifdef __i386__ /* bootia32.efi */
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Mon Feb 10 16:47:30 UTC 2020 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: eficons.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1498): sys/arch/i386/stand/efiboot/eficons.c: revision 1.8 Fix a few bugs related to the framebuffer: - If a GOP mode wasn't explicitly requested, the bootloader was passing fb info to the kernel even if the console was in text mode! This results in garbled console output on at least ThinkPad T420 and likely many others. If a mode isn't specified, default to 800x600. - The "gop" command was incorrectly parsing video modes in the form WxHxD as WxWxD. - Allow a short form WxH for the "gop" command to select any mode with the target dimensions. To generate a diff of this commit: cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/arch/i386/stand/efiboot/eficons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/eficons.c diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.3 src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.4 --- src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.3 Wed Sep 18 17:30:05 2019 +++ src/sys/arch/i386/stand/efiboot/eficons.c Mon Feb 10 16:47:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: eficons.c,v 1.4.2.3 2019/09/18 17:30:05 martin Exp $ */ +/* $NetBSD: eficons.c,v 1.4.2.4 2020/02/10 16:47:29 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -34,6 +34,10 @@ #include "bootinfo.h" #include "vbe.h" +#ifndef DEFAULT_GOP_MODE +#define DEFAULT_GOP_MODE "800x600" +#endif + extern struct x86_boot_params boot_params; struct btinfo_console btinfo_console; @@ -71,6 +75,8 @@ static int efi_com_putc(int); static int efi_com_status(int); static int efi_com_waitforinputevent(uint64_t); +static int efi_find_gop_mode(char *); + static int iodev; static int (*internal_getchar)(void) = efi_cons_getc; static int (*internal_putchar)(int) = efi_cons_putc; @@ -415,46 +421,36 @@ bi_framebuffer(void) EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info; struct btinfo_framebuffer fb; INT32 bestmode = -1; + UINTN sz; - if (efi_gop == NULL) { - framebuffer_configure(NULL); - return; - } + if (efi_gop == NULL) + goto nofb; if (efi_gop_mode >= 0) { bestmode = efi_gop_mode; } else { -#if 0 - UINT64 res, bestres = 0; - UINTN sz; - UINT32 i; - - /* XXX EDID? EFI_EDID_DISCOVERED_PROTOCOL */ - for (i = 0; i < efi_gop->Mode->MaxMode; i++) { - status = uefi_call_wrapper(efi_gop->QueryMode, 4, - efi_gop, i, , ); - if (EFI_ERROR(status)) -continue; + /* If a mode has not been selected, choose a default */ + bestmode = efi_find_gop_mode(DEFAULT_GOP_MODE); + } + if (bestmode == -1) + goto nofb; - res = (UINT64)info->HorizontalResolution * - (UINT64)info->VerticalResolution * - (UINT64)getdepth(info); - if (res > bestres) { -bestmode = i; -bestres = res; - } - } -#endif + status = uefi_call_wrapper(efi_gop->SetMode, 2, efi_gop, + bestmode); + if (EFI_ERROR(status) || efi_gop->Mode->Mode != bestmode) { + printf("GOP setmode failed: %" PRIxMAX "\n", + (uintmax_t)status); + goto nofb; } - if (bestmode >= 0) { - status = uefi_call_wrapper(efi_gop->SetMode, 2, efi_gop, - bestmode); - if (EFI_ERROR(status) || efi_gop->Mode->Mode != bestmode) - printf("GOP setmode failed: %" PRIxMAX "\n", - (uintmax_t)status); + + status = uefi_call_wrapper(efi_gop->QueryMode, 4, + efi_gop, bestmode, , ); + if (EFI_ERROR(status)) { + printf("GOP querymode failed: %" PRIxMAX "\n", + (uintmax_t)status); + goto nofb; } - info = efi_gop->Mode->Info; memset(, 0, sizeof(fb)); fb.physaddr = efi_gop->Mode->FrameBufferBase; fb.flags = 0; @@ -499,6 +495,10 @@ bi_framebuffer(void) } framebuffer_configure(); + return; + +nofb: + framebuffer_configure(NULL); } int @@ -658,10 +658,16 @@ efi_find_gop_mode(char *arg) snprintf(mode, sizeof(mode), "%lux%lux%u", (long)info->HorizontalResolution, - (long)info->HorizontalResolution, + (long)info->VerticalResolution, depth); if (strcmp(arg, mode) == 0) return i; + + snprintf(mode, sizeof(mode), "%lux%lu", + (long)info->HorizontalResolution, + (long)info->VerticalResolution); + if (strcmp(arg, mode) == 0) + return i; } return -1; }
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Tue Jan 21 16:55:04 UTC 2020 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: devopen.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1485): sys/arch/i386/stand/efiboot/devopen.c: revision 1.10 sys/arch/i386/stand/efiboot/devopen.c: revision 1.11 fix indent. x86 efiboot: Fixed the problem that /EFI/NetBSD/boot.cfg could not be loaded. To generate a diff of this commit: cvs rdiff -u -r1.1.12.7 -r1.1.12.8 src/sys/arch/i386/stand/efiboot/devopen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/devopen.c diff -u src/sys/arch/i386/stand/efiboot/devopen.c:1.1.12.7 src/sys/arch/i386/stand/efiboot/devopen.c:1.1.12.8 --- src/sys/arch/i386/stand/efiboot/devopen.c:1.1.12.7 Tue Dec 17 12:19:49 2019 +++ src/sys/arch/i386/stand/efiboot/devopen.c Tue Jan 21 16:55:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: devopen.c,v 1.1.12.7 2019/12/17 12:19:49 martin Exp $ */ +/* $NetBSD: devopen.c,v 1.1.12.8 2020/01/21 16:55:03 martin Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -100,10 +100,10 @@ bios2dev(int biosdev, daddr_t sector, ch *devname = "hd"; (void)biosdisk_findpartition(biosdev, sector, partition, part_name); - if (*part_name != NULL) { + if (part_name != NULL && *part_name != NULL) { snprintf(savedevname, sizeof(savedevname), "NAME=%s", *part_name); - *devname = savedevname; + *devname = savedevname; } }
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Wed Apr 17 15:55:00 UTC 2019 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: efidisk.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1231): sys/arch/i386/stand/efiboot/efidisk.c: revision 1.7 efiboot: Don't panic when BLOCK_IO_PROTOCOL is not found. It has been reported that there is a machine where BLOCK_IO_PROTOCOL can not be found when network boot without disk. To generate a diff of this commit: cvs rdiff -u -r1.1.12.5 -r1.1.12.6 src/sys/arch/i386/stand/efiboot/efidisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/efidisk.c diff -u src/sys/arch/i386/stand/efiboot/efidisk.c:1.1.12.5 src/sys/arch/i386/stand/efiboot/efidisk.c:1.1.12.6 --- src/sys/arch/i386/stand/efiboot/efidisk.c:1.1.12.5 Wed Apr 11 14:51:43 2018 +++ src/sys/arch/i386/stand/efiboot/efidisk.c Wed Apr 17 15:55:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: efidisk.c,v 1.1.12.5 2018/04/11 14:51:43 martin Exp $ */ +/* $NetBSD: efidisk.c,v 1.1.12.6 2019/04/17 15:55:00 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -57,8 +57,7 @@ efi_disk_probe(void) status = LibLocateHandle(ByProtocol, , NULL, , ); if (EFI_ERROR(status)) - panic("LocateHandle(BlockIoProtocol): %" PRIxMAX, - (uintmax_t)status); + return; if (efi_bootdp != NULL) depth = efi_device_path_depth(efi_bootdp, MEDIA_DEVICE_PATH); @@ -76,8 +75,7 @@ efi_disk_probe(void) status = uefi_call_wrapper(BS->HandleProtocol, 3, handles[i], , (void **)); if (EFI_ERROR(status)) - panic("HandleProtocol(BlockIoProtocol): %" PRIxMAX, - (uintmax_t)status); + continue; media = bio->Media; if (media->LogicalPartition || !media->MediaPresent)
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Tue May 22 17:43:21 UTC 2018 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: eficons.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #831): sys/arch/i386/stand/efiboot/eficons.c: revision 1.6 During awaitkey(), move the cursor back to the beginning of the countdown with '\b' only after waiting. Some UEFI implementations have a destructive/erasing backspace, and will not show the countdown if we move the cursor back before the wait. My ThinkPad T430 w/ Lenovo's UEFI exhibited this whiteout-backspace, while my Gigabyte Brix GB-BXBT-2807 did not. Should fix PR #53292. To generate a diff of this commit: cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/arch/i386/stand/efiboot/eficons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/eficons.c diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.1 src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.2 --- src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.1 Mon Apr 2 08:50:33 2018 +++ src/sys/arch/i386/stand/efiboot/eficons.c Tue May 22 17:43:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: eficons.c,v 1.4.2.1 2018/04/02 08:50:33 martin Exp $ */ +/* $NetBSD: eficons.c,v 1.4.2.2 2018/05/22 17:43:21 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka@@ -328,10 +328,10 @@ awaitkey(int timeout, int tell) char c = 0; for (;;) { - if (tell && timeout) { - char numbuf[32]; - int len; + char numbuf[32]; + int len; + if (tell && timeout) { len = snprintf(numbuf, sizeof(numbuf), "%d seconds. ", timeout); if (len > 0 && len < sizeof(numbuf)) { @@ -340,7 +340,6 @@ awaitkey(int timeout, int tell) printf("%s", numbuf); while (*p) *p++ = '\b'; -printf("%s", numbuf); } } if (iskey(1)) { @@ -355,6 +354,8 @@ awaitkey(int timeout, int tell) internal_waitforinputevent(1000); else break; + if (tell) + printf("%s", numbuf); } out:
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Wed Apr 11 14:51:43 UTC 2018 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: Makefile.efiboot boot.c conf.c devopen.c devopen.h efiboot.c efiboot.h efidisk.c Added Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: dev_net.c efinet.c efinet.h efipxe.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #739): sys/arch/i386/stand/efiboot/efinet.h: revision 1.1 sys/arch/i386/stand/efiboot/efinet.c: revision 1.1 sys/arch/i386/stand/efiboot/conf.c: revision 1.2 sys/arch/i386/stand/efiboot/devopen.c: revision 1.5 sys/arch/i386/stand/efiboot/efidisk.c: revision 1.6 sys/arch/i386/stand/efiboot/devopen.h: revision 1.3 sys/arch/i386/stand/efiboot/efipxe.c: revision 1.1 sys/arch/i386/stand/efiboot/efiboot.c: revision 1.7 sys/arch/i386/stand/efiboot/boot.c: revision 1.10 sys/arch/i386/stand/efiboot/efiboot.h: revision 1.8 sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.12 sys/arch/i386/stand/efiboot/dev_net.c: revision 1.1 efiboot: Added network boot support. To generate a diff of this commit: cvs rdiff -u -r1.9.2.2 -r1.9.2.3 \ src/sys/arch/i386/stand/efiboot/Makefile.efiboot cvs rdiff -u -r1.5.2.4 -r1.5.2.5 src/sys/arch/i386/stand/efiboot/boot.c cvs rdiff -u -r1.1 -r1.1.12.1 src/sys/arch/i386/stand/efiboot/conf.c cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/i386/stand/efiboot/dev_net.c \ src/sys/arch/i386/stand/efiboot/efinet.c \ src/sys/arch/i386/stand/efiboot/efinet.h \ src/sys/arch/i386/stand/efiboot/efipxe.c cvs rdiff -u -r1.1.12.3 -r1.1.12.4 src/sys/arch/i386/stand/efiboot/devopen.c cvs rdiff -u -r1.1.12.1 -r1.1.12.2 src/sys/arch/i386/stand/efiboot/devopen.h cvs rdiff -u -r1.4.10.2 -r1.4.10.3 src/sys/arch/i386/stand/efiboot/efiboot.c cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/i386/stand/efiboot/efiboot.h cvs rdiff -u -r1.1.12.4 -r1.1.12.5 src/sys/arch/i386/stand/efiboot/efidisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/Makefile.efiboot diff -u src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9.2.2 src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9.2.3 --- src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9.2.2 Mon Apr 2 08:50:33 2018 +++ src/sys/arch/i386/stand/efiboot/Makefile.efiboot Wed Apr 11 14:51:43 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.efiboot,v 1.9.2.2 2018/04/02 08:50:33 martin Exp $ +# $NetBSD: Makefile.efiboot,v 1.9.2.3 2018/04/11 14:51:43 martin Exp $ S= ${.CURDIR}/../../../../.. @@ -8,12 +8,12 @@ NEWVERSWHAT?= "EFI Boot" AFLAGS.start.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} -SOURCES?= start.S conf.c devopen.c efiboot.c self_reloc.c -LIBI386SRCS= boot.c biosdisk.c bootinfo.c bootinfo_biosgeom.c -LIBI386SRCS+= bootmenu.c diskbuf.c exec.c menuutils.c -LIBI386SRCS+= panic.c parseutils.c pread.c -LIBI386SRCS+= efichar.c eficons.c efidelay.c efidev.c efidisk.c efidisk_ll.c -LIBI386SRCS+= efigetsecs.c efimemory.c +SOURCES= start.S boot.c conf.c devopen.c dev_net.c self_reloc.c panic.c +SOURCES+= efiboot.c efichar.c eficons.c efidelay.c efidev.c +SOURCES+= efidisk.c efidisk_ll.c efigetsecs.c efimemory.c +SOURCES+= efinet.c efipxe.c +LIBI386SRCS= biosdisk.c bootinfo.c bootinfo_biosgeom.c bootmenu.c +LIBI386SRCS+= diskbuf.c exec.c menuutils.c parseutils.c pread.c SRCS= ${SOURCES} ${EXTRA_SOURCES} ${LIBI386SRCS} PIE_CFLAGS= @@ -57,10 +57,22 @@ CPPFLAGS+= -DSUPPORT_CD9660 CPPFLAGS+= -D"devb2cdb(bno)=(bno)" CPPFLAGS+= -DSUPPORT_DOSFS CPPFLAGS+= -DSUPPORT_EXT2FS +CPPFLAGS+= -DSUPPORT_BOOTP +CPPFLAGS+= -DSUPPORT_DHCP +CPPFLAGS+= -DSUPPORT_NFS +#CPPFLAGS+= -DSUPPORT_TFTP CPPFLAGS+= -DPASS_BIOSGEOM CPPFLAGS+= -DBIOSDISK_DEFAULT_SECSIZE=2048 # for bootinfo_biosgeom.c CPPFLAGS+= -DLIBSA_ENABLE_LS_OP +#CPPFLAGS+= -DARP_DEBUG +#CPPFLAGS+= -DBOOTP_DEBUG +#CPPFLAGS+= -DNET_DEBUG +#CPPFLAGS+= -DNETIF_DEBUG +#CPPFLAGS+= -DNFS_DEBUG +#CPPFLAGS+= -DRARP_DEBUG +#CPPFLAGS+= -DRPC_DEBUG + EFIDIR= ${S}/external/bsd/gnu-efi/dist GNUEFIARCH?= ${MACHINE_CPU} CPPFLAGS+= -I${EFIDIR}/inc -I${EFIDIR}/inc/${GNUEFIARCH} @@ -69,12 +81,12 @@ CPPFLAGS+= -I${EFIDIR}/inc/protocol SAMISCCPPFLAGS+= -DLIBSA_PRINTF_LONGLONG_SUPPORT SAMISCCPPFLAGS+= -DLIBSA_PRINTF_WIDTH_SUPPORT SAMISCCPPFLAGS+= -D"cdb2devb(bno)=(bno)" -SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels -SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no # Netboot via TFTP, NFS ### find out what to use for libsa SA_AS= library SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes" +SAMISCMAKEFLAGS+="SA_USE_CREAD=yes" +SAMISCMAKEFLAGS+="SA_INCLUDE_NET=yes" SAMISCMAKEFLAGS+="SA_ENABLE_LS_OP=yes" .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} Index: src/sys/arch/i386/stand/efiboot/boot.c diff -u src/sys/arch/i386/stand/efiboot/boot.c:1.5.2.4
CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: martin Date: Mon Apr 2 08:50:33 UTC 2018 Modified Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: Makefile.efiboot boot.c efiboot.c efiboot.h eficons.c efidelay.c efidisk.c efimemory.c src/sys/arch/i386/stand/efiboot/bootia32 [netbsd-8]: efibootia32.c src/sys/arch/i386/stand/efiboot/bootx64 [netbsd-8]: efibootx64.c Added Files: src/sys/arch/i386/stand/efiboot [netbsd-8]: efichar.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #685): sys/arch/i386/stand/efiboot/efidisk.c: revision 1.4 sys/arch/i386/stand/efiboot/bootx64/efibootx64.c: revision 1.4 sys/arch/i386/stand/efiboot/eficons.c: revision 1.5 sys/arch/i386/stand/efiboot/efichar.c: revision 1.1 sys/arch/i386/stand/efiboot/bootia32/efibootia32.c: revision 1.4 sys/arch/i386/stand/efiboot/boot.c: revision 1.8 sys/arch/i386/stand/efiboot/efimemory.c: revision 1.5 sys/arch/i386/stand/efiboot/efiboot.c: revision 1.6 sys/arch/i386/stand/efiboot/efidelay.c: revision 1.2 sys/arch/i386/stand/efiboot/efiboot.h: revision 1.7 sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.11 efiboot: Added serial console support. To generate a diff of this commit: cvs rdiff -u -r1.9.2.1 -r1.9.2.2 \ src/sys/arch/i386/stand/efiboot/Makefile.efiboot cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/i386/stand/efiboot/boot.c cvs rdiff -u -r1.4.10.1 -r1.4.10.2 src/sys/arch/i386/stand/efiboot/efiboot.c cvs rdiff -u -r1.5.2.1 -r1.5.2.2 src/sys/arch/i386/stand/efiboot/efiboot.h cvs rdiff -u -r0 -r1.1.4.2 src/sys/arch/i386/stand/efiboot/efichar.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/arch/i386/stand/efiboot/eficons.c cvs rdiff -u -r1.1 -r1.1.12.1 src/sys/arch/i386/stand/efiboot/efidelay.c cvs rdiff -u -r1.1.12.2 -r1.1.12.3 src/sys/arch/i386/stand/efiboot/efidisk.c cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/arch/i386/stand/efiboot/efimemory.c cvs rdiff -u -r1.3 -r1.3.2.1 \ src/sys/arch/i386/stand/efiboot/bootia32/efibootia32.c cvs rdiff -u -r1.3 -r1.3.2.1 \ src/sys/arch/i386/stand/efiboot/bootx64/efibootx64.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/efiboot/Makefile.efiboot diff -u src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9.2.1 src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9.2.2 --- src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9.2.1 Tue Mar 13 14:54:52 2018 +++ src/sys/arch/i386/stand/efiboot/Makefile.efiboot Mon Apr 2 08:50:33 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.efiboot,v 1.9.2.1 2018/03/13 14:54:52 martin Exp $ +# $NetBSD: Makefile.efiboot,v 1.9.2.2 2018/04/02 08:50:33 martin Exp $ S= ${.CURDIR}/../../../../.. @@ -12,7 +12,7 @@ SOURCES?= start.S conf.c devopen.c efibo LIBI386SRCS= boot.c biosdisk.c bootinfo.c bootinfo_biosgeom.c LIBI386SRCS+= bootmenu.c diskbuf.c exec.c menuutils.c LIBI386SRCS+= panic.c parseutils.c pread.c -LIBI386SRCS+= eficons.c efidelay.c efidev.c efidisk.c efidisk_ll.c +LIBI386SRCS+= efichar.c eficons.c efidelay.c efidev.c efidisk.c efidisk_ll.c LIBI386SRCS+= efigetsecs.c efimemory.c SRCS= ${SOURCES} ${EXTRA_SOURCES} ${LIBI386SRCS} Index: src/sys/arch/i386/stand/efiboot/boot.c diff -u src/sys/arch/i386/stand/efiboot/boot.c:1.5.2.2 src/sys/arch/i386/stand/efiboot/boot.c:1.5.2.3 --- src/sys/arch/i386/stand/efiboot/boot.c:1.5.2.2 Wed Mar 21 10:50:49 2018 +++ src/sys/arch/i386/stand/efiboot/boot.c Mon Apr 2 08:50:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.5.2.2 2018/03/21 10:50:49 martin Exp $ */ +/* $NetBSD: boot.c,v 1.5.2.3 2018/04/02 08:50:33 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka@@ -463,11 +463,16 @@ command_consdev(char *arg) char *sep, *sep2 = NULL; int ioport, speed = 0; + if (*arg == '\0') { + efi_cons_show(); + return; + } + sep = strchr(arg, ','); if (sep != NULL) { *sep++ = '\0'; sep2 = strchr(sep, ','); - if (sep != NULL) + if (sep2 != NULL) *sep2++ = '\0'; } @@ -555,6 +560,8 @@ void command_version(char *arg) { CHAR16 *path; + char *upath, *ufirmware; + int rv; if (strcmp(arg, "full") == 0) { printf("ImageBase: 0x%" PRIxPTR "\n", @@ -562,12 +569,24 @@ command_version(char *arg) printf("Stack: 0x%" PRIxPTR "\n", efi_main_sp); printf("EFI version: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0x); - Print(L"EFI Firmware: %s (rev %d.%02d)\n", ST->FirmwareVendor, - ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0x); + ufirmware = NULL; + rv = ucs2_to_utf8(ST->FirmwareVendor, ); + if (rv == 0) { + printf("EFI Firmware: %s (rev %d.%02d)\n", ufirmware, + ST->FirmwareRevision >> 16, + ST->FirmwareRevision & 0x); + FreePool(ufirmware); + } path = DevicePathToStr(efi_bootdp); - Print(L"Boot DevicePath: %d:%d:%s\n",