From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: <srinath.parvathaneni@arm.com>
Cc: <gdb-patches@sourceware.org>, <simark@simark.ca>,
<luis.machado.foss@gmail.com>, <guinevere@redhat.com>,
<Ezra.Sitorus@arm.com>, <Matthieu.Longo@arm.com>,
<peter.maydell@linaro.org>
Subject: Re: [PATCH v4 1/5] gdb/aarch64: Add POR_EL0 register support for FEAT_S1POE
Date: Thu, 10 Sep 2026 22:32:01 +0000 [thread overview]
Message-ID: <87tsnwohzy.fsf@linaro.org> (raw)
In-Reply-To: <87bja5pp2r.fsf@linaro.org> (Thiago Jung Bauermann's message of "Thu, 10 Sep 2026 07:01:32 +0000")
Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
> <srinath.parvathaneni@arm.com> writes:
>
>> Add support for the FEAT_S1POE POR_EL0 register on AArch64.
>>
>> This patch adds POR_EL0 to the AArch64 register set and reads/writes it
>> using the NT_ARM_POE ptrace regset.
>>
>> It also adds POE pseudo-registers por_p0 through por_p15, with each
>> pseudo-register mapping to a 4-bit field in POR_EL0, starting from the
>> least-significant nibble.
>>
>> POR_EL0 and the POE pseudo-registers are added to the "por" register
>> group, allowing them to be displayed together using the
>> "info registers por" command.
>>
>> With this change, POR_EL0 is accessible through:
>>
>> * info registers
>> * info registers por_el0
>> * info registers por
>> * p $por_el0
>> * p/x $por_el0
>> * set $por_el0 = <value>
>>
>> The individual POE fields can also be accessed and modified through
>> $por_p0 to $por_p15.
>>
>> Example:
>> (gdb) info register por_el0
>> por_el0 0x7 [ P0=rwx ]
>> (gdb) set $por_el0=0xffffffff77777777
>> (gdb) info registers por_el0
>> por_el0 0xffffffff77777777 [ P15=??? P14=??? P13=??? P12=???
>> P11=??? P10=??? P9=??? P8=???
>> P7=rwx P6=rwx P5=rwx P4=rwx
>> P3=rwx P2=rwx P1=rwx P0=rwx ]
>> (gdb) info registers por
>> por_el0 0xffffffff77777777 [ P15=??? P14=??? P13=??? P12=???
>> P11=??? P10=??? P9=??? P8=???
>> P7=rwx P6=rwx P5=rwx P4=rwx
>> P3=rwx P2=rwx P1=rwx P0=rwx ]
>> por_p0 0x7 rwx
>> por_p1 0x7 rwx
>> por_p2 0x7 rwx
>> por_p3 0x7 rwx
>> por_p4 0x7 rwx
>> por_p5 0x7 rwx
>> por_p6 0x7 rwx
>> por_p7 0x7 rwx
>> por_p8 0xf ???
>> por_p9 0xf ???
>> por_p10 0xf ???
>> por_p11 0xf ???
>> por_p12 0xf ???
>> por_p13 0xf ???
>> por_p14 0xf ???
>> por_p15 0xf ???
>>
>> Individual POE pseudo-registers can be written independently, with the
>> corresponding 4-bit field in POR_EL0 updated accordingly. For example:
>>
>> (gdb) set $por_el0=0x7
>> (gdb) info registers por_el0
>> por_el0 0x0000000000000007 [ P0=rwx ]
>> (gdb) set $por_p1=0x7
>> (gdb) info registers por_el0
>> por_el0 0x0000000000000077 [ P1=rwx P0=rwx ]
>
> I like this output and the pseudo registers. Thanks!
One more thing that I remembered today:
Considering that the print command doesn't show the "pretty" output:
(gdb) p $por_el0
$1 = 21474836487
(gdb) p/x $por_el0
$2 = 0x500000007
(gdb) p $por_p8
$3 = 5
It would be useful to add a new "Permission Overlay Extension" section
in the GDB manual (under Configurations → Architectures → AArch64)
mentioning the use of the "info registers" command to get the fancier
output, the poe register group and setting/getting individual fields
with the pseudo-registers.
--
Thiago
(he/him)
next prev parent reply other threads:[~2026-09-10 22:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 9:12 [PATCH v4 0/5] " srinath.parvathaneni
2026-09-01 9:12 ` [PATCH v4 1/5] " srinath.parvathaneni
2026-09-10 7:01 ` Thiago Jung Bauermann
2026-09-10 22:32 ` Thiago Jung Bauermann [this message]
2026-09-12 21:43 ` Luis
2026-09-01 9:12 ` [PATCH v4 2/5] gdb: Improve SIGSEGV diagnostics for POE faults srinath.parvathaneni
2026-09-01 9:12 ` [PATCH v4 3/5] gdbserver/aarch64: Add POR_EL0 register support srinath.parvathaneni
2026-09-01 9:12 ` [PATCH v4 4/5] gdb/aarch64: Add core file and signal frame support for FEAT_S1POE srinath.parvathaneni
2026-09-10 7:02 ` Thiago Jung Bauermann
2026-09-01 9:12 ` [PATCH v4 5/5] gdb/testsuite: Add FEAT_S1POE testcases srinath.parvathaneni
2026-09-10 7:13 ` Thiago Jung Bauermann
2026-09-07 12:52 ` [PATCH v4 0/5] gdb/aarch64: Add POR_EL0 register support for FEAT_S1POE Srinath Parvathaneni
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=87tsnwohzy.fsf@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=Ezra.Sitorus@arm.com \
--cc=Matthieu.Longo@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=guinevere@redhat.com \
--cc=luis.machado.foss@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=simark@simark.ca \
--cc=srinath.parvathaneni@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox