Rev 1381 | Rev 1479 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1381 | Rev 1478 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | # |
27 | # |
28 | 28 | ||
29 | #include "asm.h" |
29 | #include "asm.h" |
30 | #include "regname.h" |
30 | #include "regname.h" |
- | 31 | #include "debug.inc" |
|
31 | 32 | ||
32 | .text |
33 | .text |
33 | 34 | ||
34 | .global halt |
35 | .global halt |
35 | .global memcpy |
36 | .global memcpy |
Line 106... | Line 107... | ||
106 | # r3 = bootinfo (pa) |
107 | # r3 = bootinfo (pa) |
107 | # r4 = bootinfo_size |
108 | # r4 = bootinfo_size |
108 | # r5 = trans (pa) |
109 | # r5 = trans (pa) |
109 | # r6 = bytes to copy |
110 | # r6 = bytes to copy |
110 | # r7 = real_mode (pa) |
111 | # r7 = real_mode (pa) |
- | 112 | # r8 = framebuffer (pa) |
|
- | 113 | # r9 = scanline |
|
111 | 114 | ||
112 | # disable interrupts |
115 | # disable interrupts |
113 | 116 | ||
114 | mfmsr r31 |
117 | mfmsr r31 |
115 | rlwinm r31, r31, 0, 17, 15 |
118 | rlwinm r31, r31, 0, 17, 15 |
Line 121... | Line 124... | ||
121 | 124 | ||
122 | # jumps to real_mode |
125 | # jumps to real_mode |
123 | 126 | ||
124 | mfmsr r31 |
127 | mfmsr r31 |
125 | lis r30, ~0@h |
128 | lis r30, ~0@h |
126 | ori r30, r30, ~(msr_ir | msr_dr)@l |
129 | ori r30, r30, ~(msr_ir | msr_dr | msr_ee)@l |
127 | and r31, r31, r30 |
130 | and r31, r31, r30 |
128 | mtspr srr1, r31 |
131 | mtspr srr1, r31 |
129 | 132 | ||
130 | sync |
133 | sync |
131 | isync |
134 | isync |
Line 135... | Line 138... | ||
135 | .align PAGE_WIDTH |
138 | .align PAGE_WIDTH |
136 | .global real_mode |
139 | .global real_mode |
137 | 140 | ||
138 | real_mode: |
141 | real_mode: |
139 | 142 | ||
- | 143 | DEBUG_real_mode |
|
- | 144 | ||
140 | # copy kernel to proper location |
145 | # copy kernel to proper location |
141 | # |
146 | # |
142 | # r5 = trans (pa) |
147 | # r5 = trans (pa) |
143 | # r6 = bytes to copy |
148 | # r6 = bytes to copy |
- | 149 | # r8 = framebuffer (pa) |
|
- | 150 | # r9 = scanline |
|
144 | 151 | ||
145 | li r31, PAGE_SIZE >> 2 |
152 | li r31, PAGE_SIZE >> 2 |
146 | li r30, 0 |
153 | li r30, 0 |
147 | 154 | ||
148 | page_copy: |
155 | page_copy: |
Line 249... | Line 256... | ||
249 | ori r31, r31, (msr_ir | msr_dr)@l |
256 | ori r31, r31, (msr_ir | msr_dr)@l |
250 | mtspr srr1, r31 |
257 | mtspr srr1, r31 |
251 | 258 | ||
252 | sync |
259 | sync |
253 | isync |
260 | isync |
- | 261 | ||
- | 262 | DEBUG_rfi |
|
254 | rfi |
263 | rfi |
255 | 264 | ||
256 | .align PAGE_WIDTH |
265 | .align PAGE_WIDTH |
257 | .global trans |
266 | .global trans |
258 | trans: |
267 | trans: |