From nobody Tue Feb 10 01:31:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53510+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53510+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1580232018846883.8159511948792; Tue, 28 Jan 2020 09:20:18 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id aeaRYY1788612xDNpTb79wk4; Tue, 28 Jan 2020 09:20:17 -0800 X-Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web12.238.1580232016736433548 for ; Tue, 28 Jan 2020 09:20:17 -0800 X-Received: by mail-wm1-f66.google.com with SMTP id p17so3460318wma.1 for ; Tue, 28 Jan 2020 09:20:16 -0800 (PST) X-Gm-Message-State: 4AqDkZkQJF9BKodeC3I9hedYx1787277AA= X-Google-Smtp-Source: APXvYqx0UXNkko0bVM5xP3yBwpYXKM90TGrl5G8F5VhTu6dmCgN19krfvxGgkaPVQWEIpjBo/EIjnA== X-Received: by 2002:a1c:1d09:: with SMTP id d9mr6422104wmd.91.1580232014993; Tue, 28 Jan 2020 09:20:14 -0800 (PST) X-Received: from localhost.localdomain ([84.203.49.247]) by smtp.gmail.com with ESMTPSA id 205sm4000853wmd.42.2020.01.28.09.20.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jan 2020 09:20:14 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH 3/4] Platform/RPi3: Enable the use of DualSerialPortLib Date: Tue, 28 Jan 2020 17:19:55 +0000 Message-Id: <20200128171956.9680-4-pete@akeo.ie> In-Reply-To: <20200128171956.9680-1-pete@akeo.ie> References: <20200128171956.9680-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1580232017; bh=Ou/1KPUTt/CwHMO0campa/nHK3tg6N8yxWnE79MyBGY=; h=Cc:Date:From:Reply-To:Subject:To; b=H1fUjcz/p7zjuTQwrV843bw/IEs3WbI5RTYYlAgK9pd2WcNY73llELhnJ2zqlE3EIjs UGcJvY39OZ4fZXVcGdAYet1dxU3AlF2CYyS8kjUHVELjCcWwXkxA3KI48wcc9/RSJYOsD Vu64kvIbmete1KPaZix9lNWtSjtj6IXHMXk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Note that, for the time being, the TF-A binary only outputs to the miniUART, but work is underway to add runtime UART detection to TF-A, after which we will use such a binary. Also note that this patch currently enforces the use of miniUART in the ACPI tables, as we have to pick one until we can switch to using DynamicTablesPkg/ConfigurationManagerDxe for ACPI generation. Signed-off-by: Pete Batard --- Platform/RaspberryPi/RPi3/RPi3.dsc | 15 +++++++++------ Platform/RaspberryPi/RPi3/Readme.md | 7 +++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3= /RPi3.dsc index 2368b04f40a4..40fb0879c2ed 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.dsc +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc @@ -114,10 +114,10 @@ [LibraryClasses.common] ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/Ar= mGenericTimerPhyCounterLib.inf =20 - PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf - PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf - PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf - SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf + # Dual serial port library + PL011UartClockLib|ArmPlatformPkg/Library/PL011UartClockLib/PL011UartCloc= kLib.inf + PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf + SerialPortLib|Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialP= ortLib.inf =20 # Cryptographic libraries IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf @@ -379,14 +379,17 @@ [PcdsFixedAtBuild.common] # gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress|0x3f000000 =20 - ## NS16550 compatible UART - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f215040 + # UARTs + gArmPlatformTokenSpaceGuid.PL011UartInteger|0 + gArmPlatformTokenSpaceGuid.PL011UartFractional|0 + gArmPlatformTokenSpaceGuid.PL011UartClkInHz|48000000 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|4 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x27 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|8 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0 =20 ## Default Terminal Type ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi= 3/Readme.md index 797da1bab4a9..58c0124ef75e 100644 --- a/Platform/RaspberryPi/RPi3/Readme.md +++ b/Platform/RaspberryPi/RPi3/Readme.md @@ -52,6 +52,13 @@ Build instructions from the top level edk2-platforms Rea= dme.md apply. armstub=3DRPI_EFI.fd disable_commandline_tags=3D1 ``` + Additionally, if you want to use PL011 instead of the miniUART, you can = add the lines: + ``` + device_tree_address=3D0x20000 + device_tree_end=3D0x30000 + device_tree=3Dbcm2710-rpi-3-b[-plus].dtb + dtoverlay=3Dminiuart-bt + ``` 5. Insert the uSD card and power up the Pi. =20 Note that if you have a model 3+ or a model 3 where you enabled USB boot t= hrough OTP --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53510): https://edk2.groups.io/g/devel/message/53510 Mute This Topic: https://groups.io/mt/70222631/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-