From patchwork Thu Feb 22 16:28:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 129294 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp778050lja; Thu, 22 Feb 2018 08:28:38 -0800 (PST) X-Google-Smtp-Source: AH8x225mV+qLWTR2/rNgyMhPav9lQiaKleDJFseYFIkGBJ+EFIDb7PjnI9M7fwVo2m94wIBgUnaM X-Received: by 10.98.61.133 with SMTP id x5mr4485529pfj.181.1519316918018; Thu, 22 Feb 2018 08:28:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519316918; cv=none; d=google.com; s=arc-20160816; b=cmxD+MM2i5Z4TdLcJ3Ju6dZ2htcraM+rpH2jiEHpTyMJdVLFaUrOf1YKCtjwJtzwJI 2iVxrKSYSbFy4Zp3c6WRUCmxkc/rGzTvcxv7DAeT+q8cfc7SdVGtbf4el1rAuCZLKKyb Q6ftRX36JhW4Amy8pBX/dfzi0lo5hU2dy5URoytKEL3VjC8kg+s79uAU4dGVNFHSzSPM BNZ4MPPuA67xcJ30f3SFqwE2XmoFqJwAlSkV7qvQZlGfYsw3Pl7XMct1PO2gZPcMho3W 78w2KTYOILnUklLk/5nPR9wBmdZVcwW/u8ksx1zhyFCRtqg29JOQTiJYvjK2M6yJXNTi 9rmA== 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=AecMFDOZw0KoUwUfg54ojTlERyd2EfUjdzxaCTkkBgg=; b=Z6Cyiqr6ymytZMatze6s5NURkyBUAMPTO2DI1dL/AcuCnY8ybCNu7R2G2clNK8mQMF gw3B+6PsFZ1blWfcoht93k0e9vN78JS5H7yQ+Y2DJSaqKQFtZq8aGZ7i0mGXtcOHxSCX x7Dkb0Y7ktsIiDINy0WaMcJB588rhgBOhcJPp3jUZ8UNkuMrjjaHroqxLopyTXOXqoQu Aa1q48B9NfthLeuppVGx17srKnFUUBQDG4HPDYUq8s90tGsyi5TsIAQQISwoYOqyybiC UKDtXkBhWYVEUgj1Ux/9S/JkgS3LXTg6Pmw9S6IkIh98AQMqu7kiLC8Lm+65rNqS76dH SFkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LBZXJ+UU; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id p75si269374pfi.293.2018.02.22.08.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 08:28:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LBZXJ+UU; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 6442F222630B3; Thu, 22 Feb 2018 08:22:36 -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:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 D1F9F222630A6 for ; Thu, 22 Feb 2018 08:22:34 -0800 (PST) Received: by mail-wr0-x243.google.com with SMTP id k9so11175820wre.9 for ; Thu, 22 Feb 2018 08:28:35 -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=X4plPf3qaQa4ZrsVV+2bdyjICb0kQKNE9gAeV0GpcyE=; b=LBZXJ+UUbmv3LswuWAzmb6SxdnMUNvYKxp7GRDRfhhW518dHriMIcd7Chu/rujr9tR z6aM9ePTrl/uiWCik20StoLjVx8nc3YBvH7Ex58JFkCqNPx1hjniqVKyDgZ9gEoG/Ldz 74GJ57uYHJ/A906PI+Deju0BKwd2xl4sntux0= 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=X4plPf3qaQa4ZrsVV+2bdyjICb0kQKNE9gAeV0GpcyE=; b=QOs28qZvBti6DsMNfCKWM3jTgUaL5xxvuzL4FG+6fp8jFZwUrY37xT6u8kCi8xyAOD M4y5bq3V9rxkP/vUHML7t7Q8T4PKeHIPWDmEEWNyMKFylx5ijEm0d89GVHWqHK+CdNpd OMeT7ehBcajSRg/AgfKJnVc8Xg2lvDOIEnEYuET6pDNIQQERJMN381qHHHB7NjsSjLyi I1ZIPJn5yRFnRdV5qfhtJ3SFhI51TLlB3aEtKZ3chiZ3foRnRSGSm4+MpazSF+3G2KRH hNs1B4nrkfVBhqoVuOLHkUDCcqYmQHJD+lAq38un35J8D+zx3HkfBjT4gahmX1d6AvNy PnDA== X-Gm-Message-State: APf1xPB7bhqUexm8nVe/aqVCCZ50W+LHD2mNhvMSoAoPwoKjootLPpjH 2e8ajv2UYjaxY4MtWgSfB5q43GGdRA8= X-Received: by 10.223.202.18 with SMTP id o18mr6458335wrh.4.1519316913620; Thu, 22 Feb 2018 08:28:33 -0800 (PST) Received: from localhost.localdomain ([196.90.4.100]) by smtp.gmail.com with ESMTPSA id b185sm867955wmb.24.2018.02.22.08.28.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 08:28:32 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 22 Feb 2018 16:28:20 +0000 Message-Id: <20180222162822.22703-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH edk2-platforms v2 0/2] Create UART DebugLib implementation for runtime drivers 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: ruiyu.ni@intel.com, Ard Biesheuvel , afish@apple.com, liming.gao@intel.com, leif.lindholm@linaro.org, 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" Commit 4bf95a9f361e ("MdeModulePkg/ResetSystemRuntimeDxe: Add more debug message") broke the DEBUG build for systems using a MMIO mapped UART for DEBUG output. In other words, it broke the build for all ARM and AARCH64 systems, given that port I/O does not exist on those architectures. Instead of patching it up locally, let's fix this issue once and for all, by creating a UART DebugLib implementation for DXE_RUNTIME_DRIVER modules that does the right thing by default. v2: - incorporate Laszlo's feedback into patch #1 - add Laszlo's R-b to patch #2 - dropped patch #3 that blacklists the original BASE implementation for DXE_RUNTIME_DRIVER modules Note that I retained the deadloop/breakpoint code for ASSERT()s at runtime. I think it is perfectly reasonable behavior for a DEBUG build at runtime, even if other cores may be up and running as well: the purpose of these facilities is to allow a debugger to attach to the CPU to figure out what has happened, and both deadloops and breakpoints can achieve that just fine even at runtime. Ard Biesheuvel (2): MdePkg: introduce DxeRuntimeDebugLibSerialPort ArmVirtPkg: switch to DXE runtime version of DebugLib where appropriate ArmVirtPkg/ArmVirt.dsc.inc | 3 + MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c | 373 ++++++++++++++++++++ MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf | 56 +++ MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.uni | 21 ++ 4 files changed, 453 insertions(+) create mode 100644 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c create mode 100644 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf create mode 100644 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.uni -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel