17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*41791439Sandrei * Common Development and Distribution License (the "License"). 6*41791439Sandrei * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*41791439Sandrei * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate #ifndef _GENASSYM 297c478bd9Sstevel@tonic-gate #define _GENASSYM 307c478bd9Sstevel@tonic-gate #endif 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #define exit kern_exit 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate #include <sys/types.h> 357c478bd9Sstevel@tonic-gate #include <sys/param.h> 367c478bd9Sstevel@tonic-gate #include <sys/systm.h> 377c478bd9Sstevel@tonic-gate #include <sys/elf_notes.h> 387c478bd9Sstevel@tonic-gate #include <sys/thread.h> 397c478bd9Sstevel@tonic-gate #include <sys/rwlock.h> 407c478bd9Sstevel@tonic-gate #include <sys/proc.h> 417c478bd9Sstevel@tonic-gate #include <sys/cpuvar.h> 427c478bd9Sstevel@tonic-gate #include <sys/clock.h> 437c478bd9Sstevel@tonic-gate #include <sys/trap.h> 447c478bd9Sstevel@tonic-gate #include <sys/modctl.h> 457c478bd9Sstevel@tonic-gate #include <sys/traptrace.h> 467c478bd9Sstevel@tonic-gate #include <vm/seg.h> 477c478bd9Sstevel@tonic-gate #include <sys/avintr.h> 487c478bd9Sstevel@tonic-gate #include <sys/pic.h> 497c478bd9Sstevel@tonic-gate #include <sys/pit.h> 507c478bd9Sstevel@tonic-gate #include <sys/fp.h> 517c478bd9Sstevel@tonic-gate #include <sys/archsystm.h> 527c478bd9Sstevel@tonic-gate #include <sys/sunddi.h> 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate #undef exit /* unhide exit, see comment above */ 557c478bd9Sstevel@tonic-gate extern void exit(int); 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate /* 587c478bd9Sstevel@tonic-gate * Proactively discourage anyone from referring to structures or 597c478bd9Sstevel@tonic-gate * member offsets in this program. 607c478bd9Sstevel@tonic-gate */ 617c478bd9Sstevel@tonic-gate #define struct struct... 627c478bd9Sstevel@tonic-gate #define OFFSET OFFSET... 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate int 657c478bd9Sstevel@tonic-gate main(int argc, char *argv[]) 667c478bd9Sstevel@tonic-gate { 677c478bd9Sstevel@tonic-gate printf("#define\tT_AST 0x%x\n", T_AST); 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate printf("#define\tLOCK_LEVEL 0x%x\n", LOCK_LEVEL); 707c478bd9Sstevel@tonic-gate printf("#define\tCLOCK_LEVEL 0x%x\n", CLOCK_LEVEL); 717c478bd9Sstevel@tonic-gate printf("#define\tDISP_LEVEL 0x%x\n", DISP_LEVEL); 727c478bd9Sstevel@tonic-gate printf("#define\tPIL_MAX 0x%x\n", PIL_MAX); 737c478bd9Sstevel@tonic-gate printf("#define\tHIGH_LEVELS 0x%x\n", HIGH_LEVELS); 747c478bd9Sstevel@tonic-gate printf("#define\tCPU_INTR_ACTV_HIGH_LEVEL_MASK 0x%x\n", 757c478bd9Sstevel@tonic-gate CPU_INTR_ACTV_HIGH_LEVEL_MASK); 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate printf("#define\tPIC_NSEOI 0x%x\n", PIC_NSEOI); 787c478bd9Sstevel@tonic-gate printf("#define\tPIC_SEOI_LVL7 0x%x\n", PIC_SEOI_LVL7); 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate printf("#define\tNANOSEC 0x%x\n", NANOSEC); 817c478bd9Sstevel@tonic-gate printf("#define\tADJ_SHIFT 0x%x\n", ADJ_SHIFT); 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate printf("#define\tSSLEEP 0x%x\n", SSLEEP); 847c478bd9Sstevel@tonic-gate printf("#define\tSRUN 0x%x\n", SRUN); 857c478bd9Sstevel@tonic-gate printf("#define\tSONPROC 0x%x\n", SONPROC); 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate printf("#define\tT_INTR_THREAD 0x%x\n", T_INTR_THREAD); 887c478bd9Sstevel@tonic-gate printf("#define\tFREE_THREAD 0x%x\n", TS_FREE); 897c478bd9Sstevel@tonic-gate printf("#define\tTS_FREE 0x%x\n", TS_FREE); 907c478bd9Sstevel@tonic-gate printf("#define\tTS_ZOMB 0x%x\n", TS_ZOMB); 917c478bd9Sstevel@tonic-gate printf("#define\tTP_MSACCT 0x%x\n", TP_MSACCT); 927c478bd9Sstevel@tonic-gate printf("#define\tTP_WATCHPT 0x%x\n", TP_WATCHPT); 937c478bd9Sstevel@tonic-gate printf("#define\tONPROC_THREAD 0x%x\n", TS_ONPROC); 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate printf("#define\tS_READ 0x%x\n", (int)S_READ); 967c478bd9Sstevel@tonic-gate printf("#define\tS_WRITE 0x%x\n", (int)S_WRITE); 977c478bd9Sstevel@tonic-gate printf("#define\tS_EXEC 0x%x\n", (int)S_EXEC); 987c478bd9Sstevel@tonic-gate printf("#define\tS_OTHER 0x%x\n", (int)S_OTHER); 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate printf("#define\tNORMALRETURN 0x%x\n", (int)NORMALRETURN); 1017c478bd9Sstevel@tonic-gate printf("#define\tLWP_USER 0x%x\n", LWP_USER); 1027c478bd9Sstevel@tonic-gate printf("#define\tLWP_SYS 0x%x\n", LWP_SYS); 1037c478bd9Sstevel@tonic-gate printf("#define\tLMS_USER 0x%x\n", LMS_USER); 1047c478bd9Sstevel@tonic-gate printf("#define\tLMS_SYSTEM 0x%x\n", LMS_SYSTEM); 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate printf("#define\tSSE_MXCSR_EFLAGS 0x%x\n", SSE_MXCSR_EFLAGS); 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate printf("#define\tFP_487 0x%x\n", FP_487); 1097c478bd9Sstevel@tonic-gate printf("#define\tFP_486 0x%x\n", FP_486); 1107c478bd9Sstevel@tonic-gate printf("#define\tFPU_CW_INIT 0x%x\n", FPU_CW_INIT); 1117c478bd9Sstevel@tonic-gate printf("#define\tFPU_EN 0x%x\n", FPU_EN); 1127c478bd9Sstevel@tonic-gate printf("#define\tFPU_VALID 0x%x\n", FPU_VALID); 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate printf("#define\tELF_NOTE_PAGESIZE_HINT 0x%x\n", 1157c478bd9Sstevel@tonic-gate ELF_NOTE_PAGESIZE_HINT); 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate printf("#define\tFP_NO 0x%x\n", FP_NO); 1187c478bd9Sstevel@tonic-gate printf("#define\tFP_SW 0x%x\n", FP_SW); 1197c478bd9Sstevel@tonic-gate printf("#define\tFP_HW 0x%x\n", FP_HW); 1207c478bd9Sstevel@tonic-gate printf("#define\tFP_287 0x%x\n", FP_287); 1217c478bd9Sstevel@tonic-gate printf("#define\tFP_387 0x%x\n", FP_387); 1227c478bd9Sstevel@tonic-gate printf("#define\t__FP_SSE 0x%x\n", __FP_SSE); 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate printf("#define\tAV_INT_SPURIOUS 0x%x\n", AV_INT_SPURIOUS); 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gate printf("#define\tCPU_READY 0x%x\n", CPU_READY); 1277c478bd9Sstevel@tonic-gate printf("#define\tCPU_QUIESCED 0x%x\n", CPU_QUIESCED); 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate printf("#define\tMCMD_PORT 0x%x\n", MCMD_PORT); 1307c478bd9Sstevel@tonic-gate printf("#define\tSCMD_PORT 0x%x\n", SCMD_PORT); 1317c478bd9Sstevel@tonic-gate printf("#define\tMIMR_PORT 0x%x\n", MIMR_PORT); 1327c478bd9Sstevel@tonic-gate printf("#define\tSIMR_PORT 0x%x\n", SIMR_PORT); 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate printf("#define\tDMP_NOSYNC 0x%x\n", DMP_NOSYNC); 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate printf("#define\tRW_WRITER\t0x%x\n", RW_WRITER); 1377c478bd9Sstevel@tonic-gate printf("#define\tRW_READER\t0x%x\n", RW_READER); 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate printf("#define\tNSYSCALL 0x%x\n", NSYSCALL); 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate printf("#define\tSE_32RVAL1 0x%x\n", SE_32RVAL1); 1427c478bd9Sstevel@tonic-gate printf("#define\tSE_32RVAL2 0x%x\n", SE_32RVAL2); 1437c478bd9Sstevel@tonic-gate printf("#define\tSE_64RVAL 0x%x\n", SE_64RVAL); 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate printf("#define\tMAXSYSARGS 0x%x\n", MAXSYSARGS); 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate /* Hack value just to allow clock to be kicked */ 1487c478bd9Sstevel@tonic-gate printf("#define\tNSEC_PER_CLOCK_TICK 0x%x\n", NANOSEC / 100); 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate printf("#define\tNSEC_PER_COUNTER_TICK 0x%x\n", NANOSEC / PIT_HZ); 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate printf("#define\tPITCTR0_PORT 0x%x\n", PITCTR0_PORT); 1537c478bd9Sstevel@tonic-gate printf("#define\tPITCTL_PORT 0x%x\n", PITCTL_PORT); 1547c478bd9Sstevel@tonic-gate printf("#define\tPIT_COUNTDOWN 0x%x\n", 1557c478bd9Sstevel@tonic-gate PIT_C0 | PIT_LOADMODE | PIT_NDIVMODE); 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gate printf("#define\tNBPW 0x%x\n", NBPW); 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gate printf("#define\tDDI_ACCATTR_IO_SPACE 0x%x\n", DDI_ACCATTR_IO_SPACE); 1607c478bd9Sstevel@tonic-gate printf("#define\tDDI_ACCATTR_DIRECT 0x%x\n", DDI_ACCATTR_DIRECT); 1617c478bd9Sstevel@tonic-gate printf("#define\tDDI_ACCATTR_CPU_VADDR 0x%x\n", DDI_ACCATTR_CPU_VADDR); 1627c478bd9Sstevel@tonic-gate printf("#define\tDDI_DEV_AUTOINCR 0x%x\n", DDI_DEV_AUTOINCR); 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate printf("#define\tMMU_STD_PAGESIZE 0x%x\n", (uint_t)MMU_STD_PAGESIZE); 1657c478bd9Sstevel@tonic-gate printf("#define\tMMU_STD_PAGESHIFT 0x%x\n", (uint_t)MMU_STD_PAGESHIFT); 1667c478bd9Sstevel@tonic-gate printf("#define\tMMU_STD_PAGEMASK 0x%x\n", (uint_t)MMU_STD_PAGEMASK); 1677c478bd9Sstevel@tonic-gate printf("#define\tMMU_L2_MASK 0x%x\n", (uint_t)(NPTEPERPT - 1)); 1687c478bd9Sstevel@tonic-gate printf("#define\tNPTESHIFT 0x%x\n", (uint_t)NPTESHIFT); 1697c478bd9Sstevel@tonic-gate printf("#define\tFOURMB_PAGEOFFSET 0x%x\n", (uint_t)FOURMB_PAGEOFFSET); 1707c478bd9Sstevel@tonic-gate printf("#define\tFOURMB_PAGESIZE 0x%x\n", (uint_t)FOURMB_PAGESIZE); 1717c478bd9Sstevel@tonic-gate printf("#define\tPTE_LARGEPAGE 0x%x\n", (uint_t)PTE_LARGEPAGE); 1727c478bd9Sstevel@tonic-gate printf("#define\tPTE_VALID 0x%x\n", (uint_t)PTE_VALID); 1737c478bd9Sstevel@tonic-gate printf("#define\tPTE_SRWX 0x%x\n", (uint_t)PTE_SRWX); 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate printf("#define\tTRAPTR_NENT 0x%x\n", TRAPTR_NENT); 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate printf("#define\tCPU_DTRACE_NOFAULT 0x%x\n", CPU_DTRACE_NOFAULT); 1787c478bd9Sstevel@tonic-gate printf("#define\tCPU_DTRACE_BADADDR 0x%x\n", CPU_DTRACE_BADADDR); 1797c478bd9Sstevel@tonic-gate printf("#define\tCPU_DTRACE_ILLOP 0x%x\n", CPU_DTRACE_ILLOP); 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate printf("#define\tMODS_NOUNLOAD 0x%x\n", MODS_NOUNLOAD); 1827c478bd9Sstevel@tonic-gate printf("#define\tMODS_WEAK 0x%x\n", MODS_WEAK); 1837c478bd9Sstevel@tonic-gate printf("#define\tMODS_INSTALLED 0x%x\n", MODS_INSTALLED); 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gate return (0); 1867c478bd9Sstevel@tonic-gate } 187