From nobody Fri Jun 03 09:55:40 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B0D4D1B6450D for ; Fri, 3 Jun 2022 09:55:53 +0000 (UTC) (envelope-from schakrabarti@microsoft.com) Received: from apac01-obe.outbound.protection.outlook.com (mail-eastasiaazon11020026.outbound.protection.outlook.com [52.101.128.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LDytw0x7Mz4Tj6; Fri, 3 Jun 2022 09:55:52 +0000 (UTC) (envelope-from schakrabarti@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SXqcvGbIW3WZvPOxyVuzx29sf3He5IS07SBfLVAdA9ng7wzMcTU2Lx8TrouiG46G66H8GeR3fXXet6+KI9wfikuFdHLHBKiw6QfW8CL5ZWZRdsKOgx77LJJjJFFziN80iPX/2R175sTndUls71+92v0SA+XMCZuDOBrOehL+58EEDWNVBa4qce2B8wdtU/Fsu9oJHmsYV3b5qeKdXOYVt4JEuqsoWaR8geM0PpHKe2omXA3QwrqsKZDUJ6Ev6FoeYl6q5xAZiY2I3N61pgSe++cPTCcgPI6qq33gUF5AoGeyyTRXo/MGnpnMzp6J0hqo07ZRAOO+lQ78hCQB5sqExw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UxdYOZTgt4uzAOBK6lX3lxsRP9o0xzEs8CefcPt12s0=; b=S3XhBse1nirg4S2VJ0fvHBmFf9hPqjDDfgTcJuysc1Eh7Y/jXEfNnoBUuHNvFXJ1mLY5EI/SPeGXOrLLwn5Pfpp7B4zKrCevluPBRBizIYWWIgUzzRuKmnHcvK0DBWVOhweGmEjQDVDJHPnpanOwV2oYkVgtfqTO1K+qk9yNY23VLhsQjEMV6TFkcqvk0evF5+Ue0zAlcB6gwHXX26GVer/QRvA1UE90tLpTGJERuyMcGuHp+3Ypg3TVFQgfd7HaGQLRZYkVq6S7HYqc5bBiaKhoW4EI8OPhBL90FQO5yGIV9Is96R116EwKjq0q1gWnml6DXqffwxLaP/AsnYMIBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UxdYOZTgt4uzAOBK6lX3lxsRP9o0xzEs8CefcPt12s0=; b=OG726IAU77gIiY1rj3U0ZQ0sKzs+Cn7HXToI4ahu/3TFemJOboBQrWD2rWEw59Fxim95ejTwXYj4fxYCB+J3oA2uHI4Ab6xFbK47reqCkeBkSkXr5X0D5h1SPg3FXUF0Wb2AxSy8pMIoi7mdcWUNATtcfvtWbyxLu6oAWoopzos= Received: from PSAP153MB0536.APCP153.PROD.OUTLOOK.COM (2603:1096:301:75::14) by TYZP153MB0447.APCP153.PROD.OUTLOOK.COM (2603:1096:400:23::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.1; Fri, 3 Jun 2022 09:55:40 +0000 Received: from PSAP153MB0536.APCP153.PROD.OUTLOOK.COM ([fe80::b1b6:de83:b69f:2826]) by PSAP153MB0536.APCP153.PROD.OUTLOOK.COM ([fe80::b1b6:de83:b69f:2826%6]) with mapi id 15.20.5332.007; Fri, 3 Jun 2022 09:55:40 +0000 From: Souradeep Chakrabarti To: Warner Losh CC: "freebsd-arm@FreeBSD.org" , "tsoome@FreeBSD.org" , Wei Hu Subject: Re: [EXTERNAL] Re: serial console and comconsole in FreeBSD arm64 Thread-Topic: [EXTERNAL] Re: serial console and comconsole in FreeBSD arm64 Thread-Index: Adh0Btw+eCL//YDTTLGpdoefjTg5UQAJq/UAAHVgdIUAAZcjAABJFjd5 Date: Fri, 3 Jun 2022 09:55:40 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-06-03T09:55:39.713Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 196816c2-dcca-485f-33c0-08da454737bc x-ms-traffictypediagnostic: TYZP153MB0447:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6JGFQViVCBA3nZHU+GpY3lkk/KLj2IbquUN9fYv8Ouapt9wmwC50cEQrjkYbe3VaVlI48ocbPog00/cWTWhmkl1oQsXLPuxbrnfMoqJC8vyrjIkgZglk3QZV3vmND03+QcvcuWNNjl9JXRbKPvO9mpakDrUrZ5fuBVabn31JpHlEQEkQ+qioMvPQYj2udF6k9Iz2HV86QY2KwAh2qU5zef8zVyiD2LzND1mNQhljSyPYH6jMq9NIhDYcdbRGHc/aMX9C2w0wA6hB29invDM07oIGZUp/tXdGiKWWt6y2l5dhf9+IEvfITtHSwlkjrfqqcWMGzoPPa/WqXkScxQ8tm9YotDkPrBe8wdLxGuaEgvwQTF4W6x1l3PI9WtijfF0sCQXw/rhDJzlgb7b3bPfJJg4ZUGEdQldocPgwyKQl5uy7rkBKv+/NZuoeFT1QvWAL7CRX6lbKuxIncO4cYrtIkL3b+VU8xx9Na2ivqFMkQBnD9hJQOYNCwZfAAn9SPwO02V4lA1Jkp/IzMwnN4b7eX5WQmKnWgzrL8qvJCtDIQSpDnraeAVcGP5W+XsMyV8+qb4bMLcXggZKj2coJcvC3f6Mk88cPxe+wlp7736LuOWXZ11XFfJm5HTC4KK8nW07kEl/fsvXPJR9zi25NwHfL8oqL9TMOxksfdiqpU7uR7jEkCUgXVoxz5l8QnC0e8t9C5kC5otrE+F/9CoszYee/uF55U4uwz/Bi9JvMI459iO9vV2rcUhrgmEl+Bljxhvit0WKGsHTjkTeDE/2C9XjeTitMZd0V+Cfu11EGL1aGdOI= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PSAP153MB0536.APCP153.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(451199009)(508600001)(71200400001)(55016003)(26005)(6506007)(38100700002)(19627235002)(9686003)(10290500003)(82960400001)(316002)(82950400001)(33656002)(6916009)(186003)(7696005)(54906003)(86362001)(107886003)(91956017)(5660300002)(83380400001)(52536014)(64756008)(66446008)(8990500004)(38070700005)(8676002)(76116006)(53546011)(4326008)(66476007)(66946007)(66556008)(2906002)(8936002)(122000001)(460985005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?lzkEA0pvcaWMpFqPjgW4lWSokwJSJY+7Drs4nevMWUKILtQTOo4w6uac?= =?Windows-1252?Q?dYszKlbF6TXbxYVyustjzjJimJnMfOhoSdXdspD7UhJJ6mH/rE71hM/3?= =?Windows-1252?Q?FamPjhBS/qtc8/G6e61pMiA9tMZi4yQbOz9Y4k7DfUUqbpzXvJ5mQKFh?= =?Windows-1252?Q?yMHDHg5noH7OPoD5l5NcEqwyFd4lBvPHDa2CUIvrXH4i3D5yfkKPTlN7?= =?Windows-1252?Q?EnR9LurGUQcQeOFLXmUH+WZ69twpfauqh5noxadoiqgNDQbcUp9Ol9qQ?= =?Windows-1252?Q?BX+UiKVwkI1i5nZI7uR6RXpx4QjLMVI4Ft4OYI4mfwH6MdcuoYWrqgLh?= =?Windows-1252?Q?s01LO89q67XLDY8uS0XXr9JeRUqWv9gumpacUQsthkdqzdTkbxR83bfW?= =?Windows-1252?Q?bTfGNQlmop8pa9DKou2s4K2/tklO73iRdEtgUVn0TUxmuwmtPejbnTIQ?= =?Windows-1252?Q?nd2FVYgJWL0YL9mY5ePMNaetb2HOTXJoVPj2ZGwotFPhujBV0pzAr7/i?= =?Windows-1252?Q?stHnImq0sKbp1qJS4aegIQOb23+lpYEO4Yt3RKZc6K7jyf9ppSnRskud?= =?Windows-1252?Q?DtGlmDT37l7GtfhyLp47b2GbQ+47a76p20cLAjvXYfdtOq8K3G2Z49aN?= =?Windows-1252?Q?7LOSvnZ2o0HcXzRxNyNUfAi6JJ/0Ji4Kos4uarV21EpWA21z/TwhG/6p?= =?Windows-1252?Q?bvofmwLb7ouRhcwakaFaqfxnTtKq4jtZy88xcfql7vS7SsXlMErnWLD1?= =?Windows-1252?Q?rM3o2RWg8YYD6GZ6D6Mxx+ir6fVVprKpvyBEeNnuYJFF5xyeTHNEJOPZ?= =?Windows-1252?Q?ecTt+RA8aoR0HGxH48S0j2TT+ZgcMT0/JKDC6rpvOTyiMhY08JukPrAu?= =?Windows-1252?Q?nHNzs6MizhrRRDnB2GDDTnrNQQRDpDPU0KnPUqZhQapG0rpzY4WB8bRG?= =?Windows-1252?Q?ytTihsM21LSsIOvjTPdJ9jCXGqacdsjZUiFX/C+OiYmk3qZiusKQl3XD?= =?Windows-1252?Q?f3ZkYtmdPKJxQKVTJH4MuskVqMLjksCF7ys0LP5N+BqfEpFLapGbxSjG?= =?Windows-1252?Q?rnFb9wypTuENghDvx3to55IsBqWOhblGSLwUIPkfWKyTiJ9B38N7bHFO?= =?Windows-1252?Q?OWdCcy3fzr0m6cW8hYRaZftUxD2CtT2V7D1CcRYrf3xsJw+cqY8Hw6h8?= =?Windows-1252?Q?lOSxE2T6CLtV3uxWtajwjMKcKuyK7IJOBMkVJ6tw/A7C4tZmR1XIlajX?= =?Windows-1252?Q?M4gtYlUio8uWKrhziy2Z43yJBA0H+FRcgitf3sAYc1W5LSk7Fn+W593p?= =?Windows-1252?Q?jO4jm8fqQKOryMo4tZ2sDB7F3ttn242a8bLfowCbhCnAxCShQ9VSSIAV?= =?Windows-1252?Q?wwqyKM6CBKK4L5paaRm6N4s28eHcVsvN9rfhPs46hly0PtItRg+OdxdK?= =?Windows-1252?Q?ge1i3PeT9FmdjM2KNTfoy6YUEo8EQw8qim8ZJOzk24HdLLqpo8LEhcMX?= =?Windows-1252?Q?IV0u7An+6BIaaLXg5VxhMWPi7DkwSCPDW6iKUnbQoLIZKT9fFx+ezc+J?= =?Windows-1252?Q?8vC6pYaVESduXDs7TxcA/bk2Ob15qUfXW1XFUUwrV93DrcoJ7LBhRenV?= =?Windows-1252?Q?CB0wsPi9jbA9onETgibGjDIHCZVbOdfE2d2H6Ik0vVMRI04gMsAZRe4f?= =?Windows-1252?Q?046oXJrLeR/9FtPgFWmPCXrCvwHf8endFNKlFLxsOKgD1cRb63DbHV9F?= =?Windows-1252?Q?+xm2KJGEYiltiAbXkCClz8uHh7fIFTHY6SnW/TTapmBgCLbO9MQylZ3H?= =?Windows-1252?Q?Mv3xtg=3D=3D?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PSAP153MB0536.APCP153.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 196816c2-dcca-485f-33c0-08da454737bc X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2022 09:55:40.6109 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hjIrnmFic07DgZFPRH5qldLbOFHHcFOCcxj5KFxYwLpKAWrCPDUhvT63IGxVWBb7zXMSEseC/Z+8FQOusVCJmpmYMa9btP9hsz7aTUwVfVQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZP153MB0447 X-Rspamd-Queue-Id: 4LDytw0x7Mz4Tj6 X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=microsoft.com header.s=selector2 header.b=OG726IAU; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=microsoft.com; spf=pass (mx1.freebsd.org: domain of schakrabarti@microsoft.com designates 52.101.128.26 as permitted sender) smtp.mailfrom=schakrabarti@microsoft.com X-Spamd-Result: default: False [-8.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[microsoft.com:s=selector2]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:52.100.0.0/14]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DWL_DNSWL_MED(-2.00)[microsoft.com:dkim]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[microsoft.com:+]; DMARC_POLICY_ALLOW(-0.50)[microsoft.com,reject]; MLMMJ_DEST(0.00)[freebsd-arm]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:52.96.0.0/12, country:US]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; WHITELIST_SPF_DKIM(-3.00)[microsoft.com:d:+,microsoft.com:s:+] X-ThisMailContainsUnwantedMimeParts: N =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 -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 =0A= Sent: Thursday, June 2, 2022 4:16 AM=0A= To: Souradeep Chakrabarti =0A= Cc: freebsd-arm@FreeBSD.org ; tsoome@FreeBSD.org <= tsoome@freebsd.org>; Wei Hu =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 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 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 -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=