Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB901C04AA5 for ; Thu, 25 Aug 2022 09:04:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5FE2E845C8; Thu, 25 Aug 2022 11:04:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com 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=amd.com header.i=@amd.com header.b="nXASkfwy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF46184860; Thu, 25 Aug 2022 11:04:48 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2047.outbound.protection.outlook.com [40.107.92.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FAF5841AB for ; Thu, 25 Aug 2022 11:04:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZNfKSNiqnHx3v462w1RZqE3Z0YW133z5eeZJrzsbNA+CxBBmConxTrU1mgMw4ZGez0vaDdOPxa3zOjX4GTt532mdrnvyGY+gnlrXU3uzV7ks4rPhYvJYRHCU59VisIDSGtoq6wJasn7bTXX4dsWBrVz4AdnEpjWyK3WlQ0v3sNNZ8LNdPY//ljRNaAhGZWsi4p+54ZTSSFaicq4p+YwzCJMJgw2NG63ZLgBKZrbsc1mbJkk3kEnBQLw6XcvONP5gMwhfOD1U4RtklESWEdHV7JVlkhTo7c24+xo0en8L8myS8gU+7DFnvmvQCGN84Hb4NOESLL5Ki0UXxUi5qlLDQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Mkb9gxk12krPD9Y4HoYS4XR2pYyEwM3C1SBT3i1b2+U=; b=F7yMenQAOPaJ5Dq1N6gipSF2phURkExT3lwZbSyaCduTE9MzvzuOCQ2t2rxG31DZdtzOpzNdE9FSLVkwk11DSkXvivvEJj5bZSx0UvW2N/clii8Lo+WfT6RvdBH5wQc3tF8+ixyB91D1qGYEnPV3KzB0YxB2dbyOkFclKAHmXIDfy1iFIy+J8VDwplBQl6Igl67b/DLafBOFuOmk8ZW1LJbPMxbhDFGMSP/XO0s7+nExbAsRUj+opw2U/38dzHJzVN3av2H5IwXEHGsoCi3LRGWkWJL3yK+YcRsh+jmw9dku7ZdQbBqaisJ7zC/GbZTk/tQQqCc2Ke5NjG+1VXm7lw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mkb9gxk12krPD9Y4HoYS4XR2pYyEwM3C1SBT3i1b2+U=; b=nXASkfwy4+G7d9IFL3ghQgErnfnIluKa18w1Intw0zQ62N2ujYvphEMFaSmsyof1wPJT/hX3YWvhLFOb+EvHsJbsYzrDop0tb3F/TGTCiRnk49Kd0EnYmBIMM+x8P/rlG3PI1h3f9GcXVJ5IjcfH5i1eKu9+1acXohPdUeI4tqY= Received: from DS7PR03CA0325.namprd03.prod.outlook.com (2603:10b6:8:2b::34) by DM6PR12MB2665.namprd12.prod.outlook.com (2603:10b6:5:41::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Thu, 25 Aug 2022 09:04:42 +0000 Received: from DM6NAM11FT005.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2b:cafe::cf) by DS7PR03CA0325.outlook.office365.com (2603:10b6:8:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15 via Frontend Transport; Thu, 25 Aug 2022 09:04:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT005.mail.protection.outlook.com (10.13.172.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5566.15 via Frontend Transport; Thu, 25 Aug 2022 09:04:42 +0000 Received: from [10.254.241.52] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 25 Aug 2022 04:04:38 -0500 Message-ID: <8f2bb95e-caf2-91e6-ea5a-5bf2170c6d45@amd.com> Date: Thu, 25 Aug 2022 11:04:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH 4/4] microblaze: add arch_print_bdinfo() implementation Content-Language: en-US To: Ovidiu Panait , CC: Michal Simek References: <20220825064131.673958-1-ovpanait@gmail.com> <20220825064131.673958-4-ovpanait@gmail.com> From: Michal Simek In-Reply-To: <20220825064131.673958-4-ovpanait@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c3fa058-8c97-4dbc-9e6f-08da8678d959 X-MS-TrafficTypeDiagnostic: DM6PR12MB2665:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JqG4S5yOdImGn/H25/iFeCvPHbRfvG9Ue2VcbdGm0EQD8zlZJzpE656SYdUTUnMoh2feocPk4cjVYUkVK2qxS/3P1Fb6+1ef1pun/xrG8VoDPnnQsn4IZIPK9h7Ol8NHqUeb8Ynw/KWtb9qJwoU/uUkYV9tW7ClUXZMV7DKonbbBbYmWSJQJQgPTvgPQ1pmi9uuAcGey7uYPafYCIJ8hdnCP92Fjc1VohY5/s+KjCuWsOCSRApF3d8KR9M5kigNUWpzMFfSNkd9pJH9Eic1wQz4W3ZiP76jHaAnUc063FTSfvQq9mRGQOC4IKbX/OHmN0EnoAEJnCfNAJXv4DUc36sqLUr6PYhLPt+juEBS9soUhKP9XGLHsRyiekJqz2qvXiP4sY53syG28MFEEcp+kgP+D620gFOuBzc2/UzuJGZz7pTMseXdin86rSe7cQfBDu6Pa6GjKDOFrWilPeYB3NOOFVLoRy+F3gksa6d2eKMak0lgeFe6U4GoT77hAVZ6APh0oyubUJ8Gjb9eYYK7OXDsJckKK63d+qzMjjKhKQ3dllzjYd4+xI1cwHPoVcjSsZuF2M9SFF4QDLmij442t727OwmVTWJ4nglDyiOWqcAcJ2OJjpTtS3YhYQOO4RIfsARsYuZsCoVxOHFGhxJbAjxzc+8/S98+taAXqGe7OPebdsESDTmF+LPIdYHfDaHQXYmbz8vvTu87dHnZBmokH+imO45S7r8rMpD6/z2SRzYplhcVXFSoZsCplFFXfiwudUZiJpjiSgJzuAk5XYSwlj/7AzZpo6MBazhoXLEQLcnUpuMYrOdLDW7OqNnLDibOsxftwPoj5LfOCchYkS0Sm6w== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(396003)(376002)(136003)(346002)(39860400002)(36840700001)(46966006)(40470700004)(70586007)(2616005)(70206006)(186003)(53546011)(86362001)(40460700003)(426003)(83380400001)(47076005)(110136005)(16526019)(36756003)(336012)(316002)(8676002)(36860700001)(40480700001)(4326008)(16576012)(31696002)(5660300002)(44832011)(8936002)(82740400003)(26005)(82310400005)(478600001)(2906002)(41300700001)(356005)(31686004)(81166007)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2022 09:04:42.5979 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c3fa058-8c97-4dbc-9e6f-08da8678d959 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT005.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2665 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 On 8/25/22 08:41, Ovidiu Panait wrote: > Allow bdinfo command to print icache/dcache information: > U-Boot-mONStR> bdinfo > boot_params = 0x00000000 > DRAM bank = 0x00000000 > -> start = 0x04000000 > -> size = 0x04000000 > flashstart = 0x00000000 > flashsize = 0x00000000 > flashoffset = 0x00000000 > baudrate = 9600 bps > relocaddr = 0x07f76000 > reloc off = 0x02f76000 > Build = 32-bit > current eth = unknown > ethaddr = (not set) > IP addr = > fdt_blob = 0x07fec7e0 > new_fdt = 0x00000000 > fdt_size = 0x00000000 > lmb_dump_all: > memory.cnt = 0x1 > memory[0] [0x4000000-0x7ffffff], 0x04000000 bytes flags: 0 > reserved.cnt = 0x1 > reserved[0] [0x7e94b8c-0x7ffffff], 0x0016b474 bytes flags: 0 > devicetree = embed > icache = 32 KiB > icache line = 4 Bytes > dcache = 32 KiB > dcache line = 4 Bytes > > Signed-off-by: Ovidiu Panait > --- > > arch/microblaze/lib/Makefile | 1 + > arch/microblaze/lib/bdinfo.c | 24 ++++++++++++++++++++++++ > 2 files changed, 25 insertions(+) > create mode 100644 arch/microblaze/lib/bdinfo.c > > diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile > index 05f447abba..dfd8135f4f 100644 > --- a/arch/microblaze/lib/Makefile > +++ b/arch/microblaze/lib/Makefile > @@ -4,4 +4,5 @@ > # Wolfgang Denk, DENX Software Engineering, wd@denx.de. > > obj-$(CONFIG_CMD_BOOTM) += bootm.o > +obj-$(CONFIG_CMD_BDI) += bdinfo.o > obj-y += muldi3.o > diff --git a/arch/microblaze/lib/bdinfo.c b/arch/microblaze/lib/bdinfo.c > new file mode 100644 > index 0000000000..41b7a216a4 > --- /dev/null > +++ b/arch/microblaze/lib/bdinfo.c > @@ -0,0 +1,24 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright (C) 2022, Ovidiu Panait > + */ > +#include > +#include > +#include > + > +DECLARE_GLOBAL_DATA_PTR; remove this line. You are not using gd in this function. > + > +void arch_print_bdinfo(void) > +{ > + struct microblaze_cpuinfo *ci = gd_cpuinfo(); > + > + if (ci->icache_size) { > + bdinfo_print_size("icache", ci->icache_size); > + bdinfo_print_size("icache line", ci->icache_line_length); > + } > + > + if (ci->dcache_size) { > + bdinfo_print_size("dcache", ci->dcache_size); > + bdinfo_print_size("dcache line", ci->dcache_line_length); > + } > +} The rest looks good to me. M