From owner-freebsd-arm@freebsd.org Thu Jul 18 07:44:42 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D3A7A22A5 for ; Thu, 18 Jul 2019 07:44:42 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E6192772BF for ; Thu, 18 Jul 2019 07:44:40 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 30a71bfd; Thu, 18 Jul 2019 09:44:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=8tFOVDcyNl3gxL6W9x3oS/YxI9g=; b=ivjm99AJCmjAde+TlcEWcFk/86ec eZdDhfR+BAKpSkI/tgh9Xu+Ud6nFXQ2cN+Oxhszch+jytkA761KppixlIl1lgqxf tZpsraVlzQEj9SO3wZ4EYEId+/7i7Hnw/ZK3Qy0x7j+iOAHHVAVLwygU44l1cOy5 aIzFPj/5u8Sj4H4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=KjoJA0U7FlwX/UqidK+J1k72bHXrmIN/WF862YnVs/FQrCm4W5PYd3Xv eA5NpdcHVlOEUokxwE0rpDcPpRR9VEksKydaZkKT8yqOfN+A09lFigYuL0ef3dQv b97mPCct2PIKir9ZWoVBA+w55d5BWZ1UIeNbjH2rGcu0fFeUcho= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 0bfa9001 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 18 Jul 2019 09:44:32 +0200 (CEST) Date: Thu, 18 Jul 2019 09:44:32 +0200 From: Emmanuel Vadot To: Milan Obuch Cc: freebsd-arm@freebsd.org Subject: Re: Pine64 (LTS) HDMI trouble with UHD display Message-Id: <20190718094432.6c868b59ace49b078ce07c16@bidouilliste.com> In-Reply-To: <20190718091204.410aaedd@zeta.dino.sk> References: <20190718091204.410aaedd@zeta.dino.sk> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E6192772BF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=ivjm99AJ; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [0.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.96)[-0.958,0]; NEURAL_SPAM_MEDIUM(0.50)[0.501,0]; NEURAL_SPAM_SHORT(0.64)[0.636,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mx-backup.blih.net,mail.blih.net]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.23)[ip: (-1.21), ipnet: 212.83.160.0/19(2.65), asn: 12876(-0.29), country: FR(-0.01)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2019 07:44:42 -0000 On Thu, 18 Jul 2019 09:12:04 +0200 Milan Obuch wrote: > Hi, > > as I have now basically working FreeBSD-CURRENT on Pine64-LTS, I > decided to try a 4K monitor via HDMI. This does not work with strange > output, to me. This is what I captured from serial console, trying > verbose boot after escaping to loader prompt: > > --- captured begin --- > > Type '?' for a list of commands, 'help' for more detailed help. > OK boot -vs > Using DTB provided by EFI at 0x47ef5000. > Loading DTB overlays: 'sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp,sun50i-a64-uart2' > /boot/dtb/overlays/sun50i-a64-sid.dtbo size=0x1fd > /boot/dtb/overlays/sun50i-a64-ths.dtbo size=0x3e8 > /boot/dtb/overlays/sun50i-a64-timer.dtbo size=0x175 > /boot/dtb/overlays/sun50i-a64-opp.dtbo size=0x74f > /boot/dtb/overlays/sun50i-a64-uart2.dtbo size=0x123 > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-sid.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-ths.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-timer.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-opp.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-uart2.dtbo' > EFI framebuffer information: > addr, size 0xbe000000, 0x1fa4000 > dimensions 3840 x 2160 > stride 3840 > masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 > EHCI failed to shut down host controller. > panic: Too many early devmap mappings 2 > cpuid = 0 > time = 1 > KDB: stack backtrace: > #0 0xffff0000004382b4 at ??+0 > #1 0xffff0000003f3620 at ??+0 > #2 0xffff0000003f33d0 at ??+0 > #3 0xffff00000074ecdc at ??+0 > #4 0xffff0000002bb0bc at ??+0 > #5 0xffff0000002bd580 at ??+0 > #6 0xffff000000395f40 at ??+0 > #7 0xffff00000070dc14 at ??+0 > Uptime: 1s > > --- captured end --- > > (ignore uart2 overlay, this is locally made addition to test this > possibility, no real usage right now) > > When I pull HDMI cable out, following happens: > > --- captured begin --- > > Type '?' for a list of commands, 'help' for more detailed help. > OK boot -vs > Using DTB provided by EFI at 0x47ef5000. > Loading DTB overlays: 'sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp,sun50i-a64-uart2' > /boot/dtb/overlays/sun50i-a64-sid.dtbo size=0x1fd > /boot/dtb/overlays/sun50i-a64-ths.dtbo size=0x3e8 > /boot/dtb/overlays/sun50i-a64-timer.dtbo size=0x175 > /boot/dtb/overlays/sun50i-a64-opp.dtbo size=0x74f > /boot/dtb/overlays/sun50i-a64-uart2.dtbo size=0x123 > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-sid.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-ths.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-timer.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-opp.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-uart2.dtbo' > EHCI failed to shut down host controller. > ---<>--- > KDB: debugger backends: ddb > KDB: current backend: ddb > Type Physical Virtual #Pages Attr > ConventionalMemory 000040000000 40000000 00007ef5 WB > RuntimeServicesData 000047ef5000 47ef5000 00000016 WB RUNTIME > ConventionalMemory 000047f0b000 47f0b000 00068f82 WB > LoaderData 0000b0e8d000 b0e8d000 00004001 WB > BootServicesData 0000b4e8e000 b4e8e000 00000005 WB > LoaderData 0000b4e93000 b4e93000 00004000 WB > LoaderCode 0000b8e93000 b8e93000 0000009c WB > RuntimeServicesData 0000b8f2f000 b8f2f000 00000001 WB RUNTIME > Reserved 0000b8f30000 b8f22000 00000008 WB > RuntimeServicesData 0000b8f38000 b8f38000 00000001 WB RUNTIME > Reserved 0000b8f39000 b8f39000 00000002 WB > LoaderData 0000b8f3b000 b8f3b000 00005025 WB > RuntimeServicesCode 0000bdf60000 bdf60000 00000010 WB RUNTIME > LoaderData 0000bdf70000 b8f3b000 00002090 WB > Physical memory chunk(s): > 0x40000000 - 0xb8f2ffff, 1935 MB ( 495408 pages) > 0xb8f38000 - 0xb8f38fff, 0 MB ( 1 pages) > 0xb8f3b000 - 0xbdf5ffff, 80 MB ( 20517 pages) > 0xbdf70000 - 0xbfffffff, 32 MB ( 8336 pages) > Excluded memory regions: > 0x47ef5000 - 0x47f0afff, 0 MB ( 22 pages) NoAlloc > 0xb1000000 - 0xb27e3fff, 23 MB ( 6116 pages) NoAlloc > 0xb8f2f000 - 0xb8f3afff, 0 MB ( 12 pages) NoAlloc > 0xbdf60000 - 0xbdf6ffff, 0 MB ( 16 pages) NoAlloc > Found 4 CPUs in the device tree > > --- captured end --- > > Finally, with standard HD (1920x1080) monitor connected: > > --- captured begin --- > > Type '?' for a list of commands, 'help' for more detailed help. > OK boot -vs > Using DTB provided by EFI at 0x47ef5000. > Loading DTB overlays: 'sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp,sun50i-a64-uart2' > /boot/dtb/overlays/sun50i-a64-sid.dtbo size=0x1fd > /boot/dtb/overlays/sun50i-a64-ths.dtbo size=0x3e8 > /boot/dtb/overlays/sun50i-a64-timer.dtbo size=0x175 > /boot/dtb/overlays/sun50i-a64-opp.dtbo size=0x74f > /boot/dtb/overlays/sun50i-a64-uart2.dtbo size=0x123 > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-sid.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-ths.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-timer.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-opp.dtbo' > applying DTB overlay '/boot/dtb/overlays/sun50i-a64-uart2.dtbo' > EFI framebuffer information: > addr, size 0xbe000000, 0x7e9000 > dimensions 1920 x 1080 > stride 1920 > masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 > EHCI failed to shut down host controller. > ---<>--- > KDB: debugger backends: ddb > KDB: current backend: ddb > Type Physical Virtual #Pages Attr > ConventionalMemory 000040000000 40000000 00007ef5 WB > RuntimeServicesData 000047ef5000 47ef5000 00000016 WB RUNTIME > ConventionalMemory 000047f0b000 47f0b000 00068f82 WB > LoaderData 0000b0e8d000 b0e8d000 00004001 WB > BootServicesData 0000b4e8e000 b4e8e000 00000005 WB > LoaderData 0000b4e93000 b4e93000 00004000 WB > LoaderCode 0000b8e93000 b8e93000 0000009c WB > RuntimeServicesData 0000b8f2f000 b8f2f000 00000001 WB RUNTIME > Reserved 0000b8f30000 b8f22000 00000008 WB > RuntimeServicesData 0000b8f38000 b8f38000 00000001 WB RUNTIME > Reserved 0000b8f39000 b8f39000 00000002 WB > LoaderData 0000b8f3b000 b8f3b000 00005025 WB > RuntimeServicesCode 0000bdf60000 bdf60000 00000010 WB RUNTIME > LoaderData 0000bdf70000 b8f3b000 00000090 WB > Reserved 0000be000000 be000000 000007e9 WB > LoaderData 0000be7e9000 b8f3b000 00001817 WB > Physical memory chunk(s): > 0x40000000 - 0xb8f2ffff, 1935 MB ( 495408 pages) > 0xb8f38000 - 0xb8f38fff, 0 MB ( 1 pages) > 0xb8f3b000 - 0xbdf5ffff, 80 MB ( 20517 pages) > 0xbdf70000 - 0xbdffffff, 0 MB ( 144 pages) > 0xbe7e9000 - 0xbfffffff, 24 MB ( 6167 pages) > Excluded memory regions: > 0x47ef5000 - 0x47f0afff, 0 MB ( 22 pages) NoAlloc > 0xb1000000 - 0xb27e3fff, 23 MB ( 6116 pages) NoAlloc > 0xb8f2f000 - 0xb8f3afff, 0 MB ( 12 pages) NoAlloc > 0xbdf60000 - 0xbdf6ffff, 0 MB ( 16 pages) NoAlloc > 0xbe000000 - 0xbe7e8fff, 7 MB ( 2025 pages) NoAlloc > 0xbe000000 - 0xbe7e8fff, 7 MB ( 2025 pages) NoAlloc > Found 4 CPUs in the device tree > > --- captured end --- > > Comparing these, first part is identical (up to last 'applying DTB > overlay'), then comes EFI framebuffer info (missing when no monitor is > present), line about EHCI controller failure, common for all three > cases. Up to this point, I think, everything comes from loader, rest is > from kernel. Unfortunatelly, in the failing UHD case, there is no > memory map given, so we can only guess what's going on there... > > I would expect last excluded memory region to be 0xbe000000 - > 0xbffa3fff, and last physical memory chunk 0xbffa4000 - 0xbfffffff, no > other differences, but something else happened. > > Any idea on debugging this situation? It is not show stopper for me, > other things could be checked/tested/verified, but it would be nice to > have working 4K/UHD video output... > > Regards, > Milan Could you try bumping PMAP_MAPDEV_EARLY_SIZE in sys/arm64/include/pte.h to say L2_SIZE * 12 ? -- Emmanuel Vadot