Re: CVS commit: src/sys/arch/i386/stand/efiboot
On 2023/07/24 16:14, matthew green wrote: "Rin Okuyama" writes: Module Name:src Committed By: rin Date: Mon Jul 24 01:56:59 UTC 2023 Modified Files: src/sys/arch/i386/stand/efiboot: Makefile.efiboot eficons.c Added Files: src/sys/arch/i386/stand/efiboot: eficpufunc.c eficpufunc.h Log Message: efiboot/x86: Add serial console support via raw I/O port access thanks! this makes efiboot capable of replacing bios on many of my test systems that can use serial console (and often do.) Thank you too for your feedback! I'm glad to hear that :) rin
re: CVS commit: src/sys/arch/i386/stand/efiboot
"Rin Okuyama" writes: > Module Name: src > Committed By: rin > Date: Mon Jul 24 01:56:59 UTC 2023 > > Modified Files: > src/sys/arch/i386/stand/efiboot: Makefile.efiboot eficons.c > Added Files: > src/sys/arch/i386/stand/efiboot: eficpufunc.c eficpufunc.h > > Log Message: > efiboot/x86: Add serial console support via raw I/O port access thanks! this makes efiboot capable of replacing bios on many of my test systems that can use serial console (and often do.) .mrg.
Re: CVS commit: src/sys/arch/i386/stand/efiboot
Emmanuel Dreyfus wrote: > In src/sys/arch/i386/stand/lib/biosdisk.c > int > biosdisk_findpartition(int biosdev, daddr_t sector, >int *partition, const char **part_name) > { > (...) > /* default ot first partition */ > *partition = 0; > *part_name = NULL; > > part_name is NULL, *part_name crashes. How do you avoid that? Aha, I have this elsewhere in my zfs tree: *partition = 0; - *part_name = NULL; + if (part_name) + *part_name = NULL; I'll commit that now (as well as the same check for the NO_DISKLABEL && NO_GPT case. Thanks for the digging! Cheers, Simon.
Re: CVS commit: src/sys/arch/i386/stand/efiboot
On Mon, Dec 27, 2021 at 10:54:13PM +1100, Simon Burge wrote: > If you have a way of preproducing this, I'm happy to have a look. I recall it now. In src/sys/arch/i386/stand/efiboot/devopen.c bios2dev(boot_biosdev, boot_biossector, &devname, &unit, &partition, NULL); In the same file, bios2dev() passes NULL part_name to biosdisk_findpartition() void bios2dev(int biosdev, daddr_t sector, char **devname, int *unit, int *partition, const char **part_name) { (...) (void)biosdisk_findpartition(biosdev, sector, partition, part_name); In src/sys/arch/i386/stand/lib/biosdisk.c int biosdisk_findpartition(int biosdev, daddr_t sector, int *partition, const char **part_name) { (...) /* default ot first partition */ *partition = 0; *part_name = NULL; part_name is NULL, *part_name crashes. How do you avoid that? -- Emmanuel Dreyfus m...@netbsd.org
Re: CVS commit: src/sys/arch/i386/stand/efiboot
Emmanuel Dreyfus wrote: > On Mon, Dec 27, 2021 at 01:08:15PM +1100, Simon Burge wrote: > > What crash did this fix? All the use of part_name by the > > called functions should check if it is NULL before trying > > to assign anything to *part_name. > > I do not recall the details now, but I had a crash because > of this. Please revert my change, I will get back to it when > I find some time. Thanks. I'll revert that now. If you have a way of preproducing this, I'm happy to have a look. Cheers, Simon.
Re: CVS commit: src/sys/arch/i386/stand/efiboot
On Mon, Dec 27, 2021 at 01:08:15PM +1100, Simon Burge wrote: > What crash did this fix? All the use of part_name by the > called functions should check if it is NULL before trying > to assign anything to *part_name. I do not recall the details now, but I had a crash because of this. Please revert my change, I will get back to it when I find some time. -- Emmanuel Dreyfus m...@netbsd.org
Re: CVS commit: src/sys/arch/i386/stand/efiboot
Hi Emmanuel, "Emmanuel Dreyfus" wrote: > Module Name: src > Committed By: manu > Date: Thu Nov 18 16:18:13 UTC 2021 > > Modified Files: > > src/sys/arch/i386/stand/efiboot: devopen.c > > Log Message: > > Fix crash because of NULL pointer reference What crash did this fix? All the use of part_name by the called functions should check if it is NULL before trying to assign anything to *part_name. This change has broken loading boot.cfg via the EFI path "esp:/EFI/NetBSD/boot.cfg" since the call to bios_boot() at https://nxr.netbsd.org/xref/src/sys/arch/i386/stand/efiboot/devopen.c#292 with a non-NULL last argument means devname gets updated and now points to the partition with a root filesystem rather than the EFI system partition. Cheers, Simon.
Re: CVS commit: src/sys/arch/i386/stand/efiboot
Hi, Hyper-V Gen.2 VM has only 1024x768 GOP entry. https://twitter.com/nonakap/status/1227076603470942208 kernel will be booted in text mode. no output to the console. If execute "gop 0" command before booting a kernel, it works fine. On Sat, Feb 8, 2020 at 11:35 PM Jared D. McNeill wrote: > > Module Name:src > Committed By: jmcneill > Date: Sat Feb 8 14:35:47 UTC 2020 > > Modified Files: > src/sys/arch/i386/stand/efiboot: eficons.c > > Log Message: > 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.7 -r1.8 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. >
Re: CVS commit: src/sys/arch/i386/stand/efiboot
On Mon, Feb 06, 2017 at 10:32:35AM +, NONAKA Kimihiro wrote: > Module Name: src > Committed By: nonaka > Date: Mon Feb 6 10:32:35 UTC 2017 > > Modified Files: > src/sys/arch/i386/stand/efiboot: Makefile.efiboot > > Log Message: > Remove unnecessary flag. Thanks. Joerg
Re: CVS commit: src/sys/arch/i386/stand/efiboot
On Fri, Feb 03, 2017 at 05:24:43PM +, Roy Marples wrote: > Module Name: src > Committed By: roy > Date: Fri Feb 3 17:24:43 UTC 2017 > > Modified Files: > src/sys/arch/i386/stand/efiboot: Makefile.efiboot > > Log Message: > Fix build with clang. Instead of disabling the noreturn validation, please mark reboot properly as dead, with a __builtin_unreachable() at the end if necessary. Joerg
Re: CVS commit: src/sys/arch/i386/stand/efiboot
On Fri, Feb 03, 2017 at 05:24:43PM +, Roy Marples wrote: > Module Name: src > Committed By: roy > Date: Fri Feb 3 17:24:43 UTC 2017 > > Modified Files: > src/sys/arch/i386/stand/efiboot: Makefile.efiboot > > Log Message: > Fix build with clang. Nonaka-san, can you comment on why the flag is useful in first place? Joerg