[PATCH v2 6/6] Documentation: coresight: docs for config load via configfs
Mathieu Poirier
mathieu.poirier at linaro.org
Wed Jan 12 10:43:20 PST 2022
[...]
> > +
> > +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
> >
More information about the linux-arm-kernel
mailing list