From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=tZUPmB7y; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.66, mailfrom: pete@akeo.ie) Received: by mail-wm1-f66.google.com with SMTP id p17so3460318wma.1 for ; Tue, 28 Jan 2020 09:20:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ms7Ffvl2EvEYD6PSDzUiwskK1g7vSy1UZweAcYiHGtY=; b=tZUPmB7yqUcilNykkVqbuu/ZrpIOuoHgeoZXICIE3KqRGx442VDN7W4+RvJ0sE6daD M/is47smqQxNH1iIWG1/oHCo4wtaEkgpyjGAmirRv3Oqw9us1vl8FUo6Pcj+yVj4GaLH B1XWko/9JZCwjHxwuSWnAQ7tDmuFDEPIi+2caaD3CbX4+MTpYSgh9t/J9NuNTIkv/tWk Yiud+1Zt8PHh+Gp0pG78n6fySG6E0Pt692jstkG8njPH1GhN4qjFVJNPjoxZgFl7JwyK f03rr9G6PJ3YUWhDNMXzpzKD5rXtqm0uTsKi99JRVmj9uVIGxrh2ZuMhYpAUVYpXRbM7 f7/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ms7Ffvl2EvEYD6PSDzUiwskK1g7vSy1UZweAcYiHGtY=; b=IuZbZYFNYgfcw9AZCKRRyxPd08t50lYeNdAM3qv2mWsaJmGTAJfRag+PNqUrx1r6uh lAnhvtnK52Uuflc9Ebqp9CctZnOcdPD6eBSrlTnjZe7xwLUwnAwgV4nLrxUWqEYSyBGC U8srtAoxiZGWK1/RRi/XmyHkzBz4kcCfZFdueorhSQCl9RAjh2S1u4+KbQJQaRnho95I 47ODD/c/PX4ooh1XCyvFYcO2CRAgQDVlMZiDGLxMaLMn60B8mDf/HensJCbNGW//1a27 JdY9K5BOMClwdbbUVjmvUmD3DJyGZW7ONYmeqpMtpP4HtIi00YLAngaoVbrZEuyZcawT bgzA== X-Gm-Message-State: APjAAAXzm/9W+6t1R1fwvYbD0elG50hBr4eVW3olBkgJmX6CiwUF6hAG uWko1hacrCHCxeeOMtZvPbrH0SpeGt4= 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) Return-Path: 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-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> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200128171956.9680-1-pete@akeo.ie> References: <20200128171956.9680-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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/ArmGenericTimerPhyCounterLib.inf - PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf - PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf - PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf - SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf + # Dual serial port library + PL011UartClockLib|ArmPlatformPkg/Library/PL011UartClockLib/PL011UartClockLib.inf + PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf + SerialPortLib|Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.inf # Cryptographic libraries IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf @@ -379,14 +379,17 @@ [PcdsFixedAtBuild.common] # gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress|0x3f000000 - ## 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 ## Default Terminal Type ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi3/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 Readme.md apply. armstub=RPI_EFI.fd disable_commandline_tags=1 ``` + Additionally, if you want to use PL011 instead of the miniUART, you can add the lines: + ``` + device_tree_address=0x20000 + device_tree_end=0x30000 + device_tree=bcm2710-rpi-3-b[-plus].dtb + dtoverlay=miniuart-bt + ``` 5. Insert the uSD card and power up the Pi. Note that if you have a model 3+ or a model 3 where you enabled USB boot through OTP -- 2.21.0.windows.1