From patchwork Thu Mar 1 18:11:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 130374 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3117442edc; Thu, 1 Mar 2018 10:11:59 -0800 (PST) X-Google-Smtp-Source: AG47ELuyYnlWO7EcHc/Cla8OTm55kM0XT/JibZhXDhd+Q/WqtuP/rb2zD+Nhj4TanSKut/83+Fgz X-Received: by 2002:a17:902:694c:: with SMTP id k12-v6mr2650776plt.133.1519927919570; Thu, 01 Mar 2018 10:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519927919; cv=none; d=google.com; s=arc-20160816; b=SLxF0spLslbYYNKS6ZJ2ue4ockffCfegYyyNwkUV2BuvGmuinxeyLwHaIgIKmTSWXk PCRbcYTf5gyH0ZBs00gwE9vPxNoN/3CnOQHGX5Kf0QZRvVZJ3pHloQthH0ek43QTrgKg CAzzBKeQcYvfe4vG0whsVTP0yF0CnV12lMZAhT4cA9Px8zgTFfLwzS3UKwmopBDl0/do GsweudqSoHfVjXA83zdb4/ZOQpixS6eGat3dDe3o4YpYKE6W1pNYYvPT5J5IWA5MSs+f r/EW6eZD35xwPIpx2K7j5Te1F8cc+BilW65GWA+sUkZJlByudsEaTCSuqCSGrFrNi6nf WWIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=9ANxP2T4PcHvVRfyogEVOm5S2VM0Vg77asIOqI/qQx8=; b=qbRjCV3k6WqyObMBmrDnp7U04dMAjUKoOpOHjWf7INRE+93VvjJzZ8q5ACugERGabi hW5mzsPlk6cCSMpG1jlHkwWZpo1KHTDh5x/czK2uBF8G6dw7lXo9vr6DxbO2Ixf2c603 H5KevNQSk39rnkkDgzvoHitXAWvNaMSCU6F9S1pxzM/P7dh/7oaUTO3/HFhsGVvdUDx/ FTWyBlLki6Rc4yphpE58l+B6gl01gIMbA5xXT+7UeYXj4+YxyKjEi1rSfSjytVXtn77x +2BABF4aMQpVBry2iRD1iSEubNdpBYor25vh7ZoeB6X1LJyw44bHpkQegHriClU4x8r/ N1Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Kvxtb8mF; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id z4si2754257pgc.367.2018.03.01.10.11.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 10:11:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Kvxtb8mF; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 20E4022423842; Thu, 1 Mar 2018 10:05:50 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::242; helo=mail-wm0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D92B3224E690A for ; Thu, 1 Mar 2018 10:05:48 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id t6so13935779wmt.5 for ; Thu, 01 Mar 2018 10:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=nsdffjQlvo/ajAOsMUpnmXlPdR8YeCfIO0kuS+5EgP4=; b=Kvxtb8mFlx0JOGa66eA6LJ0QM0U4pB/SoMz/mZDotPgIWwT5Wv2fYz7nKh75dQP4gS /JjtJXVjCs8grolDM9w0w2dGY80qGpq8xVJjLZX/dcCoYH/8fLMYuA7LVijipIiHw/Zx /RzYvepn2KVX7n/CD8pW/GxfAF5QOl3zvvEME= 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; bh=nsdffjQlvo/ajAOsMUpnmXlPdR8YeCfIO0kuS+5EgP4=; b=jvaEyDpS3x2AuERL4Sdl7J0NHCASFDE9SP7jB0zG+gUzRml40iDeDbXyo8eR3qKkLt CJQXC8rCZg0MLT/pK4OhBpSNUmHhM7gen+wnDaRrXpUAPxKUxB8zwJG8qXy9ItMAhMoy cKIAKbk6REp0hJqgPb2YCBSMtIc3uCPIPv3RmgnOIPYTBY1XUGhhJFYUgYXlLLFsIx+c 5mPlt3bcikYrEHVoATcXUiS8z15q/r7LugPw2qjCeq+fLiBlG8dDruuB620bfqaEHMqr /0FhurtIwihjb0faamiFz0B5IjXdFExEvNoMdb+ICAlB1x6jXuxs+55VZun7gyF8oWDj 2Ngw== X-Gm-Message-State: APf1xPBuyK0wmC3/FkyxD+guipmZcMbzSqeZoLPXj1Jx+ZZ4DiAl9OR+ B5Y7tGdD3sBHmjgFO8kyp174eKY6VIo= X-Received: by 10.28.191.90 with SMTP id p87mr2308811wmf.145.1519927915579; Thu, 01 Mar 2018 10:11:55 -0800 (PST) Received: from localhost.localdomain ([196.71.216.221]) by smtp.gmail.com with ESMTPSA id w195sm78568wmw.9.2018.03.01.10.11.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 10:11:54 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 1 Mar 2018 18:11:38 +0000 Message-Id: <20180301181142.16817-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH 0/4] implement runtime debug output protocl X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eric.dong@intel.com, Ard Biesheuvel , leif.lindholm@linaro.org, heyi.guo@linaro.org, liming.gao@intel.com, michael.d.kinney@intel.com, lersek@redhat.com, star.zeng@intel.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" As discussed on list, MMIO based UARTs cannot be used at runtime without taking special precautions to register the MMIO region and switch to the virtual address when accessing it at runtime. So extend the recently introduced DxeRuntimeDebugLibSerialPort library by invoking the proposed RuntimeDebugOutput protocol at runtime if one is available, and providing an implementation of this protocol for PL011. Ard Biesheuvel (4): MdePkg: move DxeRuntimeDebugLibSerialPort to MdeModulePkg MdeModulePkg: introduce runtime debug output protocol MdeModulePkg/DxeRuntimeDebugLibSerialPort: invoke RuntimeDebugOutputProtocol ArmPlatformPkg: add PL011 UART runtime debug driver ArmPlatformPkg/Drivers/PL011RuntimeDebugOutputDxe/PL011RuntimeDebugOutputDxe.c | 144 ++++++++++++++++++ ArmPlatformPkg/Drivers/PL011RuntimeDebugOutputDxe/PL011RuntimeDebugOutputDxe.inf | 62 ++++++++ ArmVirtPkg/ArmVirt.dsc.inc | 2 +- MdeModulePkg/Include/Protocol/RuntimeDebugOutput.h | 58 ++++++++ {MdePkg => MdeModulePkg}/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c | 155 +++++++++++++++++--- {MdePkg => MdeModulePkg}/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf | 5 + {MdePkg => MdeModulePkg}/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.uni | 0 MdeModulePkg/MdeModulePkg.dec | 4 + 8 files changed, 412 insertions(+), 18 deletions(-) create mode 100644 ArmPlatformPkg/Drivers/PL011RuntimeDebugOutputDxe/PL011RuntimeDebugOutputDxe.c create mode 100644 ArmPlatformPkg/Drivers/PL011RuntimeDebugOutputDxe/PL011RuntimeDebugOutputDxe.inf create mode 100644 MdeModulePkg/Include/Protocol/RuntimeDebugOutput.h rename {MdePkg => MdeModulePkg}/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c (70%) rename {MdePkg => MdeModulePkg}/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf (88%) rename {MdePkg => MdeModulePkg}/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.uni (100%) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel