Re: register x18

From: <tuexen_at_freebsd.org>
Date: Fri, 16 Jul 2021 11:08:55 UTC
> On 16. Jul 2021, at 04:06, Mark Millard <marklmi@yahoo.com> wrote:
> 
> 
> 
> On 2021-Jul-15, at 17:40, Michael Tuexen <tuexen at freebsd.org> wrote:
> 
>> Dear all,
>> 
>> register x18 seems to be special. What is it used for in FreeBSD?
>> 
>> Best regards
>> Michael
> 
> https://developer.arm.com/documentation/den0024/a/The-ABI-for-ARM-64-bit-Architecture/Register-use-in-the-AArch64-Procedure-Call-Standard/Parameters-in-general-purpose-registers
> 
> reports:
> 
> QUOTE
> 	• X18 is the platform register and is reserved for the use of platform ABIs. This is an adional temporary register on platforms that don't assign a special meaning to it.
> END QUOTE
> 
> So, special, yes. But I do not know what the "platform ABI" usage
> for it might be on FreeBSD. So, for the most part, this does not
> well-answer your question. Sorry.
Yepp, I found the above text. However, x18 seems to be used when accessing
global variables. I am looking at a panic, where the system panics on accessing
global variable, which can be controlled by sysctl.
It seems that x18 does not have the expected value, but it is also not set in
the function...

Best regards
Michael


> 
> ===
> Mark Millard
> marklmi at yahoo.com
> ( dsl-only.net went
> away in early 2018-Mar)
>