lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220926220931.3261749-1-elder@linaro.org>
Date:   Mon, 26 Sep 2022 17:09:16 -0500
From:   Alex Elder <elder@...aro.org>
To:     davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com
Cc:     mka@...omium.org, evgreen@...omium.org, andersson@...nel.org,
        quic_cpratapa@...cinc.com, quic_avuyyuru@...cinc.com,
        quic_jponduru@...cinc.com, quic_subashab@...cinc.com,
        elder@...nel.org, netdev@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH net-next 00/15] net: ipa: generalized register definitions

This series is quite a bit bigger than what I normally like to send,
and I apologize for that.  I would like it to get incorporated in
its entirety this week if possible, and splitting up the series
carries a small risk that wouldn't happen.

Each IPA register has a defined offset, and in most cases, a set
of masks that define the width and position of fields within the
register.  Most registers currently use the same offset for all
versions of IPA.  Usually fields within registers are also the same
across many versions.  Offsets and fields like this are defined
using preprocessor constants.

When a register has a different offset for different versions of
IPA, an inline function is used to determine its offset.  And in
places where a field differs between versions, an inline function is
used to determine how a value is encoded within the field, depending
on IPA version.

Starting with IPA version 5.0, the number of IPA endpoints supported
is greater than 32.  As a consequence, *many* IPA register offsets
differ considerably from prior versions.  This increase in endpoints
also requires a lot of field sizes and/or positions to change (such
as those that contain an endpoint ID).

Defining these things with constants is no longer simple, and rather
than fill the code with one-off functions to define offsets and
encode field values, this series puts in place a new way of defining
IPA registers and their fields.  Note that this series creates this
new scheme, but does not add IPA v5.0+ support.

An enumerated type will now define a unique ID for each IPA register.
Each defined register will have a structure that contains its offset
and its name (a printable string).  Each version of IPA will have an
array of these register structures, indexed by register ID.

Some "parameterized" registers are duplicated (this is not new).
For example, each endpoint has an INIT_HDR register, and the offset
of a given endpoint's INIT_HDR register is dependent on the endpoint
number (the parameter).  In such cases, the register's "stride" is
defined as the distance between two of these registers.

If a register contains fields, each field will have a unique ID
that's used as an index into an array of field masks defined for the
register.  The register structure also defines the number of entries
in this field array.

When a register is to be used in code, its register structure will
be fetched using function ipa_reg().  Other functions are then used
to determine the register's offset, or to encode a value into one of
the register's fields, and so on.

Each version of IPA defines the set of registers that are available,
including all fields for these registers.  The array of defined
registers is set up at probe time based on the IPA version, and it
is associated with the main IPA structure.

					-Alex

Alex Elder (15):
  net: ipa: introduce IPA register IDs
  net: ipa: use IPA register IDs to determine offsets
  net: ipa: add per-version IPA register definition files
  net: ipa: use ipa_reg[] array for register offsets
  net: ipa: introduce ipa_reg()
  net: ipa: introduce ipa_reg field masks
  net: ipa: define COMP_CFG IPA register fields
  net: ipa: define CLKON_CFG and ROUTE IPA register fields
  net: ipa: define some more IPA register fields
  net: ipa: define more IPA register fields
  net: ipa: define even more IPA register fields
  net: ipa: define resource group/type IPA register fields
  net: ipa: define some IPA endpoint register fields
  net: ipa: define more IPA endpoint register fields
  net: ipa: define remaining IPA register fields

 drivers/net/ipa/Makefile             |    2 +
 drivers/net/ipa/ipa.h                |    2 +
 drivers/net/ipa/ipa_cmd.c            |    7 +-
 drivers/net/ipa/ipa_endpoint.c       |  378 ++++++----
 drivers/net/ipa/ipa_interrupt.c      |   45 +-
 drivers/net/ipa/ipa_main.c           |  164 +++--
 drivers/net/ipa/ipa_mem.c            |   16 +-
 drivers/net/ipa/ipa_reg.c            |   95 +++
 drivers/net/ipa/ipa_reg.h            | 1011 ++++++++++++--------------
 drivers/net/ipa/ipa_resource.c       |   63 +-
 drivers/net/ipa/ipa_table.c          |   27 +-
 drivers/net/ipa/ipa_uc.c             |    9 +-
 drivers/net/ipa/reg/ipa_reg-v3.1.c   |  478 ++++++++++++
 drivers/net/ipa/reg/ipa_reg-v3.5.1.c |  456 ++++++++++++
 drivers/net/ipa/reg/ipa_reg-v4.11.c  |  512 +++++++++++++
 drivers/net/ipa/reg/ipa_reg-v4.2.c   |  456 ++++++++++++
 drivers/net/ipa/reg/ipa_reg-v4.5.c   |  533 ++++++++++++++
 drivers/net/ipa/reg/ipa_reg-v4.9.c   |  509 +++++++++++++
 18 files changed, 3921 insertions(+), 842 deletions(-)
 create mode 100644 drivers/net/ipa/reg/ipa_reg-v3.1.c
 create mode 100644 drivers/net/ipa/reg/ipa_reg-v3.5.1.c
 create mode 100644 drivers/net/ipa/reg/ipa_reg-v4.11.c
 create mode 100644 drivers/net/ipa/reg/ipa_reg-v4.2.c
 create mode 100644 drivers/net/ipa/reg/ipa_reg-v4.5.c
 create mode 100644 drivers/net/ipa/reg/ipa_reg-v4.9.c

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ