Date: Fri, 3 Jun 2022 09:55:40 +0000 From: Souradeep Chakrabarti <schakrabarti@microsoft.com> To: Warner Losh <imp@bsdimp.com> Cc: "freebsd-arm@FreeBSD.org" <freebsd-arm@FreeBSD.org>, "tsoome@FreeBSD.org" <tsoome@FreeBSD.org>, Wei Hu <weh@microsoft.com> Subject: Re: [EXTERNAL] Re: serial console and comconsole in FreeBSD arm64 Message-ID: <PSAP153MB05368A294B3B584F60C41AA1CCA19@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> In-Reply-To: <CANCZdfqKp-cvo8QhEaWHMWJt_msCPLLNxGLY6YR1%2BD0PLonacQ@mail.gmail.com> References: <PSAP153MB05367C6802D76EC6BA352431CCDD9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <CANCZdfpjPrXZk15%2B3oFiYa_4VGkJmDC40-EndVry5WnVXKp05g@mail.gmail.com> <PSAP153MB0536E7F2B5A8DBF521E306E5CCDF9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <CANCZdfqKp-cvo8QhEaWHMWJt_msCPLLNxGLY6YR1%2BD0PLonacQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
=0A= Hi Warner,=0A= =0A= Device "ttyAMA" refers to a UART with hardware part # PL011. =0A= It's a UART that is specific to ARM processors. =0A= Linux has a driver for this UART at drivers/tty/serial/amba-pl011.c.=0A= In a Hyper-V VM on ARM64, "COM1" refers to a virtual PL011 UART that Hyper-= V provides to the guest.=0A= Set-VMFirmware -VMName <vm> -console COM1 adds a ACPI table for SPCR.=0A= =0A= When we run =0A= Thanks & Regards,=0A= =A0Souradeep=0A= =0A= =0A= =0A= From: Warner Losh <imp@bsdimp.com>=0A= Sent: Thursday, June 2, 2022 4:16 AM=0A= To: Souradeep Chakrabarti <schakrabarti@microsoft.com>=0A= Cc: freebsd-arm@FreeBSD.org <freebsd-arm@freebsd.org>; tsoome@FreeBSD.org <= tsoome@freebsd.org>; Wei Hu <weh@microsoft.com>=0A= Subject: Re: [EXTERNAL] Re: serial console and comconsole in FreeBSD arm64 = =0A= =A0=0A= =0A= =0A= On Wed, Jun 1, 2022 at 4:03 PM Souradeep Chakrabarti <schakrabarti@microsof= t.com> wrote:=0A= Hi Warner, =0A= =0A= Thanks for pointing boot_multicons, and yes it has solved the problem of Fr= eeBSD kernel boot logs=0A= =0A= not coming in Putty in both x86 and arm64.=0A= =0A= Regarding FreeBSD 13, =A0yes loader.efi logs are not coming in Putty mostly= because of EFI gfx usage=0A= =0A= which is not supported in Putty.=0A= =0A= Now we can overcome it in x86 by setting set console=3D=94comconsole=94, as= it is using the different=0A= =0A= uart implementation of comconsole of loader, which is not the same in arm64= . The implementation=0A= =0A= of comconsole in arm64 loader.efi is not supported in Hyper-V looks like. A= s Hyper-V only supports=0A= =0A= ttyAMA0 for serial console in ARM64 but supports uart in x86.=0A= =0A= How is that connected to the system? Does it appear in dmesg? in fact, a fu= ll dmesg wouldn't be bad to have.=0A= =A0=0A= Regarding ConOut, I have got it from x86 FreeBSD13, (as arm64 is in the pro= cess of bringing up and=0A= ConOut is same for arm64 and x86, confirmed by using efishell binary and Li= nux shell).=0A= =0A= =0A= efivar --device-path 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut=0A= =0A= 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut=0A= =0A= : AcpiEx(VMBus,,)/VenHw(9b17e5a2-0891-42dd-b653-80b5c22809ba,02780ada77e3ac= 4a8e770558eb1073f8c7e020566280ce4daeb7520c7ef76171)=0A= =0A= Thanks! That confirms what I thought I knew...=0A= =0A= Warner=0A= =A0=0A= =A0=0A= On Mon, May 30, 2022, 3:31 AM Souradeep Chakrabarti <schakrabarti@microsoft= .com> wrote:=0A= =0A= >>Hi,=0A= =0A= >>I am trying to access virtual serial console via Putty and in 13.0 it is = not working=0A= =0A= >>for both x86 and arm64.=0A= =0A= >>=0A= =0A= >>It is very easy to reproduce:=0A= =0A= >>1) In Windows Hyper-V set a =A0FreeBSD 13.0 VM=0A= =0A= >>2) Use Powershell in Admin privileged mode and run following:=0A= =0A= >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Set-VMComPort -VMName <vm_name> -number 1= -path \\.\pipe\Testpipe=0A= =0A= >>2) In another Powershell with Admin privilege run following:=0A= =0A= >>3) start the VM and open putty to connect the \\.\pipe\Testpipe in serial= mode.=0A= =0A= >>No output will be seen on putty.=0A= =0A= >Not even from the boot loader? That sure sounds like the automatic fallbac= k to simple text output isn't happening.=0A= =0A= > =0A= =0A= >What does:=0A= =0A= >% sudo efivar --device-path 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut=0A= =0A= >tell you? (Or run as root if you don't like sudo).=0A= =0A= > =0A= =0A= >The boot loader grew a non-optional graphics mode that's disabled when the= boot code=0A= =0A= >detects we're talking to a 'serial port' between 12.x and 13.x. If you are= getting no output=0A= =0A= >from the loader at all, I suspect this is likely to blame.=0A= =0A= >But the same works in FreeBSD 12.3 and Putty gets the output from EFI load= er for both x86 and arm64.=0A= =0A= >But during kernel booting the console output does not come in Putty, it on= ly comes in vmconnect.exe.=0A= =0A= > =0A= =0A= >So on 12.3, kernel output doesn't come out of both? Do you have boot_multi= cons=3DYES in your loader.conf?=0A= =0A= >If not, only one of the consoles will get output from the kernel.=0A= =0A= > =0A= =0A= >Warner=0A= =0A= >>Like below :=0A= =0A= >>=0A= =0A= >>Loading kernel...=0A= =0A= >>/boot/kernel/kernel text=3D0x931f24 data=3D0x187450 data=3D0x0+0x2d095e s= yms=3D[0x8+0x138120+0x8+0x124824]=0A= =0A= >>Loading configured modules...=0A= =0A= >>can't find '/boot/entropy'=0A= =0A= >>can't find '/etc/hostid'=0A= =0A= >>No valid device tree blob found!=0A= =0A= >>WARNING! Trying to fire up the kernel, but no device tree blob found!=0A= =0A= >>EFI framebuffer information:=0A= =0A= >>addr, size =A0 =A0 0xe0000000, 0x800000=0A= =0A= >>dimensions =A0 =A0 1024 x 768=0A= =0A= >>stride =A0 =A0 =A0 =A0 1024=0A= =0A= >>masks =A0 =A0 =A0 =A0 =A00x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 <= <<<=0A= =0A= >>=0A= =0A= >>After this log is not coming in Putty in 12.3 for both x86 and arm64.=0A= =0A= =0A= =0A= Thanks & Regards,=0A= =A0Souradeep=0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?PSAP153MB05368A294B3B584F60C41AA1CCA19>