Re: CVS commit: src/sys/arch/i386/stand/efiboot

2023-07-24 Thread Rin Okuyama

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

2023-07-24 Thread matthew green
"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

2021-12-27 Thread Simon Burge
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

2021-12-27 Thread Simon Burge
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

2021-12-26 Thread Emmanuel Dreyfus
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

2021-12-26 Thread Simon Burge
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

2020-02-10 Thread Kimihiro Nonaka
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

2017-02-06 Thread Joerg Sonnenberger
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

2017-02-03 Thread Joerg Sonnenberger
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

2017-02-03 Thread Joerg Sonnenberger
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