From nobody Sat May 4 15:18:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1583516625; cv=none; d=zohomail.com; s=zohoarc; b=mzbjrOGfQVc4rAHquA3b5wDrgN82OoyTlIYyiQLZAboB5mNKFD9TV0Dbtyp12JR/TKpasGNoWamtwnSMVobGE6oaSCc1r+Ov0o+rPAU2QsxMPRRtcPkJhi89D7SeVyA+bAuuOIJHYa8TwB5GHyOn7xTvKllMEmvBjWrr/ghWeBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583516625; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mKSwYtXGG9U9KlBzsCdIaEomjdRAwJruB0DxnzNgM0g=; b=YPt0nFXiaF7bPvyqA8ee8T0h0xLmkFSqiaJID06AhOTau+UhiPG+0/XFFkE7UzBgkCcJdyF/l93DHD0nIvAfTelzzZ+Jubgt6aailwP0TPF/KIc7ahYAo2f2kslnLNMOFztGtulEVLzZ+ThkdTqdOYrp/rRheQtZFXXiy/00Ru0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1583516625974687.1230631319556; Fri, 6 Mar 2020 09:43:45 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jAGzy-0003Pz-Om; Fri, 06 Mar 2020 17:42:58 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jAGzx-0003Po-5u for xen-devel@lists.xenproject.org; Fri, 06 Mar 2020 17:42:57 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e8900191-5fd1-11ea-a854-12813bfff9fa; Fri, 06 Mar 2020 17:42:56 +0000 (UTC) X-Inumbo-ID: e8900191-5fd1-11ea-a854-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1583516576; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ML8JzuGv7JkrvfFgA0idwk/simtAdYJfTB4JkB8/XhQ=; b=UgFPKkqZ04Nw8+WWrlVamGnwxo5Xx9mk0DWYwqBA06hnoo4jTQp97iE5 NFYiwMewRNbkzSyxjjhJIUvQI8NCHg3nVT3e7YmmJDeEBO7jlcGGBPHZt 4uNMCPYSojQJNC/IbaFCeXtlfjJ7GxsDQllqfURAyzrlp9eGJUcuCweuR E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: V8MFfJc1BD2SgntFKuyjGgGPlw/RygYsqTK6DGQrP2XX6s+ipV+2U6rQSD1JcRagp1WgkVwzg5 eYrksw0f5JfQIOPUtgdAKfq0qD1VIm1SnVC5hHpA5AhcP3yMFER1DhF5RvjjUUVvB+oZUC3rK3 ErSOFUYR8slYEjDEqatXWJpd1AwUB0uFwW6geEs2m1NlUjWqA552zVbW5RESPLkOiMZGPJmWhG GyVNCHRr4bZw0PiAH6HnTsfjJvyW8qRhTP4rCFqgPTKEv1vJbDoJJZCR0wwYQXkJPKMc4Polh4 wsE= X-SBRS: 2.7 X-MesageID: 13522056 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,522,1574139600"; d="scan'208";a="13522056" From: Anthony PERARD To: Date: Fri, 6 Mar 2020 17:42:49 +0000 Message-ID: <20200306174250.291503-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200306174250.291503-1-anthony.perard@citrix.com> References: <20200306174250.291503-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 1/2] xen/arm: Rename all early printk macro X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Volodymyr Babchuk , Stefano Stabellini , Julien Grall Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We are going to move the generation of the early printk macro into Kconfig. This means all macro will be prefix with CONFIG_. We do that ahead of the change. We also take the opportunity to better name some variables, which are used by only one driver and wouldn't make sens for other UART driver. Thus, - EARLY_UART_REG_SHIFT became CONFIG_EARLY_UART_8250_REG_SHIFT - EARLY_PRINTK_VERSION_* became CONFIG_EARLY_UART_SCIF_VERSION_* The other variables are change to have the prefix CONFIG_EARLY_UART_ when they change a parameter of the driver. So we have now: - CONFIG_EARLY_UART_BAUD_RATE - CONFIG_EARLY_UART_BASE_ADDRESS - CONFIG_EARLY_UART_INIT We also reuse CONFIG_EARLY_PRINTK provided by users to enable or not early printk, thus we need to override the value in makefile. Signed-off-by: Anthony PERARD --- That's based on early work by Julien [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early prin= tk using Kconfig <20190913103953.8182-1-julien.grall@arm.com> --- xen/arch/arm/Makefile | 2 +- xen/arch/arm/Rules.mk | 20 +++++++++----------- xen/arch/arm/arm32/Makefile | 2 +- xen/arch/arm/arm32/debug-8250.inc | 2 +- xen/arch/arm/arm32/debug-pl011.inc | 4 ++-- xen/arch/arm/arm32/debug-scif.inc | 4 ++-- xen/arch/arm/arm32/debug.S | 4 ++-- xen/arch/arm/arm32/head.S | 10 +++++----- xen/arch/arm/arm64/Makefile | 2 +- xen/arch/arm/arm64/debug-8250.inc | 4 ++-- xen/arch/arm/arm64/debug-pl011.inc | 4 ++-- xen/arch/arm/arm64/debug.S | 4 ++-- xen/arch/arm/arm64/head.S | 10 +++++----- xen/include/asm-arm/early_printk.h | 2 +- 14 files changed, 36 insertions(+), 38 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 1044c2298a05..12f92a4bd3f9 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -16,7 +16,7 @@ obj-y +=3D device.o obj-y +=3D domain.o obj-y +=3D domain_build.init.o obj-y +=3D domctl.o -obj-$(EARLY_PRINTK) +=3D early_printk.o +obj-$(CONFIG_EARLY_PRINTK) +=3D early_printk.o obj-y +=3D gic.o obj-y +=3D gic-v2.o obj-$(CONFIG_GICV3) +=3D gic-v3.o diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index 022a3a6f82ba..85f8a4c6f914 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -18,8 +18,6 @@ CFLAGS-$(CONFIG_ARM_32) +=3D -mcpu=3Dcortex-a15 CFLAGS-$(CONFIG_ARM_64) +=3D -mcpu=3Dgeneric CFLAGS-$(CONFIG_ARM_64) +=3D -mgeneral-regs-only # No fp registers etc =20 -EARLY_PRINTK :=3D n - ifeq ($(CONFIG_DEBUG),y) =20 # See docs/misc/arm/early-printk.txt for syntax @@ -66,22 +64,22 @@ endif endif ifeq ($(EARLY_PRINTK_INC),scif) ifneq ($(word 3,$(EARLY_PRINTK_CFG)),) -CFLAGS-y +=3D -DEARLY_PRINTK_VERSION_$(word 3,$(EARLY_PRINTK_CFG)) +CFLAGS-y +=3D -DCONFIG_EARLY_UART_SCIF_VERSION_$(word 3,$(EARLY_PRINTK_CFG= )) else -CFLAGS-y +=3D -DEARLY_PRINTK_VERSION_NONE +CFLAGS-y +=3D -DCONFIG_EARLY_UART_SCIF_VERSION_NONE endif endif =20 ifneq ($(EARLY_PRINTK_INC),) -EARLY_PRINTK :=3D y +override CONFIG_EARLY_PRINTK :=3D y endif =20 -CFLAGS-$(EARLY_PRINTK) +=3D -DCONFIG_EARLY_PRINTK -CFLAGS-$(EARLY_PRINTK_INIT_UART) +=3D -DEARLY_PRINTK_INIT_UART -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_PRINTK_INC=3D\"debug-$(EARLY_PRINTK_IN= C).inc\" -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_PRINTK_BAUD=3D$(EARLY_PRINTK_BAUD) -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_UART_BASE_ADDRESS=3D$(EARLY_UART_BASE_= ADDRESS) -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_UART_REG_SHIFT=3D$(EARLY_UART_REG_SHIF= T) +CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_PRINTK +CFLAGS-$(EARLY_PRINTK_INIT_UART) +=3D -DCONFIG_EARLY_UART_INIT +CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_PRINTK_INC=3D\"debug-$(E= ARLY_PRINTK_INC).inc\" +CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_UART_BAUD_RATE=3D$(EARLY= _PRINTK_BAUD) +CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_UART_BASE_ADDRESS=3D$(EA= RLY_UART_BASE_ADDRESS) +CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_UART_8250_REG_SHIFT=3D$(= EARLY_UART_REG_SHIFT) =20 else # !CONFIG_DEBUG =20 diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile index 539bbef298a7..96105d238307 100644 --- a/xen/arch/arm/arm32/Makefile +++ b/xen/arch/arm/arm32/Makefile @@ -1,6 +1,6 @@ obj-y +=3D lib/ =20 -obj-$(EARLY_PRINTK) +=3D debug.o +obj-$(CONFIG_EARLY_PRINTK) +=3D debug.o obj-y +=3D domctl.o obj-y +=3D domain.o obj-y +=3D entry.o diff --git a/xen/arch/arm/arm32/debug-8250.inc b/xen/arch/arm/arm32/debug-8= 250.inc index 0759a27ee157..c47e8be4aaf3 100644 --- a/xen/arch/arm/arm32/debug-8250.inc +++ b/xen/arch/arm/arm32/debug-8250.inc @@ -23,7 +23,7 @@ */ .macro early_uart_ready rb rc 1: - ldr \rc, [\rb, #(UART_LSR << EARLY_UART_REG_SHIFT)] /* Read LS= R */ + ldr \rc, [\rb, #(UART_LSR << CONFIG_EARLY_UART_8250_REG_SHIFT)= ] /* Read LSR */ tst \rc, #UART_LSR_THRE /* Check Xmit holding register fla= g */ beq 1b /* Wait for the UART to be read= y */ .endm diff --git a/xen/arch/arm/arm32/debug-pl011.inc b/xen/arch/arm/arm32/debug-= pl011.inc index ec462eabab5c..82a22984d9b5 100644 --- a/xen/arch/arm/arm32/debug-pl011.inc +++ b/xen/arch/arm/arm32/debug-pl011.inc @@ -25,9 +25,9 @@ * rd: scratch register 2 (unused here) */ .macro early_uart_init rb, rc, rd - mov \rc, #(7372800 / EARLY_PRINTK_BAUD % 16) + mov \rc, #(7372800 / CONFIG_EARLY_UART_BAUD_RATE % 16) str \rc, [\rb, #FBRD] /* -> UARTFBRD (Baud divisor fraction)= */ - mov \rc, #(7372800 / EARLY_PRINTK_BAUD / 16) + mov \rc, #(7372800 / CONFIG_EARLY_UART_BAUD_RATE / 16) str \rc, [\rb, #IBRD] /* -> UARTIBRD (Baud divisor integer) = */ mov \rc, #0x60 /* 8n1 */ str \rc, [\rb, #LCR_H] /* -> UARTLCR_H (Line control) */ diff --git a/xen/arch/arm/arm32/debug-scif.inc b/xen/arch/arm/arm32/debug-s= cif.inc index 3f01c909c238..b2b82501e792 100644 --- a/xen/arch/arm/arm32/debug-scif.inc +++ b/xen/arch/arm/arm32/debug-scif.inc @@ -19,10 +19,10 @@ =20 #include =20 -#ifdef EARLY_PRINTK_VERSION_NONE +#ifdef CONFIG_EARLY_UART_SCIF_VERSION_NONE #define STATUS_REG SCIF_SCFSR #define TX_FIFO_REG SCIF_SCFTDR -#elif EARLY_PRINTK_VERSION_A +#elif CONFIG_EARLY_UART_SCIF_VERSION_A #define STATUS_REG SCIFA_SCASSR #define TX_FIFO_REG SCIFA_SCAFTDR #endif diff --git a/xen/arch/arm/arm32/debug.S b/xen/arch/arm/arm32/debug.S index 1829b29915e0..e77c76d0debc 100644 --- a/xen/arch/arm/arm32/debug.S +++ b/xen/arch/arm/arm32/debug.S @@ -19,8 +19,8 @@ =20 #include =20 -#ifdef EARLY_PRINTK_INC -#include EARLY_PRINTK_INC +#if defined (CONFIG_EARLY_PRINTK_INC) +#include CONFIG_EARLY_PRINTK_INC #endif =20 /* diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index e9d356f05c2b..2b593c5ef99a 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -36,8 +36,8 @@ #define XEN_FIRST_SLOT first_table_offset(XEN_VIRT_START) #define XEN_SECOND_SLOT second_table_offset(XEN_VIRT_START) =20 -#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC)) -#include EARLY_PRINTK_INC +#if (defined (CONFIG_EARLY_PRINTK)) && (defined (CONFIG_EARLY_PRINTK_INC)) +#include CONFIG_EARLY_PRINTK_INC #endif =20 /* @@ -223,7 +223,7 @@ GLOBAL(init_secondary) 1: =20 #ifdef CONFIG_EARLY_PRINTK - mov_w r11, EARLY_UART_BASE_ADDRESS /* r11 :=3D UART base address= */ + mov_w r11, CONFIG_EARLY_UART_BASE_ADDRESS /* r11 :=3D UART base = address */ PRINT("- CPU ") print_reg r7 PRINT(" booting -\r\n") @@ -706,8 +706,8 @@ ENTRY(switch_ttbr) * Clobbers r0 - r3 */ init_uart: - mov_w r11, EARLY_UART_BASE_ADDRESS -#ifdef EARLY_PRINTK_INIT_UART + mov_w r11, CONFIG_EARLY_UART_BASE_ADDRESS +#ifdef CONFIG_EARLY_UART_INIT early_uart_init r11, r1, r2 #endif PRINT("- UART enabled -\r\n") diff --git a/xen/arch/arm/arm64/Makefile b/xen/arch/arm/arm64/Makefile index db8565b71a33..40642ff57494 100644 --- a/xen/arch/arm/arm64/Makefile +++ b/xen/arch/arm/arm64/Makefile @@ -2,7 +2,7 @@ obj-y +=3D lib/ =20 obj-y +=3D cache.o obj-$(CONFIG_HARDEN_BRANCH_PREDICTOR) +=3D bpi.o -obj-$(EARLY_PRINTK) +=3D debug.o +obj-$(CONFIG_EARLY_PRINTK) +=3D debug.o obj-y +=3D domctl.o obj-y +=3D domain.o obj-y +=3D entry.o diff --git a/xen/arch/arm/arm64/debug-8250.inc b/xen/arch/arm/arm64/debug-8= 250.inc index 53d6828bfafe..30ea13077e22 100644 --- a/xen/arch/arm/arm64/debug-8250.inc +++ b/xen/arch/arm/arm64/debug-8250.inc @@ -25,7 +25,7 @@ */ .macro early_uart_ready xb c 1: - ldrb w\c, [\xb, #UART_LSR << EARLY_UART_REG_SHIFT] + ldrb w\c, [\xb, #UART_LSR << CONFIG_EARLY_UART_8250_REG_SHIFT] and w\c, w\c, #UART_LSR_THRE cmp w\c, #UART_LSR_THRE b.ne 1b @@ -38,7 +38,7 @@ */ .macro early_uart_transmit xb wt /* UART_THR transmit holding */ - strb \wt, [\xb, #UART_THR << EARLY_UART_REG_SHIFT] + strb \wt, [\xb, #UART_THR << CONFIG_EARLY_UART_8250_REG_SHIFT] .endm =20 /* diff --git a/xen/arch/arm/arm64/debug-pl011.inc b/xen/arch/arm/arm64/debug-= pl011.inc index 569c3dfbcf47..117b5b256405 100644 --- a/xen/arch/arm/arm64/debug-pl011.inc +++ b/xen/arch/arm/arm64/debug-pl011.inc @@ -24,9 +24,9 @@ * c: scratch register number */ .macro early_uart_init xb, c - mov x\c, #(7372800 / EARLY_PRINTK_BAUD % 16) + mov x\c, #(7372800 / CONFIG_EARLY_UART_BAUD_RATE % 16) strh w\c, [\xb, #0x28] /* -> UARTFBRD (Baud divisor fraction= ) */ - mov x\c, #(7372800 / EARLY_PRINTK_BAUD / 16) + mov x\c, #(7372800 / CONFIG_EARLY_UART_BAUD_RATE / 16) strh w\c, [\xb, #0x24] /* -> UARTIBRD (Baud divisor integer)= */ mov x\c, #0x60 /* 8n1 */ str w\c, [\xb, #0x2C] /* -> UARTLCR_H (Line control) */ diff --git a/xen/arch/arm/arm64/debug.S b/xen/arch/arm/arm64/debug.S index b7f53ac0519b..71cad9d762b2 100644 --- a/xen/arch/arm/arm64/debug.S +++ b/xen/arch/arm/arm64/debug.S @@ -19,8 +19,8 @@ =20 #include =20 -#ifdef EARLY_PRINTK_INC -#include EARLY_PRINTK_INC +#ifdef CONFIG_EARLY_PRINTK_INC +#include CONFIG_EARLY_PRINTK_INC #endif =20 /* diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index e5015f93a2d8..4d45ea3dac3c 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -45,8 +45,8 @@ #define __HEAD_FLAGS ((__HEAD_FLAG_PAGE_SIZE << 1) | \ (__HEAD_FLAG_PHYS_BASE << 3)) =20 -#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC)) -#include EARLY_PRINTK_INC +#if (defined (CONFIG_EARLY_PRINTK)) && (defined (CONFIG_EARLY_PRINTK_INC)) +#include CONFIG_EARLY_PRINTK_INC #endif =20 /* @@ -363,7 +363,7 @@ GLOBAL(init_secondary) 1: =20 #ifdef CONFIG_EARLY_PRINTK - ldr x23, =3DEARLY_UART_BASE_ADDRESS /* x23 :=3D UART base addres= s */ + ldr x23, =3DCONFIG_EARLY_UART_BASE_ADDRESS /* x23 :=3D UART base= address */ PRINT("- CPU ") print_reg x24 PRINT(" booting -\r\n") @@ -843,8 +843,8 @@ ENTRY(switch_ttbr) * Clobbers x0 - x1 */ init_uart: - ldr x23, =3DEARLY_UART_BASE_ADDRESS -#ifdef EARLY_PRINTK_INIT_UART + ldr x23, =3DCONFIG_EARLY_UART_BASE_ADDRESS +#ifdef CONFIG_EARLY_UART_INIT early_uart_init x23, 0 #endif PRINT("- UART enabled -\r\n") diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early= _printk.h index 078cf701dcb0..d5485decfa9f 100644 --- a/xen/include/asm-arm/early_printk.h +++ b/xen/include/asm-arm/early_printk.h @@ -15,7 +15,7 @@ =20 /* need to add the uart address offset in page to the fixmap address */ #define EARLY_UART_VIRTUAL_ADDRESS \ - (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK)) + (FIXMAP_ADDR(FIXMAP_CONSOLE) + (CONFIG_EARLY_UART_BASE_ADDRESS & ~PAGE= _MASK)) =20 #endif /* !CONFIG_EARLY_PRINTK */ =20 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sat May 4 15:18:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1583516624; cv=none; d=zohomail.com; s=zohoarc; b=OVjx1h45yKrCPjT3K+dtQS3FDx2/GtPYLP70TIOFoCPTEaNR1LYu9Q9cYccFf9sq8Lgr/v4pM24UhtvEma8SKCIXdfiAoXKghWLXNmrr4VqHcaO+0tWSngB4o7xXlk6J0Y/1cuam05iYt/c3+ibvqTXOIyRzPIqNUpe6EEG+Dy8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583516624; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+IeEXVvoFmLrO/TLnDGJM5u0McvauN5hEVvjP4DbQ+o=; b=aEC8NXO+Jo4Ffw2QpktCuPOVUa6J7cyw5vco6plli+Hi0iLgyqLOcnG/LlO+dSAG+lm/uu1n6OrKGHSv29P7nM/V0B+/S0QqF5MXZiyDpk2cZf+Ys1l8jikgg3NhV+m6jb2qXmUQU6MC7uXrfLSvWApucGLJj8xF2Qg//JuC4Tc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1583516624010503.7160475930731; Fri, 6 Mar 2020 09:43:44 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jAH04-0003QI-1c; Fri, 06 Mar 2020 17:43:04 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jAH02-0003Q9-6G for xen-devel@lists.xenproject.org; Fri, 06 Mar 2020 17:43:02 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ea399394-5fd1-11ea-a854-12813bfff9fa; Fri, 06 Mar 2020 17:42:57 +0000 (UTC) X-Inumbo-ID: ea399394-5fd1-11ea-a854-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1583516577; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SOdzdE4czPZS+7ij8CMw1+lOSWSeilhNVWwltMQ72c0=; b=gYzpd9VkOHxlhVITjNWyt2KFSgmeIw9e/LRWC2R5v3sjNKEuV16/NuDj ybS2skJwFlIZZqrNX2btGAaJKb+hDv7du4+PCjAfcdDadV53oOGwB6nHO K4EiiRh45bxOQ6lHs9ZFyXFq0FxWN+dI3JaiiemjvLzRYVkVxtTWpXupA Q=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: SqoMDk17lHAl3ekcpZ9KhFKuHSvOBZxTHRpJxl70R2zC9ksLbuwtGY1eeiEUWhbzNQLqsss6By jwc5qUYmR6fTdGFeh734dD5NjtrAAn94pKzd47shdleYj3kNGQ9LQ+YjoS0LTPEG1EW341+1uo a6W7N0yopS+lmIFHkAV0O9mvQEbDhN7OjNo9HcE9R4Jo0Is7rZxvh0taF5OeYIhfGs85Ftc9mu p2bvz/M0cmapeB0I7Fe3juAiGyZqOOp8VtIIEUCTGgB6QMC+OlcU9zN2wHT8iSOA8YHrLB7Xmt 7ww= X-SBRS: 2.7 X-MesageID: 13522057 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,522,1574139600"; d="scan'208";a="13522057" From: Anthony PERARD To: Date: Fri, 6 Mar 2020 17:42:50 +0000 Message-ID: <20200306174250.291503-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200306174250.291503-1-anthony.perard@citrix.com> References: <20200306174250.291503-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 2/2] xen/arm: Configure early printk via Kconfig X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Julien Grall , Jan Beulich , Anthony PERARD , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Julien Grall At the moment, early printk can only be configured on the make command line. It is not very handy because a user has to remove the option everytime it is using another command other than compiling the hypervisor. Furthermore, early printk is one of the few odds one that are not using Kconfig. So this is about time to move it to Kconfig. The new kconfigs options allow a user to eather select a UART driver to use at boot time, and set the parameters, or it is still possible to select a platform which will set the parameters. If a UART driver has been selected, the choice to select a platform won't be possible. Signed-off-by: Julien Grall Signed-off-by: Anthony PERARD Tested-by: Stefano Stabellini --- Original patch: [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early prin= tk using Kconfig <20190913103953.8182-1-julien.grall@arm.com> --- docs/misc/arm/early-printk.txt | 50 ++++---- xen/Kconfig.debug | 2 + xen/arch/arm/Kconfig.debug | 208 +++++++++++++++++++++++++++++++++ xen/arch/arm/Rules.mk | 72 ------------ xen/arch/x86/Kconfig.debug | 0 5 files changed, 234 insertions(+), 98 deletions(-) create mode 100644 xen/arch/arm/Kconfig.debug create mode 100644 xen/arch/x86/Kconfig.debug diff --git a/docs/misc/arm/early-printk.txt b/docs/misc/arm/early-printk.txt index 89e081e51eaf..7dff6c314549 100644 --- a/docs/misc/arm/early-printk.txt +++ b/docs/misc/arm/early-printk.txt @@ -1,42 +1,40 @@ How to enable early printk =20 -Early printk can only be enabled if debug=3Dy. You may want to enable it if -you are debbuging code that executes before the console is initialized. +Early printk can only be enabled if CONFIG_DEBUG=3Dy. You may want to enab= le +it if you are debbuging code that executes before the console is +initialized. =20 Note that selecting this option will limit Xen to a single UART definition. Attempting to boot Xen image on a different platform *will not work*, so t= his option should not be enable for Xens that are intended to be portable. =20 -CONFIG_EARLY_PRINTK=3D,, +Select one of the "UART drivers for early printk" in the "Debugging option= s" of +Kconfig. You will then need to set other options, which depends on the dri= vers +selected. =20 - and are mandatory arguments: +CONFIG_EARLY_UART_BASE_ADDRESS is a mandatory arguments, it is the base +physical address of the UART to use. =20 - - is the name of the driver, see xen/arch/arm/arm{32,64}/debug-*.i= nc - (where corresponds to the wildcarded *). - - is the base physical address of the UART to use +Other options depends on the driver selected: + - 8250 + - CONFIG_EARLY_UART_8250_REG_SHIFT is, optionally, the left-shift to + apply to the register offsets within the uart. + - pl011 + - CONFIG_EARLY_UART_BAUD_RATE is, optionally a baud rate which should + be used to configure the UART at start of day. =20 - varies depending on : + Select CONFIG_EARLY_UART_INIT to have the option, if that's set to N + then the code will not try to initialize the UART, so that bootloader + or firmware settings can be used for maximum compatibility. + - scif + - CONFIG_EARLY_UART_SCIF_VERSION is, optionally, the interface version + of the UART. Default to version NONE. =20 - - 8250,, - - is, optionally, the left-shift to apply to the - register offsets within the uart. - - pl011,, - - is, optionally a baud rate which should be used to - configure the UART at start of day. - - If is not given then the code will not try to - initialize the UART, so that bootloader or firmware settings can - be used for maximum compatibility. - - scif,, - - SCIF is, optionally, the interface version of the UART. - - If is not given then the default interface version (SCIF) - will be used. - For all other uarts there are no additional options. =20 As a convenience it is also possible to select from a list of -predefined configurations using CONFIG_EARLY_PRINTK=3Dmach where mach is -the name of the machine: +predefined configurations via "Enable early printk for a specific platform +(deprecated)". =20 - brcm: printk with 8250 on Broadcom 7445D0 boards with A15 processors. - dra7: printk with 8250 on DRA7 platform @@ -58,7 +56,7 @@ the name of the machine: - xgene-storm: printk with 820 on Xgene storm platform - zynqmp: printk with Cadence UART for Xilinx ZynqMP SoCs =20 -These settings are is hardcoded in xen/arch/arm/Rules.mk, +These settings are is hardcoded in xen/arch/arm/Kconfig.debug, see there when adding support for new machines. =20 By default early printk is disabled. diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index b3511e81a275..ee6ee33b69be 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -128,6 +128,8 @@ config XMEM_POOL_POISON Poison free blocks with 0xAA bytes and verify them when a block is allocated in order to spot use-after-free issues. =20 +source "arch/$(SRCARCH)/Kconfig.debug" + endif # DEBUG || EXPERT =20 endmenu diff --git a/xen/arch/arm/Kconfig.debug b/xen/arch/arm/Kconfig.debug new file mode 100644 index 000000000000..5111f89043ca --- /dev/null +++ b/xen/arch/arm/Kconfig.debug @@ -0,0 +1,208 @@ +choice + bool "UART drivers for early printk" + optional + help + Choose one of the UART driver, then you'll have to specifie the + parameters, like the base address. + + Alternatively, there are platform specific options + config EARLY_UART_CHOICE_8250 + select EARLY_UART_8250 + bool "8250 driver" + config EARLY_UART_CHOICE_CADENCE + select EARLY_UART_CADENCE + depends on ARM_64 + bool "Enable early printk via Cadence UART" + config EARLY_UART_CHOICE_EXYNOS4210 + select EARLY_UART_EXYNOS4210 + depends on ARM_32 + bool "exynos 4210 driver" + config EARLY_UART_CHOICE_MESON + select EARLY_UART_MESON + depends on ARM_64 + bool "meson driver" + config EARLY_UART_CHOICE_MVEBU + select EARLY_UART_MVEBU + depends on ARM_64 + bool "mvebu driver" + config EARLY_UART_CHOICE_PL011 + select EARLY_UART_PL011 + bool "pl011 driver" + config EARLY_UART_CHOICE_SCIF + select EARLY_UART_SCIF + bool "scif driver" +endchoice + + +choice + bool "Enable early printk for a specific platform (deprecated)" + depends on !(EARLY_UART_CHOICE_8250 || EARLY_UART_CHOICE_CADENCE || EARLY= _UART_CHOICE_EXYNOS4210 || EARLY_UART_CHOICE_MESON || EARLY_UART_CHOICE_MVE= BU || EARLY_UART_CHOICE_PL011 || EARLY_UART_CHOICE_SCIF) + optional + help + Those are platform specific options for early printk. This are + deprecated and will soon be removed. + + Select a UART driver instead. + + config EARLY_PRINTK_BRCM + bool "printk with 8250 on Broadcom 7445D0 boards with A15 processors" + select EARLY_UART_8250 + config EARLY_PRINTK_DRA7 + bool "printk with 8250 on DRA7 platform" + select EARLY_UART_8250 + config EARLY_PRINTK_EXYNOS5250 + bool "printk with the second UART on Exynos5250" + select EARLY_UART_EXYNOS4210 + depends on ARM_32 + config EARLY_PRINTK_FASTMODEL + bool "printk on ARM Fastmodel software emulators" + select EARLY_UART_PL011 + config EARLY_PRINTK_HIKEY960 + bool "printk with pl011 with Hikey 960" + select EARLY_UART_PL011 + config EARLY_PRINTK_JUNO + bool "printk with pl011 on Juno platform" + select EARLY_UART_PL011 + config EARLY_PRINTK_LAGER + bool "printk with SCIF0 on Renesas Lager board (R-Car H2 processor)" + select EARLY_UART_SCIF + config EARLY_PRINTK_MIDWAY + bool "printk with the pl011 on Calxeda Midway processors" + select EARLY_UART_PL011 + config EARLY_PRINTK_MVEBU + bool "printk with the MVEBU for Marvell Armada 3700 SoCs" + select EARLY_UART_MVEBU + depends on ARM_64 + config EARLY_PRINTK_OMAP5432 + bool "printk with UART3 on TI OMAP5432 processors" + select EARLY_UART_8250 + config EARLY_PRINTK_RCAR3 + bool "printk with SCIF2 on Renesas R-Car Gen3 processors" + select EARLY_UART_SCIF + config EARLY_PRINTK_SEATTLE + bool "printk with pl011 for AMD Seattle processor" + select EARLY_UART_PL011 + config EARLY_PRINTK_SUN6I + bool "printk with 8250 on Allwinner A31 processors" + select EARLY_UART_8250 + config EARLY_PRINTK_SUN7I + bool "printk with 8250 on Allwinner A20 processors" + select EARLY_UART_8250 + config EARLY_PRINTK_THUNDERX + bool "printk with pl011 for Cavium ThunderX processor" + select EARLY_UART_PL011 + config EARLY_PRINTK_VEXPRESS + bool "printk with pl011 for versatile express" + select EARLY_UART_PL011 + config EARLY_PRINTK_XGENE_MCDIVITT + bool "printk with 820 on Xgene mcdivitt platform" + select EARLY_UART_8250 + config EARLY_PRINTK_XGENE_STORM + bool "printk with 820 on Xgene storm platform" + select EARLY_UART_8250 + config EARLY_PRINTK_ZYNQMP + bool "printk with Cadence UART for Xilinx ZynqMP SoCs" + select EARLY_UART_CADENCE + depends on ARM_64 + help + Say Y here if you want the early printk support on Xilinx + ZynQMP platform. + +endchoice + + +config EARLY_UART_8250 + bool +config EARLY_UART_CADENCE + bool +config EARLY_UART_EXYNOS4210 + bool +config EARLY_UART_MESON + bool +config EARLY_UART_MVEBU + bool +config EARLY_UART_PL011 + bool +config EARLY_UART_SCIF + bool + +config EARLY_PRINTK + depends on EARLY_UART_8250 || EARLY_UART_CADENCE || EARLY_UART_EXYNOS4210= || EARLY_UART_MESON || EARLY_UART_MVEBU || EARLY_UART_PL011 || EARLY_UART_= SCIF + def_bool y + +config EARLY_UART_BASE_ADDRESS + depends on EARLY_UART_8250 || EARLY_UART_CADENCE || EARLY_UART_EXYNOS4210= || EARLY_UART_MESON || EARLY_UART_MVEBU || EARLY_UART_PL011 || EARLY_UART_= SCIF + hex "Physical base address of debug UART" + default 0xF040AB00 if EARLY_PRINTK_BRCM + default 0x4806A000 if EARLY_PRINTK_DRA7 + default 0x1c090000 if EARLY_PRINTK_FASTMODEL + default 0x12c20000 if EARLY_PRINTK_EXYNOS5250 + default 0xfff32000 if EARLY_PRINTK_HIKEY960 + default 0x7ff80000 if EARLY_PRINTK_JUNO + default 0xe6e60000 if EARLY_PRINTK_LAGER + default 0xfff36000 if EARLY_PRINTK_MIDWAY + default 0xd0012000 if EARLY_PRINTK_MVEBU + default 0x48020000 if EARLY_PRINTK_OMAP5432 + default 0xe6e88000 if EARLY_PRINTK_RCAR3 + default 0xe1010000 if EARLY_PRINTK_SEATTLE + default 0x01c28000 if EARLY_PRINTK_SUN6I + default 0x01c28000 if EARLY_PRINTK_SUN7I + default 0x87e024000000 if EARLY_PRINTK_THUNDERX + default 0x1c090000 if EARLY_PRINTK_VEXPRESS + default 0x1c021000 if EARLY_PRINTK_XGENE_MCDIVITT + default 0x1c020000 if EARLY_PRINTK_XGENE_STORM + default 0xff000000 if EARLY_PRINTK_ZYNQMP + +config EARLY_UART_INIT + depends on EARLY_UART_PL011 + bool "Initialize UART early" + default y if EARLY_PRINTK_FASTMODEL + help + Select N to keep the settings that the bootloader or firmware + have selected, for maximum compatibility. + + Select Y to initialize the UART with a new baud rate. + +config EARLY_UART_BAUD_RATE + depends on EARLY_UART_PL011 && EARLY_UART_INIT + int "Early printk UART baud rate" + help + Sets the baud rate which should be used to configure the UART + at start of day. + + To avoid initialize the UART and reuse the bootloader or + firmware settings, set CONFIG_EARLY_UART_INIT to N (for maximum + compatibility). + default 115200 if EARLY_PRINTK_FASTMODEL + +config EARLY_UART_8250_REG_SHIFT + depends on EARLY_UART_8250 + int "left-shift to apply to the register offsets within the uart" + default 2 if EARLY_PRINTK_BRCM + default 2 if EARLY_PRINTK_DRA7 + default 2 if EARLY_PRINTK_OMAP5432 + default 2 if EARLY_PRINTK_SUN6I + default 2 if EARLY_PRINTK_SUN7I + default 2 if EARLY_PRINTK_XGENE_MCDIVITT + default 2 if EARLY_PRINTK_XGENE_STORM + default 0 + +choice EARLY_UART_SCIF_VERSION + prompt "UART SCIF interface version" + depends on EARLY_UART_SCIF + default EARLY_UART_SCIF_VERSION_NONE + config EARLY_UART_SCIF_VERSION_NONE + bool "default scif interface" + config EARLY_UART_SCIF_VERSION_A + bool "SCIF interface version A" +endchoice + +config EARLY_PRINTK_INC + string + default "debug-8250.inc" if EARLY_UART_8250 + default "debug-cadence.inc" if EARLY_UART_CADENCE + default "debug-exynos4210.inc" if EARLY_UART_EXYNOS4210 + default "debug-meson.inc" if EARLY_UART_MESON + default "debug-mvebu.inc" if EARLY_UART_MVEBU + default "debug-pl011.inc" if EARLY_UART_PL011 + default "debug-scif.inc" if EARLY_UART_SCIF diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index 85f8a4c6f914..43f6f3d38b9b 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -17,75 +17,3 @@ CFLAGS-$(CONFIG_ARM_32) +=3D -mcpu=3Dcortex-a15 =20 CFLAGS-$(CONFIG_ARM_64) +=3D -mcpu=3Dgeneric CFLAGS-$(CONFIG_ARM_64) +=3D -mgeneral-regs-only # No fp registers etc - -ifeq ($(CONFIG_DEBUG),y) - -# See docs/misc/arm/early-printk.txt for syntax - -EARLY_PRINTK_brcm :=3D 8250,0xF040AB00,2 -EARLY_PRINTK_dra7 :=3D 8250,0x4806A000,2 -EARLY_PRINTK_fastmodel :=3D pl011,0x1c090000,115200 -EARLY_PRINTK_exynos5250 :=3D exynos4210,0x12c20000 -EARLY_PRINTK_hikey960 :=3D pl011,0xfff32000 -EARLY_PRINTK_juno :=3D pl011,0x7ff80000 -EARLY_PRINTK_lager :=3D scif,0xe6e60000 -EARLY_PRINTK_midway :=3D pl011,0xfff36000 -EARLY_PRINTK_mvebu :=3D mvebu,0xd0012000 -EARLY_PRINTK_omap5432 :=3D 8250,0x48020000,2 -EARLY_PRINTK_rcar3 :=3D scif,0xe6e88000 -EARLY_PRINTK_seattle :=3D pl011,0xe1010000 -EARLY_PRINTK_sun6i :=3D 8250,0x01c28000,2 -EARLY_PRINTK_sun7i :=3D 8250,0x01c28000,2 -EARLY_PRINTK_thunderx :=3D pl011,0x87e024000000 -EARLY_PRINTK_vexpress :=3D pl011,0x1c090000 -EARLY_PRINTK_xgene-mcdivitt :=3D 8250,0x1c021000,2 -EARLY_PRINTK_xgene-storm :=3D 8250,0x1c020000,2 -EARLY_PRINTK_zynqmp :=3D cadence,0xff000000 - -ifneq ($(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)),) -EARLY_PRINTK_CFG :=3D $(subst $(comma), ,$(EARLY_PRINTK_$(CONFIG_EARLY_PRI= NTK))) -else -EARLY_PRINTK_CFG :=3D $(subst $(comma), ,$(CONFIG_EARLY_PRINTK)) -endif - -# Extract configuration from string -EARLY_PRINTK_INC :=3D $(word 1,$(EARLY_PRINTK_CFG)) -EARLY_UART_BASE_ADDRESS :=3D $(word 2,$(EARLY_PRINTK_CFG)) - -# UART specific options -ifeq ($(EARLY_PRINTK_INC),8250) -EARLY_UART_REG_SHIFT :=3D $(word 3,$(EARLY_PRINTK_CFG)) -endif -ifeq ($(EARLY_PRINTK_INC),pl011) -ifneq ($(word 3,$(EARLY_PRINTK_CFG)),) -EARLY_PRINTK_INIT_UART :=3D y -EARLY_PRINTK_BAUD :=3D $(word 3,$(EARLY_PRINTK_CFG)) -endif -endif -ifeq ($(EARLY_PRINTK_INC),scif) -ifneq ($(word 3,$(EARLY_PRINTK_CFG)),) -CFLAGS-y +=3D -DCONFIG_EARLY_UART_SCIF_VERSION_$(word 3,$(EARLY_PRINTK_CFG= )) -else -CFLAGS-y +=3D -DCONFIG_EARLY_UART_SCIF_VERSION_NONE -endif -endif - -ifneq ($(EARLY_PRINTK_INC),) -override CONFIG_EARLY_PRINTK :=3D y -endif - -CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_PRINTK -CFLAGS-$(EARLY_PRINTK_INIT_UART) +=3D -DCONFIG_EARLY_UART_INIT -CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_PRINTK_INC=3D\"debug-$(E= ARLY_PRINTK_INC).inc\" -CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_UART_BAUD_RATE=3D$(EARLY= _PRINTK_BAUD) -CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_UART_BASE_ADDRESS=3D$(EA= RLY_UART_BASE_ADDRESS) -CFLAGS-$(CONFIG_EARLY_PRINTK) +=3D -DCONFIG_EARLY_UART_8250_REG_SHIFT=3D$(= EARLY_UART_REG_SHIFT) - -else # !CONFIG_DEBUG - -ifneq ($(CONFIG_EARLY_PRINTK),) -# Early printk is dependant on a debug build. -$(error CONFIG_EARLY_PRINTK enabled for non-debug build) -endif - -endif diff --git a/xen/arch/x86/Kconfig.debug b/xen/arch/x86/Kconfig.debug new file mode 100644 index 000000000000..e69de29bb2d1 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel