Date: Wed, 1 Jun 2022 16:46:22 -0600 From: Warner Losh <imp@bsdimp.com> To: Souradeep Chakrabarti <schakrabarti@microsoft.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: <CANCZdfqKp-cvo8QhEaWHMWJt_msCPLLNxGLY6YR1%2BD0PLonacQ@mail.gmail.com> In-Reply-To: <PSAP153MB0536E7F2B5A8DBF521E306E5CCDF9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> References: <PSAP153MB05367C6802D76EC6BA352431CCDD9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <CANCZdfpjPrXZk15%2B3oFiYa_4VGkJmDC40-EndVry5WnVXKp05g@mail.gmail.com> <PSAP153MB0536E7F2B5A8DBF521E306E5CCDF9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000030e05305e06aa9cf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 1, 2022 at 4:03 PM Souradeep Chakrabarti < schakrabarti@microsoft.com> wrote: > 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=3D=E2=80=9Dcomconsol= e=E2=80=9D, 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. > How is that connected to the system? Does it appear in dmesg? in fact, a full dmesg wouldn't be bad to have. > 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,02780ada77e3ac= 4a8e770558eb1073f8c7e020566280ce4daeb7520c7ef76171) > Thanks! That confirms what I thought I knew... Warner > > On Mon, May 30, 2022, 3:31 AM Souradeep Chakrabarti < > schakrabarti@microsoft.com> wrote: > > >>Hi, > > >>I am trying to access virtual serial console via Putty and in 13.0 it i= s > 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 > > >>2) In another Powershell with Admin privilege run following: > > >>3) start the VM and open putty to connect the \\.\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=3DYES 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=3D0x931f24 data=3D0x187450 data=3D0x0+0x2d095e > syms=3D[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. > > > > Thanks & Regards, > Souradeep > > --00000000000030e05305e06aa9cf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jun 1, 2022 at 4:03 PM Sourad= eep Chakrabarti <<a href=3D"mailto:schakrabarti@microsoft.com">schakraba= rti@microsoft.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote"= style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex"> <div dir=3D"ltr"> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> Hi Warner, <div><br> </div> <div>Thanks for pointing boot_multicons, and yes it has solved the problem = of FreeBSD kernel boot logs</div> <div><br> </div> <div>not coming in Putty in both x86 and arm64.</div> <div><br> </div> <div>Regarding FreeBSD 13, =C2=A0yes loader.efi logs are not coming in Putt= y mostly because of EFI gfx usage</div> <div><br> </div> <div>which is not supported in Putty.</div> <div><br> </div> <div>Now we can overcome it in x86 by setting set console=3D=E2=80=9Dcomcon= sole=E2=80=9D, as it is using the different</div> <div><br> </div> <div>uart implementation of comconsole of loader, which is not the same in = arm64. The implementation</div> <div><br> </div> <div>of comconsole in arm64 loader.efi is not supported in Hyper-V looks li= ke. As Hyper-V only supports</div> <div><br> </div> <div>ttyAMA0 for serial console in ARM64 but supports uart in x86.</div></d= iv></div></blockquote><div><br></div><div>How is that connected to the syst= em? Does it appear in dmesg? in fact, a full dmesg wouldn't be bad to h= ave.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margi= n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex= "><div dir=3D"ltr"><div style=3D"font-family:Calibri,Arial,Helvetica,sans-s= erif;font-size:12pt;color:rgb(0,0,0)"> <div>Regarding ConOut, I have got it from x86 FreeBSD13, (as arm64 is in th= e process of bringing up and</div> <div>ConOut is same for arm64 and x86, confirmed by using efishell binary a= nd Linux shell).</div> <div><br> </div> <div><br> </div> <div>efivar --device-path 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut</div> <div><br> </div> <div>8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut</div> <div><br> </div> <div>: AcpiEx(VMBus,,)/VenHw(9b17e5a2-0891-42dd-b653-80b5c22809ba,02780ada7= 7e3ac4a8e770558eb1073f8c7e020566280ce4daeb7520c7ef76171)</div></div></div><= /blockquote><div><br></div><div>Thanks! That confirms what I thought I knew= ...</div><div><br></div><div>Warner</div><div>=C2=A0</div><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div style=3D"font-family= :Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><= span style=3D"font-size:12pt">=C2=A0</span></div> </div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> On Mon, May 30, 2022, 3:31 AM Souradeep Chakrabarti <<a href=3D"mailto:s= chakrabarti@microsoft.com" target=3D"_blank">schakrabarti@microsoft.com</a>= > wrote:</div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <div><br> </div> <div>>>Hi,</div> <div><br> </div> <div>>>I am trying to access virtual serial console via Putty and in = 13.0 it is not working</div> <div><br> </div> <div>>>for both x86 and arm64.</div> <div><br> </div> <div>>></div> <div><br> </div> <div>>>It is very easy to reproduce:</div> <div><br> </div> <div>>>1) In Windows Hyper-V set a =C2=A0FreeBSD 13.0 VM</div> <div><br> </div> <div>>>2) Use Powershell in Admin privileged mode and run following:<= /div> <div><br> </div> <div>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Set-VM= ComPort -VMName <vm_name> -number 1 -path \\.\pipe\Testpipe</div> <div><br> </div> <div>>>2) In another Powershell with Admin privilege run following:</= div> <div><br> </div> <div>>>3) start the VM and open putty to connect the \\.\pipe\Testpip= e in serial mode.</div> <div><br> </div> <div>>>No output will be seen on putty.</div> <div><br> </div> <div>>Not even from the boot loader? That sure sounds like the automatic= fallback to simple text output isn't happening.</div> <div><br> </div> <div>> </div> <div><br> </div> <div>>What does:</div> <div><br> </div> <div>>% sudo efivar --device-path 8be4df61-93ca-11d2-aa0d-00e098032b8c-C= onOut</div> <div><br> </div> <div>>tell you? (Or run as root if you don't like sudo).</div> <div><br> </div> <div>> </div> <div><br> </div> <div>>The boot loader grew a non-optional graphics mode that's disab= led when the boot code</div> <div><br> </div> <div>>detects we're talking to a 'serial port' between 12.x = and 13.x. If you are getting no output</div> <div><br> </div> <div>>from the loader at all, I suspect this is likely to blame.</div> <div><br> </div> <div>>But the same works in FreeBSD 12.3 and Putty gets the output from = EFI loader for both x86 and arm64.</div> <div><br> </div> <div>>But during kernel booting the console output does not come in Putt= y, it only comes in vmconnect.exe.</div> <div><br> </div> <div>> </div> <div><br> </div> <div>>So on 12.3, kernel output doesn't come out of both? Do you hav= e boot_multicons=3DYES in your loader.conf?</div> <div><br> </div> <div>>If not, only one of the consoles will get output from the kernel.<= /div> <div><br> </div> <div>> </div> <div><br> </div> <div>>Warner</div> <div><br> </div> <div>>>Like below :</div> <div><br> </div> <div>>></div> <div><br> </div> <div>>>Loading kernel...</div> <div><br> </div> <div>>>/boot/kernel/kernel text=3D0x931f24 data=3D0x187450 data=3D0x0= +0x2d095e syms=3D[0x8+0x138120+0x8+0x124824]</div> <div><br> </div> <div>>>Loading configured modules...</div> <div><br> </div> <div>>>can't find '/boot/entropy'</div> <div><br> </div> <div>>>can't find '/etc/hostid'</div> <div><br> </div> <div>>>No valid device tree blob found!</div> <div><br> </div> <div>>>WARNING! Trying to fire up the kernel, but no device tree blob= found!</div> <div><br> </div> <div>>>EFI framebuffer information:</div> <div><br> </div> <div>>>addr, size =C2=A0 =C2=A0 0xe0000000, 0x800000</div> <div><br> </div> <div>>>dimensions =C2=A0 =C2=A0 1024 x 768</div> <div><br> </div> <div>>>stride =C2=A0 =C2=A0 =C2=A0 =C2=A0 1024</div> <div><br> </div> <div>>>masks =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00x00ff0000, 0x0000ff00= , 0x000000ff, 0xff000000 <<<<</div> <div><br> </div> <div>>></div> <div><br> </div> <div>>>After this log is not coming in Putty in 12.3 for both x86 and= arm64.</div> <br> </div> <div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <br> </div> <div id=3D"gmail-m_8405833438302257523Signature"> <div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> Thanks & Regards,</div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> =C2=A0Souradeep</div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <br> </div> </div> </div> </div> </div> </blockquote></div></div> --00000000000030e05305e06aa9cf--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqKp-cvo8QhEaWHMWJt_msCPLLNxGLY6YR1%2BD0PLonacQ>