Date: Fri, 16 Jul 2021 14:51:33 +0200 From: Andrew Turner <andrew@fubar.geek.nz> To: tuexen@freebsd.org Cc: Mark Millard <marklmi@yahoo.com>, freebsd-arm@freebsd.org Subject: Re: register x18 Message-ID: <ACD1D84A-5923-4106-AAE4-35FB7A182B0F@fubar.geek.nz> In-Reply-To: <32C24DDC-C8A1-43CD-9220-8009B229E452@freebsd.org> References: <86EC9C12-F90C-4D0C-BFA3-41986C9F07B5@freebsd.org> <BFF3BCE7-3387-4A7C-A71C-890223CDDF18@yahoo.com> <32C24DDC-C8A1-43CD-9220-8009B229E452@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_E2948D8D-109E-4D83-852B-ACC868B1F99C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 16 Jul 2021, at 13:08, tuexen@freebsd.org wrote: >=20 >> On 16. Jul 2021, at 04:06, Mark Millard <marklmi@yahoo.com = <mailto:marklmi@yahoo.com>> wrote: >>=20 >>=20 >>=20 >> On 2021-Jul-15, at 17:40, Michael Tuexen <tuexen at freebsd.org> = wrote: >>=20 >>> Dear all, >>>=20 >>> register x18 seems to be special. What is it used for in FreeBSD? >>>=20 >>> Best regards >>> Michael >>=20 >> = https://developer.arm.com/documentation/den0024/a/The-ABI-for-ARM-64-bit-A= rchitecture/Register-use-in-the-AArch64-Procedure-Call-Standard/Parameters= -in-general-purpose-registers >>=20 >> reports: >>=20 >> QUOTE >> =E2=80=A2 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 >>=20 >> 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... X18 is used to store the pointer to the pcpu data It should only ever be = set when we enter the kernel from userland by the exception handler. Andrew= --Apple-Mail=_E2948D8D-109E-4D83-852B-ACC868B1F99C--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ACD1D84A-5923-4106-AAE4-35FB7A182B0F>