Date: Wed, 8 May 2019 15:16:11 -0700 From: Mark Millard <marklmi@yahoo.com> To: Justin Hibbits <chmeeedalf@gmail.com>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: powerpc64 context: aim/locore64.S __start TMPSTKSZ-48 vs. TMPSTKSZ-96 (-r277392 and later) vs. modern aim/trap_subr64.S cpu_reset_handler: (TMPSTKSZ-48)? Message-ID: <34644717-49EE-48E7-92BA-5F6DF3082534@yahoo.com> In-Reply-To: <AFE5723D-667F-4292-8331-02ED086C67FC@yahoo.com> References: <FC2362ED-8042-441C-A897-CBDD2601DAD1@yahoo.com> <AFE5723D-667F-4292-8331-02ED086C67FC@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[I found yet another one, an implicit example: PC_SLBSTACK-48+1024.] On 2019-May-8, at 15:10, Mark Millard <marklmi at yahoo.com> wrote: > On 2019-May-8, at 13:53, Mark Millard <marklmi at yahoo.com> wrote: >=20 >> Should cpu_reset_handler have been updated to use (TMPSTKSZ-96) when >> __start was changed to use TMPSTKSZ-96, back in 2015-Jan-19? >>=20 >=20 > Looks like I should have listed more context: there is both > (TMPSTKSZ-48) and (TRAPSTKSZ-48) for powerpc64: >=20 > /mnt/usr/src/sys/powerpc/aim/trap_subr32.S: addi = %r1,%r1,TRAPSTKSZ-16 > /mnt/usr/src/sys/powerpc/aim/trap_subr64.S: addi = %r1,%r1,(TMPSTKSZ-48) > /mnt/usr/src/sys/powerpc/aim/trap_subr64.S: addi = %r1,%r1,(TRAPSTKSZ-48) > /mnt/usr/src/sys/powerpc/aim/locore32.S:#define TMPSTKSZ 8192 = /* 8K temporary stack */ > /mnt/usr/src/sys/powerpc/aim/locore32.S: .space TMPSTKSZ > /mnt/usr/src/sys/powerpc/aim/locore32.S:#define TRAPSTKSZ 4096 = /* 4k trap stack */ > /mnt/usr/src/sys/powerpc/aim/locore32.S: .space = TRAPSTKSZ > /mnt/usr/src/sys/powerpc/aim/locore32.S: addi = %r1,%r1,(8+TMPSTKSZ-40) > /mnt/usr/src/sys/powerpc/aim/locore64.S:#define TMPSTKSZ 16384 = /* 16K temporary stack */ > /mnt/usr/src/sys/powerpc/aim/locore64.S: .space TMPSTKSZ > /mnt/usr/src/sys/powerpc/aim/locore64.S:#define TRAPSTKSZ 4096 = /* 4k trap stack */ > /mnt/usr/src/sys/powerpc/aim/locore64.S: .space = TRAPSTKSZ > /mnt/usr/src/sys/powerpc/aim/locore64.S: .llong tmpstk + = TMPSTKSZ - 96 - . > /mnt/usr/src/sys/powerpc/ofw/ofwcall64.S:#define OFWSTKSZ = 4096 /* 4K Open Firmware stack */ > /mnt/usr/src/sys/powerpc/ofw/ofwcall64.S: .space OFWSTKSZ > /mnt/usr/src/sys/powerpc/ofw/ofwcall64.S: addi = %r7,%r7,OFWSTKSZ-40 > /mnt/usr/src/sys/powerpc/ofw/ofwcall32.S:#define OFWSTKSZ = 4096 /* 4K Open Firmware stack */ > /mnt/usr/src/sys/powerpc/ofw/ofwcall32.S: .space OFWSTKSZ > /mnt/usr/src/sys/powerpc/ofw/ofwcall32.S: addi = %r1,%r1,(OFWSTKSZ-32) >=20 >=20 > It is not obvious what justifies the figures for > powerpc64: >=20 > TMPSTKSZ - 96 > TMPSTKSZ-48 > TRAPSTKSZ-48 >=20 > Magic constants with no notes about how to figure out > the correct (minimum?) figure to subtract. >=20 > My question about the 48 vs. 96 may apply to more > than the TMPSTKSZ-48 usage. There is also: addi %r1,%r1,PC_SLBSTACK-48+1024 with 1024 being the ???STKSZ and having another magic 48 that I wonder about if it should be 96. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34644717-49EE-48E7-92BA-5F6DF3082534>