From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=45.249.212.190; helo=huawei.com; envelope-from=guoheyi@huawei.com; receiver=edk2-devel@lists.01.org Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 28C232194EB7A for ; Mon, 1 Apr 2019 02:07:55 -0700 (PDT) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D72246934482B8AD258C; Mon, 1 Apr 2019 17:07:51 +0800 (CST) Received: from linux-Bxxcye.huawei.com (10.175.104.222) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Mon, 1 Apr 2019 17:07:43 +0800 From: Heyi Guo To: CC: , Heyi Guo , Laszlo Ersek , Ard Biesheuvel , Julien Grall , Heyi Guo Date: Mon, 1 Apr 2019 17:06:30 +0800 Message-ID: <1554109590-16131-3-git-send-email-guoheyi@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1554109590-16131-1-git-send-email-guoheyi@huawei.com> References: <1554109590-16131-1-git-send-email-guoheyi@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.222] X-CFilter-Loop: Reflected Subject: [PATCH 2/2] ArmVirtQemu: enable runtime debug by build flag X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2019 09:07:55 -0000 Content-Type: text/plain Introduce a build flag "RT_DEBUG" to enable runtime debug, so that we can have a handy method for UEFI runtime services debug. This build flag only applies to DEBUG build; the reason for not enabling it for DEBUG build by default is that we are still using the same UART of OS and it may cause potential conflict. User needs to specify "-D RT_DEBUG=TRUE"; "-D RT_DEBUG" is not enough for we use !if $(RT_DEBUG)==TRUE in the code. Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo Signed-off-by: Heyi Guo --- ArmVirtPkg/ArmVirt.dsc.inc | 4 ++++ ArmVirtPkg/ArmVirtQemu.dsc | 1 + 2 files changed, 5 insertions(+) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index d172a08..5ace31b 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -240,8 +240,12 @@ MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf !if $(TARGET) != RELEASE +!if $(RT_DEBUG) == TRUE + SerialPortLib|ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLibRuntime.inf +!else DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf !endif +!endif !if $(SECURE_BOOT_ENABLE) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index d703317..b279d7d 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -37,6 +37,7 @@ DEFINE SECURE_BOOT_ENABLE = FALSE DEFINE NETWORK_IP6_ENABLE = FALSE DEFINE HTTP_BOOT_ENABLE = FALSE + DEFINE RT_DEBUG = FALSE !include ArmVirtPkg/ArmVirt.dsc.inc -- 1.8.3.1