From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by mx.groups.io with SMTP id smtpd.web10.8119.1591884432814289855 for ; Thu, 11 Jun 2020 07:07:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@unrelenting.technology header.s=default header.b=HB0IemC+; spf=pass (domain: unrelenting.technology, ip: 94.23.1.103, mailfrom: greg@unrelenting.technology) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unrelenting.technology; s=default; t=1591884430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FeSD/iBGtYPkRvP7+s6dcyu21J3PPSXhhyJV8XbYKqw=; b=HB0IemC+DyXORw3PS2fHgbJDmjbJAPnO9XSrl33GKRmacBtyeQORHrWJZaSVV0rzYcNQhU k9/xUcFBofrW/SolTU4VFplxAkIuAc4hmQyGZ3ZmU7FiAJZOa6gzLl547Hc1ggEPcCjaan bAcD/pH2h74onb0EBrjmK7bAK4ma0oo= Date: Thu, 11 Jun 2020 14:07:09 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: greg@unrelenting.technology Message-ID: Subject: Re: [edk2-devel] Additional configuration options on Armada/Cn913x To: "Ard Biesheuvel" , devel@edk2.groups.io, mw@semihalf.com Cc: "Leif Lindholm" In-Reply-To: <05412f93-d4ca-3ae8-744f-6ba7f1ce7e8e@arm.com> References: <05412f93-d4ca-3ae8-744f-6ba7f1ce7e8e@arm.com> X-Spam-Score: -0.10 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable June 11, 2020 4:19 PM, "Ard Biesheuvel" wrote:= =0A=0A> On 6/5/20 5:19 PM, Marcin Wojtas via groups.io wrote:=0A> =0A>> H= i,=0A>> I'd like to ask for comments before I develop the actual code - >= currently we have 2 workarounds=0A>> done specifically for Linux:=0A>> a= . ECAM shift in PCIE=0A>> b. SPCR address space definition=0A> =0A> What = does this mean?=0A=0AThe SPCR in upstream edk2 is set up to work around s= ome Linux weirdness (?) and I have to do this:=0A=0Ahttps://github.com/my= freeweb/edk2-platforms/commit/74ec98a6498e78d2ae6c861db88487bf75f2e1a1=0A= =0Ato make it work on FreeBSD.=0A=0A>> Both above are not needed e.g. in = FreeBSD and I was requested to add > their optional disabling.=0A> =0A> D= isabling ECAM shift is just a matter of exposing the iATU controls to the= OS, right? Why do you=0A> need to disable it?=0A=0AI'm not sure what iAT= U controls are (and we don't want to do anything in the OS),=0Abut basica= lly the current address is shifted by 0x8000 to only expose the last devi= ce to the OS,=0Ato work around the silicon bug (lack of some filtering th= ing) that causes devices to appear many many times.=0A=0ABut actually mos= t modern devices (e.g. AMD RX 480, Mellanox CX2) *do not* get duplicated = at all, they show up=0Ain the first position, and this shift moves the me= mory way past that position and the OS sees=0Ano PCIe devices at all. The= only device that was duplicated into all slots for me was a cheap SATA c= ard.=0A=0AIn my experience whether the device is duplicated seems to corr= elate with the "Legacy" field=0Ain the UEFI Shell's pci command. IIRC Mar= cin has explained the actual technical characteristic=0Aof these devices = in some mail before. So it might actually be possible to decide whether t= o do the shift=0Aautomatically at runtime depending on the inserted devic= e (?)=0ABut a setting in the setup menu is easier to do and less magical.= =0A=0AI've just been running with the shift reverted:=0A=0Ahttps://github= .com/myfreeweb/edk2-platforms/commit/36395be2a8707f6d396e07405eb9fe47b64c= f964=0A=0Ato make my Radeon GPU work.