Date: Wed, 8 May 2019 15:10:45 -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: <AFE5723D-667F-4292-8331-02ED086C67FC@yahoo.com> In-Reply-To: <FC2362ED-8042-441C-A897-CBDD2601DAD1@yahoo.com> References: <FC2362ED-8042-441C-A897-CBDD2601DAD1@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-May-8, at 13:53, Mark Millard <marklmi at yahoo.com> wrote: > 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 Looks like I should have listed more context: there is both (TMPSTKSZ-48) and (TRAPSTKSZ-48) for powerpc64: /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) It is not obvious what justifies the figures for powerpc64: TMPSTKSZ - 96 TMPSTKSZ-48 TRAPSTKSZ-48 Magic constants with no notes about how to figure out the correct (minimum?) figure to subtract. My question about the 48 vs. 96 may apply to more than the TMPSTKSZ-48 usage. =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?AFE5723D-667F-4292-8331-02ED086C67FC>