Annotation of researchv9/sys/conf/genassym.c, revision 1.1

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));
        !            61:        printf("#define\tV_SWTCH 0x%x\n", &vm->v_swtch);
        !            62:        printf("#define\tV_TRAP 0x%x\n", &vm->v_trap);
        !            63:        printf("#define\tV_SYSCALL 0x%x\n", &vm->v_syscall);
        !            64:        printf("#define\tV_INTR 0x%x\n", &vm->v_intr);
        !            65:        printf("#define\tV_PDMA 0x%x\n", &vm->v_pdma);
        !            66:        printf("#define\tMSGBUFPTECNT 0x%x\n", btoc(sizeof (struct msgbuf)));
        !            67: /*
        !            68:        printf("#define\tNMBCLUSTERS 0x%x\n", NMBCLUSTERS);
        !            69: */
        !            70:        printf("#define\tR_SP 0x%x\n", &rp->r_sp);
        !            71:        printf("#define\tR_PC 0x%x\n", &rp->r_pc);
        !            72:        printf("#define\tR_SR 0x%x\n", ((int)&rp->r_sr) + sizeof (short));
        !            73:        printf("#define\tR_VOR 0x%x\n", ((int)&rp->r_pc) + sizeof (int));
        !            74:        printf("#define\tPCB_REGS 0x%x\n", up->u_pcb.pcb_regs);
        !            75:        printf("#define\tPCB_SR 0x%x\n", &up->u_pcb.pcb_sr);
        !            76:        printf("#define\tPCB_SSWAP 0x%x\n", &up->u_pcb.pcb_sswap);
        !            77:        printf("#define\tPCB_P0LR 0x%x\n", &up->u_pcb.pcb_p0lr);
        !            78:        printf("#define\tAST_SCHED_BIT %d\n", bit(AST_SCHED));
        !            79:        printf("#define\tAST_STEP_BIT %d\n", bit(AST_STEP));
        !            80:        printf("#define\tTRACE_USER_BIT %d\n", bit(TRACE_USER));
        !            81:        printf("#define\tTRACE_AST_BIT %d\n", bit(TRACE_AST));
        !            82:        printf("#define\tSR_SMODE_BIT %d\n", bit(SR_SMODE));
        !            83:        printf("#define\tSR_TRACE_BIT %d\n", bit(SR_TRACE));
        !            84:        printf("#define\tIR_SOFT_INT1_BIT %d\n", bit(IR_SOFT_INT1));
        !            85:        printf("#define\tIR_SOFT_INT2_BIT %d\n", bit(IR_SOFT_INT2));
        !            86:        printf("#define\tIR_SOFT_INT3_BIT %d\n", bit(IR_SOFT_INT3));
        !            87:        printf("#define\tU_STACK 0x%x\n", up->u_stack);
        !            88:        printf("#define\tU_LOFAULT 0x%x\n", &up->u_lofault);
        !            89:        printf("#define\tU_FP_ISTATE 0x%x\n", &up->u_fp_istate);
        !            90:        printf("#define\tU_FPS_REGS 0x%x\n", up->u_fp_status.fps_regs);
        !            91:        printf("#define\tU_FPS_CTRL 0x%x\n", &up->u_fp_status.fps_control);
        !            92:        printf("#define\tUSIZE 0x%x\n", sizeof (struct user));
        !            93:        printf("#define\tZSSIZE 0x%x\n", sizeof (struct zscom));
        !            94:        printf("#define\tZS_ADDR 0x%x\n", &zs->zs_addr);
        !            95:        printf("#define\tCTX_CONTEXT 0x%x\n", &ctx->ctx_context);
        !            96:        printf("#define\tCTX_PROCP 0x%x\n", &ctx->ctx_procp);
        !            97:        printf("#define\tU_MAPVAL 0x%x\n", ((int)&u & PAGEADDRBITS) | PAGEBASE);
        !            98:        printf("#define\tEEPROM_ADDR_MAPVAL 0x%x\n",
        !            99:            ((int)EEPROM_ADDR & PAGEADDRBITS) | PAGEBASE);
        !           100:        printf("#define\tEEPROM_ADDR_PTE 0x%x\n",
        !           101:            PG_V | PG_KW | PGT_OBIO | btop(OBIO_EEPROM_ADDR));
        !           102:        printf("#define\tCLKADDR_MAPVAL 0x%x\n",
        !           103:            ((int)CLKADDR & PAGEADDRBITS) | PAGEBASE);
        !           104:        printf("#define\tCLKADDR_PTE 0x%x\n",
        !           105:            PG_V | PG_KW | PGT_OBIO | btop(OBIO_CLKADDR));
        !           106:        printf("#define\tMEMREG_MAPVAL 0x%x\n",
        !           107:            ((int)MEMREG & PAGEADDRBITS) | PAGEBASE);
        !           108:        printf("#define\tMEMREG_PTE 0x%x\n",
        !           109:            PG_V | PG_KW | PGT_OBIO | btop(OBIO_MEMREG));
        !           110:        printf("#define\tINTERREG_MAPVAL 0x%x\n",
        !           111:            ((int)INTERREG & PAGEADDRBITS) | PAGEBASE);
        !           112:        printf("#define\tINTERREG_PTE 0x%x\n",
        !           113:            PG_V | PG_KW | PGT_OBIO | btop(OBIO_INTERREG));
        !           114:        printf("#define\tECCREG_MAPVAL 0x%x\n",
        !           115:            ((int)ECCREG & PAGEADDRBITS) | PAGEBASE);
        !           116:        printf("#define\tECCREG_PTE 0x%x\n",
        !           117:            PG_V | PG_KW | PGT_OBIO | btop(OBIO_ECCREG));
        !           118:        printf("#define\tSCBSIZE 0x%x\n", sizeof (struct scb));
        !           119:        printf("#define\tROMP_PRINTF 0x%x\n", &romp->v_printf);
        !           120:        printf("#define\tROMP_ROMVEC_VERSION 0x%x\n", &romp->v_romvec_version);
        !           121:        printf("#define\tROMP_MEMORYBITMAP 0x%x\n", &romp->v_memorybitmap);
        !           122:        exit(0);
        !           123: }
        !           124: 
        !           125: bit(mask)
        !           126:        register long mask;
        !           127: {
        !           128:        register int i;
        !           129: 
        !           130:        for (i = 0; i < 32; i++) {
        !           131:                if (mask & 1)
        !           132:                        return (i);
        !           133:                mask >>= 1;
        !           134:        }
        !           135:        exit (1);
        !           136: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.