All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] arm64: Add basic JSON register parser
Date: Fri, 27 Dec 2024 17:47:37 +0000	[thread overview]
Message-ID: <878qs1ow5i.wl-maz@kernel.org> (raw)
In-Reply-To: <20241225185711.582648-1-maz@kernel.org>

On Wed, 25 Dec 2024 18:57:11 +0000,
Marc Zyngier <maz@kernel.org> wrote:
> 
> We currently populate the sysreg file by hand from the ARM ARM,
> resulting in a bunch of errors being introduced on a regular basis.
> While there is an XML dump of the architecture produced on a quarterly
> basis, the license that comes attached to it excludes any sort of
> open-source usage.
> 
> However, ARM has recently made available a JSON dump[1] that contains
> a reduced set of information under a BSD license. This has enough
> data to extract what is relevant to the sysreg file.
> 
> This is achieved using a JQ script that I cobbled together over
> the holiday, and while it has a number of limitations, it already
> works well enough to extract useful data.
> 
> As an example, here's what the script returns for TCR_EL1:
> 
> $ jq -r --arg REG TCR_EL1 -f arch/arm64/tools/dumpreg.jq ~/Work/XML/2024-12/AARCHMRS_BSD_A_profile/Registers.json
> TCR_EL1	[3,0,0,2,2]	MRS
> TCR_EL1	[3,0,0,2,2]	MSRregister
> TCR_EL12	[3,5,0,2,2]	MRS
> TCR_EL12	[3,5,0,2,2]	MSRregister
> TCRALIAS_EL1	[3,0,7,2,6]	MRS
> TCRALIAS_EL1	[3,0,7,2,6]	MSRregister

The eagle-eyed reviewers will have certainly noticed that the
encodings have a couple of fields swapped. I've since fixed this
locally, together with a bunch of other issues. I'll post v2 in the
new year.

For those interested in the current of affairs, I've pushed out a
branch at [1].

	M.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=arm64/dumpreg.

-- 
Without deviation from the norm, progress is not possible.


      reply	other threads:[~2024-12-27 17:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-25 18:57 [PATCH] arm64: Add basic JSON register parser Marc Zyngier
2024-12-27 17:47 ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878qs1ow5i.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.