From nobody Fri Jul 16 12:51:33 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3F627127D68E for ; Fri, 16 Jul 2021 12:52:12 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 4GRB300Vhtz3LNB; Fri, 16 Jul 2021 12:52:11 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [192.168.1.66] (67.red-83-54-23.dynamicip.rima-tde.net [83.54.23.67]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 9AFDB4E729; Fri, 16 Jul 2021 12:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; s=mail; t=1626439895; bh=9bvieHEsz5FWVgK/+atmXlPZubyDizWWwuZL/d7w1eI=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=ulAWqpLJ6PlmEmFjCbq3GPewBT4nr8fc+oGLqf2cc4zxdy13vHsAJe1SKeKaoQrwq RTlRbMNRY2yURsxKAMPpPVJbJJuXR1iuuH8QfQd3oP5fATg/X3RjnoSR0Py3GsMNT4 VpXLQ3RMvi4HvGMZ/dsOtR0lMRuONTrGsV9W3SA45oCT1N9sQ2CPPg4u1lOgSN33D1 rdBiGs9kQxi7jBdEZaRZIxneWczSab4NVsGSMmC+mO/7UPJ05xspSLjeHvNocZ46et f4KWJtvndGGjwcU2wHNecRHPyHdOhXYxkp75OmJJ4fXzZme5bEIKot53C7kQBLok97 RxsHWQSTPkUmfl9028ypXYXMZ7P7AnwGGpmHEB3NOgzTIb5fgBmcSlKKmbAzL9GIjW me1bMjJeYtvvMCCF+BJDeDQnPO66tVS4VMi4olWO8R6dfGWpyE81WxfeNj1w2yPZUU boEqifZxAjN+m1iLrwDTReAe9lN7Uc//9gm6famMcCnPz0/yNQPALbN9Q9WK307nSX SzeNHj1lgOS1W1QRSSqfsMltR7Ux7vT7xj66OzvjCCG3o5nAdeO2ozfRV/LPXjLVMy DvOuamYGUH94hHz23EMHK7rQqwRu1lPQx3uYBnZ9YAzBFGxd28X/Q0IEcSKcgX4IrW V8126QHU4gVtc9PJE8O/ODrA= From: Andrew Turner Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_E2948D8D-109E-4D83-852B-ACC868B1F99C" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.20\)) Subject: Re: register x18 Date: Fri, 16 Jul 2021 14:51:33 +0200 In-Reply-To: <32C24DDC-C8A1-43CD-9220-8009B229E452@freebsd.org> Cc: Mark Millard , freebsd-arm@freebsd.org To: tuexen@freebsd.org References: <86EC9C12-F90C-4D0C-BFA3-41986C9F07B5@freebsd.org> <32C24DDC-C8A1-43CD-9220-8009B229E452@freebsd.org> X-Mailer: Apple Mail (2.3445.104.20) X-Rspamd-Queue-Id: 4GRB300Vhtz3LNB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: Y --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 > wrote: >>=20 >>=20 >>=20 >> On 2021-Jul-15, at 17:40, Michael Tuexen = 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--