From owner-freebsd-arm@freebsd.org Wed Jul 1 21:38:03 2020 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 E9EE835C3F1 for ; Wed, 1 Jul 2020 21:38:03 +0000 (UTC) (envelope-from dan.kotowski@a9development.com) Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "protonmail.com", Issuer "SwissSign Server Gold CA 2014 - G22" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xvj66DKnz3ZB1 for ; Wed, 1 Jul 2020 21:38:02 +0000 (UTC) (envelope-from dan.kotowski@a9development.com) Date: Wed, 01 Jul 2020 21:37:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a9development.com; s=protonmail; t=1593639479; bh=ALEK/a7v1ioeX62AXHHzNnPyx6k7C4kzOl0H5GCgo3k=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=zi4VLzErM+BUkgzqo9jJtsPF+NZJFdJj2DiK5kr18IL/BHxrXgm16W/ZchQQA4TNj VElrdGqBA1SVPunVOTx0ChsD5ooYxAn9mPFF/aQl+DeUr2NYJnVNxdJ8jOSEpUpI9D ovKcAvutIUZp12mO3TX/M/hGDEUdI2INsBqUKRXc= To: myfreeweb From: Dan Kotowski Cc: freebsd-arm Reply-To: Dan Kotowski Subject: Re: FreeBSD on Layerscape/QorIQ LX2160X Message-ID: In-Reply-To: References: _____<71481BF5-3972-45A3-8287-FCEB1FCCDC41@unrelenting.technology> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch X-Rspamd-Queue-Id: 49xvj66DKnz3ZB1 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=a9development.com header.s=protonmail header.b=zi4VLzEr; dmarc=pass (policy=none) header.from=a9development.com; spf=pass (mx1.freebsd.org: domain of dan.kotowski@a9development.com designates 185.70.40.22 as permitted sender) smtp.mailfrom=dan.kotowski@a9development.com X-Spamd-Result: default: False [-3.78 / 15.00]; HAS_REPLYTO(0.00)[dan.kotowski@a9development.com]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[a9development.com:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; NEURAL_HAM_LONG(-1.00)[-0.997]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_MEDIUM(-1.04)[-1.038]; RWL_MAILSPIKE_POSSIBLE(0.00)[185.70.40.22:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[a9development.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[a9development.com,none]; NEURAL_HAM_SHORT(-0.65)[-0.649]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[185.70.40.22:from] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:38:04 -0000 > Well, normally PCIe devices can address all the space, unless you have te= rribly quirky hardware (on the RPi4, PCIe can address 3GB only..) > > Also I would guess that like.. yes, even if PCIe goes through the SMMU, i= f the SMMU is untouched by the OS, interrupts should arrive where the OS ex= pects it normally. > > > And section 4.1.6 System MMU and Device Assignment > > """ > > If a device is assigned and passed through to an operating system under= a hypervisor, then the memory > > We're running on bare metal, this is about VMs. So even though that stub only returns ENXIO, it should not matter unless I = intend to use bhyve or something like that? > > I'm almost surprised that nobody has bumped into this before. How does = the IORT look on the MACCHIATObin if interrupts are NOT mapped behind SMMU? > > There is no IORT on the mcbin.. armada8k has a GICv2 not v3 :D I'm also interested in acquiring one of those as well at some point, but yo= ur posts indicate that the net ifaces on that are basically dead weight und= er FreeBSD as well :( > Socionext SynQuacer has the PCI node pointed to the ITS node. 24x A53 cores... hmmm... > If I'm reading the table disassembly correctly, the Ampere eMAG has PCI n= odes pointing to SMMU (v1/v2). But FreeBSD works there fine! > That means the "fallback" non-IORT calculation of RIDs works fine there. = But maybe it doesn't on the NXP chip because it's buggy. > > But there was some way to get the interrupts (without supporting SMMU) on= this NXP chip =E2=80=93 as evidenced by NetBSD working! > > Again.. can you flash the firmware where PCIe was working under NetBSD, d= ump the IORT there and also try patched (with D25179, e.g. any of my recent= builds I guess) FreeBSD there? https://gist.github.com/agrajag9/a59b6c440365745c5a4036e0faf6e23c With old and new firmwares: EFI shell acpiview output acpidump -b (tarred, gzipped, and uuencoded) acpidump -dt And in case you need it, here's the IORT aslc used in the old firmware buil= d: https://github.com/agrajag9/edk2-platforms/blob/master-lx2160a/Silicon/NXP/= LX2160A/AcpiTables/Iort.aslc