RE: [EXTERNAL] Re: serial console and comconsole in FreeBSD arm64
- In reply to: Warner Losh : "Re: serial console and comconsole in FreeBSD arm64"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 May 2022 06:10:06 UTC
Hi Warner, Thanks for pointing boot_multicons, and yes it has solved the problem of FreeBSD kernel boot logs not coming in Putty in both x86 and arm64. Regarding FreeBSD 13, yes loader.efi logs are not coming in Putty mostly because of EFI gfx usage which is not supported in Putty. Now we can overcome it in x86 by setting set console=”comconsole”, as it is using the different uart implementation of comconsole of loader, which is not the same in arm64. The implementation of comconsole in arm64 loader.efi is not supported in Hyper-V looks like. As Hyper-V only supports ttyAMA0 for serial console in ARM64 but supports uart in x86. Regarding ConOut, I have got it from x86 FreeBSD13, (as arm64 is in the process of bringing up and ConOut is same for arm64 and x86, confirmed by using efishell binary and Linux shell). efivar --device-path 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut : AcpiEx(VMBus,,)/VenHw(9b17e5a2-0891-42dd-b653-80b5c22809ba,02780ada77e3ac4a8e770558eb1073f8c7e020566280ce4daeb7520c7ef76171) Thanks & Regards, Souradeep Sent: Monday, May 30, 2022 7:30 PM To: Souradeep Chakrabarti <schakrabarti@microsoft.com> Cc: freebsd-arm@FreeBSD.org; tsoome@FreeBSD.org; Wei Hu <weh@microsoft.com> Subject: [EXTERNAL] Re: serial console and comconsole in FreeBSD arm64 On Mon, May 30, 2022, 3:31 AM Souradeep Chakrabarti <schakrabarti@microsoft.com<mailto:schakrabarti@microsoft.com>> wrote: Hi, I am trying to access virtual serial console via Putty and in 13.0 it is not working for both x86 and arm64. It is very easy to reproduce: 1) In Windows Hyper-V set a FreeBSD 13.0 VM 2) Use Powershell in Admin privileged mode and run following: Set-VMComPort -VMName <vm_name> -number 1 -path \\.\pipe\Testpipe<file://./pipe/Testpipe> 2) In another Powershell with Admin privilege run following: Set-VMFirmware -VMName <VM name> --ConsoleMode COM1 3) start the VM and open putty to connect the \\.\pipe\Testpipe<file://./pipe/Testpipe> in serial mode. No output will be seen on putty. Not even from the boot loader? That sure sounds like the automatic fallback to simple text output isn't happening. What does: % sudo efivar --device-path 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut tell you? (Or run as root if you don't like sudo). The boot loader grew a non-optional graphics mode that's disabled when the boot code detects we're talking to a 'serial port' between 12.x and 13.x. If you are getting no output from the loader at all, I suspect this is likely to blame. But the same works in FreeBSD 12.3 and Putty gets the output from EFI loader for both x86 and arm64. But during kernel booting the console output does not come in Putty, it only comes in vmconnect.exe. So on 12.3, kernel output doesn't come out of both? Do you have boot_multicons=YES in your loader.conf? If not, only one of the consoles will get output from the kernel. Warner Like below : Loading kernel... /boot/kernel/kernel text=0x931f24 data=0x187450 data=0x0+0x2d095e syms=[0x8+0x138120+0x8+0x124824] Loading configured modules... can't find '/boot/entropy' can't find '/etc/hostid' No valid device tree blob found! WARNING! Trying to fire up the kernel, but no device tree blob found! EFI framebuffer information: addr, size 0xe0000000, 0x800000 dimensions 1024 x 768 stride 1024 masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 <<<< After this log is not coming in Putty in 12.3 for both x86 and arm64.