From patchwork Mon Oct 26 21:03:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1388107 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=wDa4wlBT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=Kr3yJyiB; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CKnPc3ggsz9sTq for ; Tue, 27 Oct 2020 08:03:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HkIAhZtwcMtAk+XqwyADcbKhOEfdjvQVh0MvZid41jk=; b=wDa4wlBTqbrqFBHW6WA4/gd3P lSrUkChlthX9oq8ckQ2ZfgHm0kS8Sw1sK4zJ6ewcvEhfT9QtNAFPjyVyX/RailNKbv7gnkzrpwN2R HOCEERuF1PrcJYvrsnEIhbShnpkj+SK0qc7I0jjzb61UktkYPMnFft7IvHGLX+Dk7RQ953sAOUZ3o yulVbiL0qRbkowjN5Ow+F9EyKoZEhKPISpHl6yAYTgKfxN2axp9FkeWT6gfkaw+ZxVBQM26HdUHmN x7w1g3WLPLoFokpvTii8f4JkxPFZbDVAqro+PEJgmahC+zYHixpv4iNSEm9wyJyBBi2jOt4ZKeEnH LFbwlyfBA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX9eZ-0007Ss-JG; Mon, 26 Oct 2020 21:03:43 +0000 Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX9eW-0007RP-CU for opensbi@lists.infradead.org; Mon, 26 Oct 2020 21:03:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1603746220; x=1635282220; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EOYakDo7ahv0GUBAIU0tN3Tm2VJx10p/+tJzuTEuvmM=; b=Kr3yJyiBWuRhFHRRBNtYiQSTIn3i94AOOopPbwTiYrjpwGDP9+4uhcxp 2UnHpqEHskVSdUaB/QUmq40eswbBgif0NZiGEcRUMePRPpEH9siu+5iCW 6u8U5ji0zIBKjKBfqbPp2g/dsl2/A6N8T2fKFxzFjQURwPAZ/O4JbNkr7 Q9hQUmy05u0Ra1iN+kH31quvNbLmDcZYwFN4B1yQxED93enpTrLcIxWfI mn6G2/N0HkUfoOgvhtWKeVelrjgQ+3l+6Qu2mvXy9QJFiUvkJ02W7+cbW B2zrewTr091kOJzcR5+50vD6cS3TUYKJhdMOvYzxBl/avBVdyJ9wyyave Q==; IronPort-SDR: +g6LxPp0N2K2TnaGjVFr4kDxPRqP9DEmqGe/4XkhZhDrd6iZg9ahRci5zEG2EXiYv+JXL8je6M aUXNrP0H77/Avq0u6ipy1+Jtznh+DPIpDuSW1YziNnUvjijpE+vYInf60j7urZUzdO+osFioI6 8jmj5O2kncN51vKU1O7hvFoolWpJialWewI799Mv3RYvgXbk/6LthwlfGZ/9F1KPuDmMHUBaRq LLXglHZMBpcPrN0avFgBw7R08WbXBk4/4wfk1wip6UeTO/gDq7SYQoPIm1+oZrUr8F0SLusnCH 5SY= X-IronPort-AV: E=Sophos;i="5.77,421,1596470400"; d="scan'208";a="151002402" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 27 Oct 2020 05:03:36 +0800 IronPort-SDR: A85ptd6xuyudGQTjrzU1i5rxyMY7r44BZa3pga/K/lRUoIwvJ/dMX+zYu8Fw6xKEOSb2hZxhaP 0R3tR39drUPkKB3LfAsMtOZgxXQkSXrwZ4y8OrXREqC3tS+P7RGANERBzrL5GIpbxJCTC9jCG7 NF4UiUdaeqFvHM1j+1SKwla89kBK/JAmj2HKjx/b5PznzANG4qC9FeEALc3EnpSZAYmeQD0t2g VIiDEtu7lW48S17M1rO4z5wYWZlPrydLiy1uPjcNx0926sHBDl47M4xlPK1TbSU3IRcT+Sb55R nRgBtq8twBrxOv+7m7Ggw+la Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 13:48:47 -0700 IronPort-SDR: iWT4ETXAOim1f+NvFP0x8P/Pi+U8mWbbWk/Gd7mY16CTsXJ35wnK/KCNW8JJ1/RPJJ1kzFPGlc DEntJdppAu3hORAymzBcO0Qi/y2Dj5hG8X9DNN32olefKDdVAFnGnYENQMiw5loYNRPYZMpecP +tGVYT8eiD98Jy0s+5AVhO/ovwR78Q1TfFV/l3PBJS8PPa3HKqGQ+k2R8GN6pB8aXMxVFQjY6B +SuWgpmD6o9mApE/Y3CNN4eZht7TOU5o4SQFdhUIFUhUYYFipSJ5JdkCYoIjK1bNbTcpVKe06D vXE= WDCIronportException: Internal Received: from 8223p12.ad.shared (HELO jedi-01.hgst.com) ([10.86.60.110]) by uls-op-cesaip01.wdc.com with ESMTP; 26 Oct 2020 14:03:37 -0700 From: Atish Patra To: opensbi@lists.infradead.org Subject: [PATCH v4 2/2] lib: sbi: Improve boot time print with additional PMP information Date: Mon, 26 Oct 2020 14:03:34 -0700 Message-Id: <20201026210334.782098-3-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026210334.782098-1-atish.patra@wdc.com> References: <20201026210334.782098-1-atish.patra@wdc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_170340_588597_B1656518 X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.153.144 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Atish Patra , Anup Patel Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We know about pmp granularity and number of bits supported by PMP. Show those information in the boot time info print Signed-off-by: Atish Patra Reviewed-by: Anup Patel --- lib/sbi/sbi_init.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index 318163602e4a..f9a88ec8e6a6 100644 --- a/lib/sbi/sbi_init.c +++ b/lib/sbi/sbi_init.c @@ -79,14 +79,17 @@ static void sbi_boot_prints(struct sbi_scratch *scratch, u32 hartid) sbi_domain_dump_all(""); /* Boot HART details */ - sbi_printf("Boot HART ID : %u\n", hartid); - sbi_printf("Boot HART Domain : %s\n", dom->name); + sbi_printf("Boot HART ID : %u\n", hartid); + sbi_printf("Boot HART Domain : %s\n", dom->name); misa_string(xlen, str, sizeof(str)); - sbi_printf("Boot HART ISA : %s\n", str); + sbi_printf("Boot HART ISA : %s\n", str); sbi_hart_get_features_str(scratch, str, sizeof(str)); - sbi_printf("Boot HART Features : %s\n", str); - sbi_printf("Boot HART PMP Count : %d\n", sbi_hart_pmp_count(scratch)); - sbi_printf("Boot HART MHPM Count: %d\n", sbi_hart_mhpm_count(scratch)); + sbi_printf("Boot HART Features : %s\n", str); + sbi_printf("Boot HART PMP Count : %d\n", sbi_hart_pmp_count(scratch)); + sbi_printf("Boot HART PMP Granularity : %lu\n", sbi_hart_pmp_granularity(scratch)); + sbi_printf("Boot HART PMP Address bits: %d\n", sbi_hart_pmp_addrbits(scratch)); + sbi_printf("Boot HART MHPM Count : %d\n", sbi_hart_mhpm_count(scratch)); + sbi_printf("Boot HART MHPM Count : %d\n", sbi_hart_mhpm_count(scratch)); sbi_hart_delegation_dump(scratch, "Boot HART ", " "); }