1/*
|
2Copyright (c) 2003, 2004
3The Regents of The University of Michigan
4All Rights Reserved
5
6This code is part of the M5 simulator, developed by Nathan Binkert,
7Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
8from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
9Schultz.
10
11Permission is granted to use, copy, create derivative works and
12redistribute this software and such derivative works for any purpose,
13so long as the copyright notice above, this grant of permission, and
14the disclaimer below appear in all copies made; and so long as the
15name of The University of Michigan is not used in any advertising or
16publicity pertaining to the use or distribution of this software
17without specific, written prior authorization.
18
19THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
20UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
21WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
22IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
23MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
24THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
25INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
26DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
27WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
28ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
29*/
|
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 9 * Schultz. 10 * 11 * Permission is granted to use, copy, create derivative works and 12 * redistribute this software and such derivative works for any purpose, 13 * so long as the copyright notice above, this grant of permission, and 14 * the disclaimer below appear in all copies made; and so long as the 15 * name of The University of Michigan is not used in any advertising or 16 * publicity pertaining to the use or distribution of this software 17 * without specific, written prior authorization. 18 * 19 * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE 20 * UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT 21 * WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR 22 * IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF 23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF 24 * THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, 25 * INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 26 * DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION 27 * WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER 28 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 29 */ |
30/*
|
31Copyright 1993 Hewlett-Packard Development Company, L.P.
|
31 * Copyright 1993 Hewlett-Packard Development Company, L.P. 32 * 33 * Permission is hereby granted, free of charge, to any person 34 * obtaining a copy of this software and associated documentation 35 * files (the "Software"), to deal in the Software without 36 * restriction, including without limitation the rights to use, copy, 37 * modify, merge, publish, distribute, sublicense, and/or sell copies 38 * of the Software, and to permit persons to whom the Software is 39 * furnished to do so, subject to the following conditions: 40 * 41 * The above copyright notice and this permission notice shall be 42 * included in all copies or substantial portions of the Software. 43 * 44 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 45 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 46 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 47 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 48 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 49 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 50 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 51 * SOFTWARE. 52 */ |
53
|
33Permission is hereby granted, free of charge, to any person obtaining a copy of
34this software and associated documentation files (the "Software"), to deal in
35the Software without restriction, including without limitation the rights to
36use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
37of the Software, and to permit persons to whom the Software is furnished to do
38so, subject to the following conditions:
39
40The above copyright notice and this permission notice shall be included in all
41copies or substantial portions of the Software.
42
43THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49SOFTWARE.
50*/
51
52/* taken from ebfw/rom/dbmentry.s */
53
54#define EB164
55/*#ifndef LINT
56.data
57.asciiz "$Id: dbmentry.s,v 1.1.1.1 1997/10/30 23:27:12 verghese Exp $"
58.text
59#endif
60*/
|
54/* 55 * Debug Monitor Entry code 56 */
|
64
65#ifndef MAKEDEPEND
66#include "ev5_impure.h"
67#include "cserve.h"
|
57#include "fromHudsonOsf.h"
|
69#endif
|
58
|
71//#include "paldefs.h"
72#include "regdefs.h"
73#include "eb164.h"
74//#include "ledcodes.h"
75
|
59 .text 60 61/* return address and padding to octaword align */ 62#define STARTFRM 16 63
|
81 .globl __start
82 .ent __start, 0
83__start:
|
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
|
88
89#ifdef original_xxm
90 lda a2, CSERVE_K_RD_IMPURE
91 call_pal PAL_CSERVE_ENTRY
92 lda v0, CNS_Q_BASE(v0)
93
94 # Add KSEG offset to the impure area
95 subq zero, 1, t0
96 sll t0, 42, t0
97 addq t0, v0, v0
98
99 lda t0, CNS_Q_SIGNATURE(v0)
100 bic t0, 0x07, t0 # Clear bottom 3 bits to avoid
101 # allignment errors if the
102 # impure area is total rubbish
103 ldq t0, 0x00(t0)
104 srl t0, 16, t0 # Shift signature into bottom 16 bits.
105 lda t6, 0xDECB(zero) # Load the expected valid signature.
106 zap t6, 0xFC, t6 # Clear the upper bits.
107 cmpeq t0, t6, t0 # Is this a valid signature?
108 beq t0, 1f # Not valid, don't trust input params.
109
110/*
111 * Init the stack at the first 8K boundary
112 * below the top of memory.
113 */
114 lda t0, CNS_Q_MEM_SIZE(v0)
115 ldq t0, 0x00(t0) # Load memory size.
116 subq t0, 1, t0 # Last address in memory
117 srl t0, 13, t0 # Align to first 8KB boundary
118 sll t0, 13, sp # below the top of memory.
119 br zero, 2f
120
121/*
122 * If memory size was not passed in via the
123 * PALcode impure data use the system specific
124 * MINIMUM_SYSTEM_MEMORY definition.
125 */
1261:
127 lda sp, (MINIMUM_SYSTEM_MEMORY&0xffff)(zero)
128 ldah sp, ((MINIMUM_SYSTEM_MEMORY+0x8000)>>16)(sp)
129 lda t0, (8*1024)(zero) # Allow for 8KB guard page.
130 subq sp, t0, sp
131
1322:
133
134#endif /* original_xxm */
135
136
|
71 /* 72 * SimOS. Stack pointer is start of a valid phys or KSEG page 73 */ 74 75 bis sp,sp,s0 /* save sp */ 76 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
|
149#ifdef original_xxm
150 # Add KSEG offset to the stack pointer
151 subq zero, 1, t0
152 sll t0, 42, t0
153 addq t0, sp, sp
154#endif
155
|
83 lda sp, -STARTFRM(sp) # Create a stack frame 84 stq ra, 0(sp) # Place return address on the stack 85 86 .mask 0x84000000, -8 87 .frame sp, STARTFRM, ra 88 89/* 90 * Enable the Floating Point Unit
--- 17 unchanged lines hidden (view full) ---
108 109/* 110 * The Debug Monitor should never return. 111 * However, just incase... 112 */ 113 ldgp gp, 0(ra) 114 bsr zero, _exit 115
|
189.end __start
|
116.end _start |
117 118 119 120 .globl _exit 121 .ent _exit, 0 122_exit: 123 124 ldq ra, 0(sp) # restore return address
--- 95 unchanged lines hidden --- |