Date: Fri, 28 Jul 2006 00:58:06 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102620 for review Message-ID: <200607280058.k6S0w6iI051525@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102620 Change 102620 by jb@jb_freebsd2 on 2006/07/28 00:57:37 Move the asm code stack offsets into this file so that the asm code can be included inline in other asm code or in the cpu_snapshot_save function which is called from C source. Affected files ... .. //depot/projects/dtrace/src/sys/sun4v/include/cpu_snapshot.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/sun4v/include/cpu_snapshot.h#3 (text+ko) ==== @@ -6,38 +6,64 @@ #define CPU_SNAPSHOT_BITS 8 #define CPU_SNAPSHOT_SIZE (1 << CPU_SNAPSHOT_BITS) -#define CPU_SNAPSHOT_COUNT 0x00 -#define CPU_SNAPSHOT_R_I0 0x08 -#define CPU_SNAPSHOT_R_I1 0x10 -#define CPU_SNAPSHOT_R_I2 0x18 -#define CPU_SNAPSHOT_R_I3 0x20 -#define CPU_SNAPSHOT_R_I4 0x28 -#define CPU_SNAPSHOT_R_I5 0x30 -#define CPU_SNAPSHOT_R_I6 0x38 -#define CPU_SNAPSHOT_R_I7 0x40 -#define CPU_SNAPSHOT_R_O0 0x48 -#define CPU_SNAPSHOT_R_O1 0x50 -#define CPU_SNAPSHOT_R_O2 0x58 -#define CPU_SNAPSHOT_R_O3 0x60 -#define CPU_SNAPSHOT_R_O4 0x68 -#define CPU_SNAPSHOT_R_O5 0x70 -#define CPU_SNAPSHOT_R_O6 0x78 -#define CPU_SNAPSHOT_R_O7 0x80 -#define CPU_SNAPSHOT_R_G1 0x88 -#define CPU_SNAPSHOT_R_G2 0x90 -#define CPU_SNAPSHOT_R_G3 0x98 -#define CPU_SNAPSHOT_R_G4 0xa0 -#define CPU_SNAPSHOT_R_G5 0xa8 -#define CPU_SNAPSHOT_R_G6 0xb0 -#define CPU_SNAPSHOT_R_G7 0xb8 -#define CPU_SNAPSHOT_PSTATE 0xc0 -#define CPU_SNAPSHOT_TL 0xc8 -#define CPU_SNAPSHOT_TICK 0xd0 -#define CPU_SNAPSHOT_PIL 0xd8 +#ifdef __ASM__ + +/* Offsets for registers saved on the stack. */ +#define STACK_G1 SPOFF +#define STACK_G2 SPOFF + 0x08 +#define STACK_G3 SPOFF + 0x10 +#define STACK_G4 SPOFF + 0x18 +#define STACK_G5 SPOFF + 0x20 +#define STACK_FREEB SPOFF + 0x28 +#define STACK_FREEA SPOFF + 0x30 +#define STACK_FREE9 SPOFF + 0x38 +#define STACK_FREE8 SPOFF + 0x40 +#define STACK_FREE7 SPOFF + 0x48 +#define STACK_FREE6 SPOFF + 0x50 +#define STACK_FREE5 SPOFF + 0x58 +#define STACK_FREE4 SPOFF + 0x60 +#define STACK_FREE3 SPOFF + 0x68 +#define STACK_FREE2 SPOFF + 0x70 +#define STACK_FREE1 SPOFF + 0x78 +#define STACK_SIZE 0x80 + +/* Offsets into struct cpu_snapshot */ +#define CPU_SNAPSHOT_INDX 0x00 +#define CPU_SNAPSHOT_COUNT 0x08 +#define CPU_SNAPSHOT_R_I0 0x10 +#define CPU_SNAPSHOT_R_I1 0x18 +#define CPU_SNAPSHOT_R_I2 0x20 +#define CPU_SNAPSHOT_R_I3 0x28 +#define CPU_SNAPSHOT_R_I4 0x30 +#define CPU_SNAPSHOT_R_I5 0x38 +#define CPU_SNAPSHOT_R_I6 0x40 +#define CPU_SNAPSHOT_R_I7 0x48 +#define CPU_SNAPSHOT_R_O0 0x50 +#define CPU_SNAPSHOT_R_O1 0x58 +#define CPU_SNAPSHOT_R_O2 0x60 +#define CPU_SNAPSHOT_R_O3 0x68 +#define CPU_SNAPSHOT_R_O4 0x70 +#define CPU_SNAPSHOT_R_O5 0x78 +#define CPU_SNAPSHOT_R_O6 0x80 +#define CPU_SNAPSHOT_R_O7 0x88 +#define CPU_SNAPSHOT_R_G1 0x90 +#define CPU_SNAPSHOT_R_G2 0x98 +#define CPU_SNAPSHOT_R_G3 0xa0 +#define CPU_SNAPSHOT_R_G4 0xa8 +#define CPU_SNAPSHOT_R_G5 0xb0 +#define CPU_SNAPSHOT_R_G6 0xb8 +#define CPU_SNAPSHOT_R_G7 0xc0 +#define CPU_SNAPSHOT_PSTATE 0xc8 +#define CPU_SNAPSHOT_TL 0xd0 +#define CPU_SNAPSHOT_TICK 0xd8 +#define CPU_SNAPSHOT_PIL 0xe0 +#define CPU_SNAPSHOT_SP 0xe8 +#define CPU_SNAPSHOT_PC 0xf0 -#ifndef __ASM__ +#else struct cpu_snapshot { + uint64_t indx; uint64_t count; uint64_t r_i0; uint64_t r_i1; @@ -66,7 +92,9 @@ uint64_t tl; uint64_t tick; uint64_t pil; - uint64_t pad[4]; + uint64_t sp; + uint64_t pc; + uint64_t pad[1]; }; #ifdef CPU_SNAPSHOT_GLOBAL
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607280058.k6S0w6iI051525>