From patchwork Mon Feb 20 19:49:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1745232 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=eyKdnVIx; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PLCjy0WkNz23j7 for ; Tue, 21 Feb 2023 06:52:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 50CFC85A22; Mon, 20 Feb 2023 20:50:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eyKdnVIx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9FB4185936; Mon, 20 Feb 2023 20:50:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B686485942 for ; Mon, 20 Feb 2023 20:49:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id c4so813516ilr.13 for ; Mon, 20 Feb 2023 11:49:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CBPIVxWqFJzIwOyCnAk9VttjZOxr2e1v3thKRpWlRVQ=; b=eyKdnVIx40jQ7RVsW+18vFIVQO/ORTZOlPCWCeZ+SvcgcFiplMY+yALxvG8SKj3W25 IEfLR2tGLx4AsS/dDV9x2F4NdB+ArPDC+iJzreK/k6Q0S60Hwvxvnjvkr2armip7vW0J yoxUwcZEMIr17BUM6O5t+awDDWRTBh+FstK7c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CBPIVxWqFJzIwOyCnAk9VttjZOxr2e1v3thKRpWlRVQ=; b=nMr2fGmuogQ3M9reXFkLIOQisa+hOC6cm+lKRD2nIRwkP73lNnl9Y1Le7YZK1884cs sc3rnMgWYLzs0woJfCsi7x4M4x/qXvy9pSu7+OMEBkCXHIvtn/kLYB4p663HNDCsS/zu i51WHSMF6ortpUjapi1RvqjeoE2+GW/XZaKoWlbE7PIaCP81LJTPiiOyjQidw6vTF4q6 27h/pmyH+EGiw55R2ZwSngd/hy7WzeM6JUw7Bw1jfktIXVsapvNWOJMp8g+hCRi0a35o EFRVKs/6EMyibzAu0dIu+sYPGLA6B4jOOTOID9SWtohpQ05bSoykz1GUWDVUteMSlY2V VnEQ== X-Gm-Message-State: AO0yUKUMg8QP8ZKB7iZla0VOG7Qj225VXcUHoPZEnBGl9PMxCEr6j4sL /a+YDdclfAZs3Ucyo8blYmPX7MH8YwYZOPgv X-Google-Smtp-Source: AK7set8ED68p4fCDxrm5++I7aP6do0yk2TiS+NhjOW9xIz/NWmUNwcPqDDS0+4arj1MDS14+PzRDVw== X-Received: by 2002:a92:9507:0:b0:315:49dd:59b6 with SMTP id y7-20020a929507000000b0031549dd59b6mr2293280ilh.2.1676922586153; Mon, 20 Feb 2023 11:49:46 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:9f65:93e2:a4c7:ed10]) by smtp.gmail.com with ESMTPSA id e7-20020a056638020700b003c4ec576030sm587521jaq.4.2023.02.20.11.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 11:49:45 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass Subject: [PATCH 10/13] x86: coreboot: Document how to enable the debug UART Date: Mon, 20 Feb 2023 12:49:24 -0700 Message-Id: <20230220194927.476708-11-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230220194927.476708-1-sjg@chromium.org> References: <20230220194927.476708-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This is not obvious so add a little note about how it works. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- doc/board/coreboot/coreboot.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/board/coreboot/coreboot.rst b/doc/board/coreboot/coreboot.rst index 4a5f101cad2..0fe95af56d2 100644 --- a/doc/board/coreboot/coreboot.rst +++ b/doc/board/coreboot/coreboot.rst @@ -71,3 +71,32 @@ Memory map (typically redirects to 7ab10030 or similar) 500 Location of coreboot sysinfo table, used during startup ========== ================================================================== + + +Debug UART +---------- + +It is possible to enable the debug UART with coreboot. To do this, use the +info from the cbsysinfo command to locate the UART base. For example:: + + => cbsysinfo + ... + Serial I/O port: 00000000 + base : 00000000 + pointer : 767b51bc + type : 2 + base : fe03e000 + baud : 0d115200 + regwidth : 4 + input_hz : 0d1843200 + PCI addr : 00000010 + ... + +Here you can see that the UART base is fe03e000, regwidth is 4 (1 << 2) and the +input clock is 1843200. So you can add the following CONFIG options:: + + CONFIG_DEBUG_UART=y + CONFIG_DEBUG_UART_BASE=fe03e000 + CONFIG_DEBUG_UART_CLOCK=1843200 + CONFIG_DEBUG_UART_SHIFT=2 + CONFIG_DEBUG_UART_ANNOUNCE=y