From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76154C433EF for ; Wed, 12 Jan 2022 18:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HRErsieMv0txOfC3RVck4oybWFCxUuqgJ3+yVi4FnVc=; b=Ch7LXb+Me5or7x GaG8yscldkbZd4nvpS7jxVEvh/TMhuRfAgwfsxUbIBfT31SJqtHBm0grrCEJq51zFw5SayMRXxSRA vFQBp8L6UfEkIwvyOw+Hu6MqcgzMmQFxwOa1gu+cVrxVwkpAfs6ULEE1iNKaaSuFxSNVcs8ZXD7J/ sUtTbZJTb4Q1Q0bv1LWZm2O/PZw76QuguZfC/emIeZY29ZLe8Xi3fgs8cU1MTzVeS0PUoQtTHE8Sv pEIJuOHRh5DjOlq/FmKjGbPRCi2LL2hz6FnjuRhdND6L4xGwkAalvv527kmviHq5562sq4JnFOzM0 JPBwfoN/oD0+A0egBx+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7iau-003V1L-1w; Wed, 12 Jan 2022 18:43:36 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7iaq-003V07-Ou for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 18:43:34 +0000 Received: by mail-pl1-x62e.google.com with SMTP id t18so5194818plg.9 for ; Wed, 12 Jan 2022 10:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hFflxSVwZe067Ue1hNnMihB1yRjX/msAXSF2hBBtVKo=; b=wCgh8Aba6L9x2hnT5citmtUcETC+ScTuMLpzuLVsnpVEQojJVwBE9B25b4iy3/CBla 7EF9pTbPPvi/VuwnNmXd+Eu8ncpHPtAC9u7s/8X9drhJ/g+V9DkyM9m6/T2CZrIKIISs FbJ4A0bvzn4fOqeVVWv5uEiEwqMqXJixoOoDZz5j0aap0klqwYwe+GqDd4HhoEnAs3YG y7Nmb14Yn1uF1gwuXnTF6zLRr3d6mbxt+MnlUp/ZoBAEbPjz+/JjmzSQBRUlXxgTGtO4 i7Nkt4IOywowUG7Y6oy4vsrGARm0GPw5++5kxKnuzK/1DgbXoerRxqiH7bjYtnuyQFAJ NKxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hFflxSVwZe067Ue1hNnMihB1yRjX/msAXSF2hBBtVKo=; b=3sHX6896BxTMFxi1z9b8Jqovv+msgevPkn9rk5oPlX+3ZqSk2iFFRNgecvwDN8a7qI uJItiK66LYCemo2SQOe9l2EBjCn7g4Fm6i9taxYHTIoPqgxo0JJkaWsRMEe0ibQeMUcy QYZSFc8nK4szbAUf1Mfz7BvW++XGu/ff9hnganI4I7JcsYzuxUAafwttbQAIRLVFFGZw X/ztEWfRnt0ILjVuA1B5Qsn/FHhPp/ubgvz0u/lBY0God5kSR8n7KYx1YGoov71abhic PYfd8pgw8qj8Lt9kaOg+pV6yiSHmtLGpYaWwumQOFu4HHfEkVg+5Y+vNb/xmmiKAroi8 CLhg== X-Gm-Message-State: AOAM533B46FNq89kzNC4W658W9Ap1zKh5z4i+za5r3Zq6mrZ2uTmVNyp 9EQqL7sCZ9aRbz0oh09OAl1RfA== X-Google-Smtp-Source: ABdhPJzi1RUJGi/mHv+Rvc9VK5GjKJuLjKeMmSpVtG1LjErocSpSTlI8mbKU4/jINZpkNVmxsxWyzw== X-Received: by 2002:a63:6bc3:: with SMTP id g186mr858915pgc.192.1642013004489; Wed, 12 Jan 2022 10:43:24 -0800 (PST) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id gf13sm398721pjb.13.2022.01.12.10.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 10:43:22 -0800 (PST) Date: Wed, 12 Jan 2022 11:43:20 -0700 From: Mathieu Poirier To: Mike Leach Cc: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, suzuki.poulose@arm.com, leo.yan@linaro.org Subject: Re: [PATCH v2 6/6] Documentation: coresight: docs for config load via configfs Message-ID: <20220112184320.GB892261@p14s> References: <20211130220100.25888-1-mike.leach@linaro.org> <20211130220100.25888-7-mike.leach@linaro.org> <20220112172249.GA892261@p14s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220112172249.GA892261@p14s> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220112_104332_869688_92CC7913 X-CRM114-Status: GOOD ( 17.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [...] > > + > > +CONFIG_ELEM element > > +~~~~~~~~~~~~~~~~~~~ > > + > > +:: > > + > > + [cscfg_file_elem_header] // header length value to end of feature strings. > > + [cscfg_file_elem_str] // name of the configuration. > > + [cscfg_file_elem_str] // description of configuration. > > + [u16 value](nr_presets) // number of defined presets. > > + [u32 value](nr_total_params) // total parameters defined by all used features. > > + [u16 value](nr_feat_refs) // number of features referenced by the configuration > > + [u64 values] * (nr_presets * nr_total_params) // the preset values. > > + [cscfg_file_elem_str] * (nr_feat_refs) // the features used in the configurations. > > There seems to be a discrepency between the above format and the afdo3 structure > definition in sample file coresight-cfg-filegen.c. > Void that comment - the above and the struct cscfg_config_desc don't have a 1:1 mapping. > More comments to come... > > Thanks, > Mathieu > > > + > > +FEATURE_ELEM element > > +~~~~~~~~~~~~~~~~~~~~ > > + > > +:: > > + > > + [cscfg_file_elem_header] // header length is total bytes to end of param structures. > > + [cscfg_file_elem_str] // feature name. > > + [cscfg_file_elem_str] // feature description. > > + [u32 value](match_flags) // flags to associate the feature with a device. > > + [u16 value](nr_regs) // number of registers. > > + [u16 value](nr_params) // number of parameters. > > + [cscfg_regval_desc struct] * (nr_regs) // register definitions > > + [PARAM_ELEM] * (nr_params) // parameters definitions > > + > > +PARAM_ELEM element > > +~~~~~~~~~~~~~~~~~~ > > + > > +:: > > + > > + [cscfg_file_elem_str] // parameter name. > > + [u64 value](param_value] // initial value. > > + > > +Additional definitions. > > +~~~~~~~~~~~~~~~~~~~~~~~ > > + > > +The following structures are defined in **coresight-config-file.h** > > + > > + * **struct cscfg_file_header** : This structure contains an initial magic number, the total > > + length of the file, and the number of features in the file. > > + * **struct cscfg_file_elem_header**: This defines the total length and type of a CONFIG_ELEM > > + or a FEATURE_ELEM. > > + * **struct cscfg_file_elem_str**: This defines a string and its length. > > + > > +The magic number in cscfg_file_header is defined as two bitfields:: > > + > > + [31:8] Fixed magic number to identify file type. > > + [7:0] Current file format version. > > + > > +The following defines determine the maximum overall file size and maximum individual > > +string size:: > > + > > + CSCFG_FILE_MAXSIZE // maximum overall file size. > > + CSCFG_FILE_STR_MAXSIZE // maximum individual string size. > > -- > > 2.17.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel