From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.3789.1588781819548807693 for ; Wed, 06 May 2020 09:16:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C606CD6E; Wed, 6 May 2020 09:16:58 -0700 (PDT) Received: from [192.168.1.81] (unknown [10.37.8.179]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B98583F305; Wed, 6 May 2020 09:16:57 -0700 (PDT) Subject: Re: [PATCH edk2-platforms 0/5] Platform/RaspberryPi: fix serialportlib dependency hell To: devel@edk2.groups.io Cc: leif@nuviainc.com, pete@akeo.ie, andrey.warkentin@gmail.com References: <20200505145029.29826-1-ard.biesheuvel@arm.com> From: "Ard Biesheuvel" Message-ID: Date: Wed, 6 May 2020 18:16:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200505145029.29826-1-ard.biesheuvel@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 5/5/20 4:50 PM, Ard Biesheuvel wrote: > This proposes an alternative approach to the issue described in > https://github.com/raspberrypi/firmware/issues/1376. > > Instead of fiddling with HobLib internals and relying on headers being > included in the correct order, this replaces all DEBUG uses of SerialPortLib > with an implementation that doesn't reprogram the UART at all (and so does > not need to know the value of the base clock), and updates the two remaining > users to query the firmware for the correct value before touching the h/w. > > NOTE: build tested only. > > Ard Biesheuvel (5): > Platform/RaspberryPi/DualSerialPortLib: split up to ease reuse > Platform/RaspberryPi: introduce DebugDualSerialPortLib > Platform/RaspberryPi: fix 16550 divisor calculation logic > Platform/RaspberryPi3: query firmware for 16550 input clock at boot > Platform/RaspberryPi: create DXE phase SerialPortLib version for RPi3 > I have pushed this as 11189124fbc2..644e223bb371 with Pete's ack, after making the changes as discussed in the individual replies.