From patchwork Fri Jul 15 17:32:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Lloyd X-Patchwork-Id: 72123 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp738572qga; Fri, 15 Jul 2016 10:33:27 -0700 (PDT) X-Received: by 10.200.56.90 with SMTP id r26mr31154504qtb.37.1468604007030; Fri, 15 Jul 2016 10:33:27 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s7si5946783qkh.236.2016.07.15.10.33.26; Fri, 15 Jul 2016 10:33:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 76B8B68682; Fri, 15 Jul 2016 17:33:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7F26A680FA; Fri, 15 Jul 2016 17:33:10 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D8158680F7; Fri, 15 Jul 2016 17:33:07 +0000 (UTC) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by lists.linaro.org (Postfix) with ESMTPS id 3FF2268108 for ; Fri, 15 Jul 2016 17:33:01 +0000 (UTC) Received: from E107800.Emea.Arm.com (e107800.emea.arm.com [10.1.31.138]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id u6FHWxEk024608; Fri, 15 Jul 2016 18:32:59 +0100 From: evan.lloyd@arm.com To: linaro-uefi@lists.linaro.org Date: Fri, 15 Jul 2016 18:32:59 +0100 Message-Id: <20160715173259.23492-3-evan.lloyd@arm.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160715173259.23492-1-evan.lloyd@arm.com> References: <20160715173259.23492-1-evan.lloyd@arm.com> Subject: [Linaro-uefi] [PATCH 2/2] Platforms/ARM/Juno: Use PCDs for Acpi DBG2 X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" From: Evan Lloyd The DBG2 table is used to publish the presence of debug ports available on a system. The original DBG2 used explicit constants for hardware details. That made it difficult to readilly adjust the use of serial ports. This change modifies the explicit constants to use PCDs, so the serial port usage can be adjusted at build. This can help avoid problems when sharing ports (e.g. between UEFI trace and remote debug) causes fails. NOTE: Because this change does not modify the UART in use, the existing problems with serial debug are still present. Changing to UART1 is possible, but requires an update to the ARM Trusted Firmware to allow non-secure use of that UART. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd --- Platforms/ARM/Juno/ArmJuno.dsc | 6 +++++- Platforms/ARM/Juno/AcpiTables/AcpiTables.inf | 2 ++ Platforms/ARM/Juno/AcpiTables/Dbg2.aslc | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc index 4f41fb159f193b3593048ce118fd0e8e97843809..9d141725342c36076323d0471127c7b15125794b 100644 --- a/Platforms/ARM/Juno/ArmJuno.dsc +++ b/Platforms/ARM/Juno/ArmJuno.dsc @@ -121,11 +121,15 @@ [PcdsFixedAtBuild.common] ## PL011 - Serial Terminal gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF80000 - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0 gArmPlatformTokenSpaceGuid.PL011UartClkInHz|7372800 gArmPlatformTokenSpaceGuid.PL011UartInterrupt|115 + ## PL011 - Serial Debug UART + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase|0x7FF80000 + gArmPlatformTokenSpaceGuid.PcdSerialDbgUartClkInHz|7372800 + gArmPlatformTokenSpaceGuid.PcdSerialDbgUartBaudRate|115200 + ## PL031 RealTimeClock gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000 diff --git a/Platforms/ARM/Juno/AcpiTables/AcpiTables.inf b/Platforms/ARM/Juno/AcpiTables/AcpiTables.inf index 2b063fbfb22781d7dc749b25a3ee5c7ca84d56e6..e099c02f39dad4bb19692c87a12d8d3d6f1da4b6 100644 --- a/Platforms/ARM/Juno/AcpiTables/AcpiTables.inf +++ b/Platforms/ARM/Juno/AcpiTables/AcpiTables.inf @@ -59,3 +59,5 @@ [FixedPcd] gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate gArmPlatformTokenSpaceGuid.PL011UartClkInHz gArmPlatformTokenSpaceGuid.PL011UartInterrupt + + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase diff --git a/Platforms/ARM/Juno/AcpiTables/Dbg2.aslc b/Platforms/ARM/Juno/AcpiTables/Dbg2.aslc index 5621a98b91fdcaf425d86e27c418dda8ed3df4d5..be30cd0a655adae315448a5fe186fcb6ebab22f2 100644 --- a/Platforms/ARM/Juno/AcpiTables/Dbg2.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Dbg2.aslc @@ -77,7 +77,7 @@ STATIC DBG2_TABLE Dbg2 = { */ DBG2_DEBUG_PORT_DDI (DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS, EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART, - 0x7FF80000, + FixedPcdGet64 (PcdSerialDbgRegisterBase), PL011_UART_LENGTH, NAME_STR_UART1), }