|
|
1.1 root 1: #ifndef lint
2: static char sccsid[] = "@(#)genassym.c 1.1 86/02/03 Copyr 1985 Sun Micro";
3: #endif
4:
5: /*
6: * Copyright (c) 1985 by Sun Microsystems, Inc.
7: */
8:
9: #include "../h/param.h"
10: #include "../h/buf.h"
11: #include "../h/vmmeter.h"
12: #include "../h/vmparam.h"
13: #include "../h/dir.h"
14: #include "../h/user.h"
15: #include "../h/cmap.h"
16: #include "../h/map.h"
17: #include "../h/proc.h"
18: #include "../h/msgbuf.h"
19: #include "../h/vmmac.h"
20:
21: #include "../machine/pte.h"
22: #include "../machine/reg.h"
23: #include "../machine/psl.h"
24: #include "../machine/mmu.h"
25: #include "../machine/cpu.h"
26: #include "../machine/scb.h"
27: #include "../machine/clock.h"
28: #include "../machine/memerr.h"
29: #include "../machine/interreg.h"
30: #include "../machine/eeprom.h"
31: #include "../machine/eccreg.h"
32:
33: #include "../machine/zscom.h"
34:
35: struct zsops *zs_proto[] = { 0 };
36:
37:
38: main()
39: {
40: register struct proc *p = (struct proc *)0;
41: register struct vmmeter *vm = (struct vmmeter *)0;
42: register struct user *up = (struct user *)0;
43: register struct regs *rp = (struct regs *)0;
44: register struct context *ctx = (struct context *)0;
45: register struct zscom *zs = (struct zscom *)0;
46:
47: printf("#define\tP_LINK 0x%x\n", &p->p_link);
48: printf("#define\tP_RLINK 0x%x\n", &p->p_rlink);
49: printf("#define\tP_ADDR 0x%x\n", &p->p_addr);
50: printf("#define\tP_PRI 0x%x\n", &p->p_pri);
51: printf("#define\tP_STAT 0x%x\n", &p->p_stat);
52: printf("#define\tP_WCHAN 0x%x\n", &p->p_wchan);
53: printf("#define\tP_CTX 0x%x\n", &p->p_ctx);
54: printf("#define\tP_FLAG 0x%x\n", &p->p_flag);
55: printf("#define\tP_PID 0x%x\n", &p->p_pid);
56: printf("#define\tPROCSIZE 0x%x\n", sizeof (struct proc));
57: printf("#define\tSLOAD 0x%x\n", SLOAD);
58: printf("#define\tSSLEEP 0x%x\n", SSLEEP);
59: printf("#define\tSRUN 0x%x\n", SRUN);
60: printf("#define\tSPTECHG_BIT %d\n", bit(SPTECHG));
1.1.1.2 ! root 61: printf("#define\tSPROCIO_BIT %d\n", bit(SPROCIO));
1.1 root 62: printf("#define\tV_SWTCH 0x%x\n", &vm->v_swtch);
63: printf("#define\tV_TRAP 0x%x\n", &vm->v_trap);
64: printf("#define\tV_SYSCALL 0x%x\n", &vm->v_syscall);
65: printf("#define\tV_INTR 0x%x\n", &vm->v_intr);
66: printf("#define\tV_PDMA 0x%x\n", &vm->v_pdma);
67: printf("#define\tMSGBUFPTECNT 0x%x\n", btoc(sizeof (struct msgbuf)));
68: /*
69: printf("#define\tNMBCLUSTERS 0x%x\n", NMBCLUSTERS);
70: */
71: printf("#define\tR_SP 0x%x\n", &rp->r_sp);
72: printf("#define\tR_PC 0x%x\n", &rp->r_pc);
73: printf("#define\tR_SR 0x%x\n", ((int)&rp->r_sr) + sizeof (short));
74: printf("#define\tR_VOR 0x%x\n", ((int)&rp->r_pc) + sizeof (int));
75: printf("#define\tPCB_REGS 0x%x\n", up->u_pcb.pcb_regs);
76: printf("#define\tPCB_SR 0x%x\n", &up->u_pcb.pcb_sr);
77: printf("#define\tPCB_SSWAP 0x%x\n", &up->u_pcb.pcb_sswap);
78: printf("#define\tPCB_P0LR 0x%x\n", &up->u_pcb.pcb_p0lr);
79: printf("#define\tAST_SCHED_BIT %d\n", bit(AST_SCHED));
80: printf("#define\tAST_STEP_BIT %d\n", bit(AST_STEP));
81: printf("#define\tTRACE_USER_BIT %d\n", bit(TRACE_USER));
82: printf("#define\tTRACE_AST_BIT %d\n", bit(TRACE_AST));
83: printf("#define\tSR_SMODE_BIT %d\n", bit(SR_SMODE));
84: printf("#define\tSR_TRACE_BIT %d\n", bit(SR_TRACE));
85: printf("#define\tIR_SOFT_INT1_BIT %d\n", bit(IR_SOFT_INT1));
86: printf("#define\tIR_SOFT_INT2_BIT %d\n", bit(IR_SOFT_INT2));
87: printf("#define\tIR_SOFT_INT3_BIT %d\n", bit(IR_SOFT_INT3));
88: printf("#define\tU_STACK 0x%x\n", up->u_stack);
89: printf("#define\tU_LOFAULT 0x%x\n", &up->u_lofault);
90: printf("#define\tU_FP_ISTATE 0x%x\n", &up->u_fp_istate);
91: printf("#define\tU_FPS_REGS 0x%x\n", up->u_fp_status.fps_regs);
92: printf("#define\tU_FPS_CTRL 0x%x\n", &up->u_fp_status.fps_control);
93: printf("#define\tUSIZE 0x%x\n", sizeof (struct user));
94: printf("#define\tZSSIZE 0x%x\n", sizeof (struct zscom));
95: printf("#define\tZS_ADDR 0x%x\n", &zs->zs_addr);
96: printf("#define\tCTX_CONTEXT 0x%x\n", &ctx->ctx_context);
97: printf("#define\tCTX_PROCP 0x%x\n", &ctx->ctx_procp);
98: printf("#define\tU_MAPVAL 0x%x\n", ((int)&u & PAGEADDRBITS) | PAGEBASE);
99: printf("#define\tEEPROM_ADDR_MAPVAL 0x%x\n",
100: ((int)EEPROM_ADDR & PAGEADDRBITS) | PAGEBASE);
101: printf("#define\tEEPROM_ADDR_PTE 0x%x\n",
102: PG_V | PG_KW | PGT_OBIO | btop(OBIO_EEPROM_ADDR));
103: printf("#define\tCLKADDR_MAPVAL 0x%x\n",
104: ((int)CLKADDR & PAGEADDRBITS) | PAGEBASE);
105: printf("#define\tCLKADDR_PTE 0x%x\n",
106: PG_V | PG_KW | PGT_OBIO | btop(OBIO_CLKADDR));
107: printf("#define\tMEMREG_MAPVAL 0x%x\n",
108: ((int)MEMREG & PAGEADDRBITS) | PAGEBASE);
109: printf("#define\tMEMREG_PTE 0x%x\n",
110: PG_V | PG_KW | PGT_OBIO | btop(OBIO_MEMREG));
111: printf("#define\tINTERREG_MAPVAL 0x%x\n",
112: ((int)INTERREG & PAGEADDRBITS) | PAGEBASE);
113: printf("#define\tINTERREG_PTE 0x%x\n",
114: PG_V | PG_KW | PGT_OBIO | btop(OBIO_INTERREG));
115: printf("#define\tECCREG_MAPVAL 0x%x\n",
116: ((int)ECCREG & PAGEADDRBITS) | PAGEBASE);
117: printf("#define\tECCREG_PTE 0x%x\n",
118: PG_V | PG_KW | PGT_OBIO | btop(OBIO_ECCREG));
119: printf("#define\tSCBSIZE 0x%x\n", sizeof (struct scb));
120: printf("#define\tROMP_PRINTF 0x%x\n", &romp->v_printf);
121: printf("#define\tROMP_ROMVEC_VERSION 0x%x\n", &romp->v_romvec_version);
122: printf("#define\tROMP_MEMORYBITMAP 0x%x\n", &romp->v_memorybitmap);
123: exit(0);
124: }
125:
126: bit(mask)
127: register long mask;
128: {
129: register int i;
130:
131: for (i = 0; i < 32; i++) {
132: if (mask & 1)
133: return (i);
134: mask >>= 1;
135: }
136: exit (1);
137: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.