From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AH8x227z4a1thWl7x8lMiPSlIMYXgav7WU0WcGcTmyxH8Z1Z+0AuC71JSZQdV3Q2U/ri7+vca4FQLA== 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 Cc: leif.lindholm@linaro.org, lersek@redhat.com, liming.gao@intel.com, michael.d.kinney@intel.com, afish@apple.com, star.zeng@intel.com, ruiyu.ni@intel.com, Ard Biesheuvel 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: [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: , X-List-Received-Date: Thu, 22 Feb 2018 16:22:35 -0000 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