dbmentry.S (8013:2dfcde2e9998) | dbmentry.S (8023:36c59449dc93) |
---|---|
1/* 2 * Copyright (c) 2003, 2004 3 * The Regents of The University of Michigan 4 * All Rights Reserved 5 * 6 * This code is part of the M5 simulator, developed by Nathan Binkert, 7 * Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions 8 * from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew --- 42 unchanged lines hidden (view full) --- 51 * SOFTWARE. 52 */ 53 54/* 55 * Debug Monitor Entry code 56 */ 57#include "fromHudsonOsf.h" 58 | 1/* 2 * Copyright (c) 2003, 2004 3 * The Regents of The University of Michigan 4 * All Rights Reserved 5 * 6 * This code is part of the M5 simulator, developed by Nathan Binkert, 7 * Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions 8 * from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew --- 42 unchanged lines hidden (view full) --- 51 * SOFTWARE. 52 */ 53 54/* 55 * Debug Monitor Entry code 56 */ 57#include "fromHudsonOsf.h" 58 |
59 .extern myAlphaAccess |
|
59 .text 60 61/* return address and padding to octaword align */ 62#define STARTFRM 16 63 64 .globl _start 65 .ent _start, 0 66_start: 67_entry: 68 br t0, 2f # get the current PC 692: ldgp gp, 0(t0) # init gp 70 | 60 .text 61 62/* return address and padding to octaword align */ 63#define STARTFRM 16 64 65 .globl _start 66 .ent _start, 0 67_start: 68_entry: 69 br t0, 2f # get the current PC 702: ldgp gp, 0(t0) # init gp 71 |
71 /* 72 * SimOS. Stack pointer is start of a valid phys or KSEG page 73 */ | 72/* Processor 0 start stack frame is begining of physical memory (0) 73 Other processors spin here waiting to get their stacks from 74 Processor 0, then they can progress as normal. 75*/ 76 call_pal PAL_WHAMI_ENTRY 77 beq v0, cpuz 78 ldq t3, m5AlphaAccess 79 addq t3,0x70,t3 # *** If offset in console alpha access struct changes 80 # This must be changed as well! 81 bis zero,8,t4 82 mulq t4,v0,t4 83 addq t3,t4,t3 84cpuwait: ldq t4, 0(t3) 85 beq t4, cpuwait 86 bis t4,t4,sp |
74 | 87 |
75 bis sp,sp,s0 /* save sp */ | |
76 | 88 |
89cpuz: bis sp,sp,s0 /* save sp */ 90 |
|
77slave: lda v0,(8*1024)(sp) /* end of page */ 78 79 subq zero, 1, t0 80 sll t0, 42, t0 81 bis t0, v0, sp 82 83 lda sp, -STARTFRM(sp) # Create a stack frame 84 stq ra, 0(sp) # Place return address on the stack --- 6 unchanged lines hidden (view full) --- 91 */ 92 lda a0, 1(zero) 93 call_pal PAL_WRFEN_ENTRY 94 95/* 96 * Every good C program has a main() 97 */ 98 | 91slave: lda v0,(8*1024)(sp) /* end of page */ 92 93 subq zero, 1, t0 94 sll t0, 42, t0 95 bis t0, v0, sp 96 97 lda sp, -STARTFRM(sp) # Create a stack frame 98 stq ra, 0(sp) # Place return address on the stack --- 6 unchanged lines hidden (view full) --- 105 */ 106 lda a0, 1(zero) 107 call_pal PAL_WRFEN_ENTRY 108 109/* 110 * Every good C program has a main() 111 */ 112 |
113/* If stack pointer was 0, then this is CPU0*/ |
|
99 beq s0,master 100 101 call_pal PAL_WHAMI_ENTRY 102 bis v0,v0,a0 103 jsr ra, SlaveLoop 104master: 105 jsr ra, main 106 --- 113 unchanged lines hidden --- | 114 beq s0,master 115 116 call_pal PAL_WHAMI_ENTRY 117 bis v0,v0,a0 118 jsr ra, SlaveLoop 119master: 120 jsr ra, main 121 --- 113 unchanged lines hidden --- |