| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: locore.s,v 1.151 2009/12/13 11:24:02 tsutsui Exp $ */ | | 1 | /* $NetBSD: locore.s,v 1.152 2009/12/13 12:21:26 tsutsui Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1980, 1990, 1993 | | 4 | * Copyright (c) 1980, 1990, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to Berkeley by | | 7 | * This code is derived from software contributed to Berkeley by |
8 | * the Systems Programming Group of the University of Utah Computer | | 8 | * the Systems Programming Group of the University of Utah Computer |
9 | * Science Department. | | 9 | * Science Department. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -195,27 +195,27 @@ Lhaveihpib: | | | @@ -195,27 +195,27 @@ Lhaveihpib: |
195 | RELOC(boothowto, %a0) | save reboot flags | | 195 | RELOC(boothowto, %a0) | save reboot flags |
196 | movl %d7,%a0@ | | 196 | movl %d7,%a0@ |
197 | RELOC(bootdev, %a0) | and boot device | | 197 | RELOC(bootdev, %a0) | and boot device |
198 | movl %d6,%a0@ | | 198 | movl %d6,%a0@ |
199 | | | 199 | |
200 | /* | | 200 | /* |
201 | * All data registers are now free. All address registers | | 201 | * All data registers are now free. All address registers |
202 | * except %a5 are free. %a5 is used by the RELOC() macro, | | 202 | * except %a5 are free. %a5 is used by the RELOC() macro, |
203 | * and cannot be used until after the MMU is enabled. | | 203 | * and cannot be used until after the MMU is enabled. |
204 | */ | | 204 | */ |
205 | | | 205 | |
206 | /* determine our CPU/MMU combo - check for all regardless of kernel config */ | | 206 | /* determine our CPU/MMU combo - check for all regardless of kernel config */ |
207 | movl #INTIOBASE+MMUBASE,%a1 | | 207 | movl #INTIOBASE+MMUBASE,%a1 |
208 | movl #0x200,%d0 | data freeze bit | | 208 | movl #DC_FREEZE,%d0 | data freeze bit |
209 | movc %d0,%cacr | only exists on 68030 | | 209 | movc %d0,%cacr | only exists on 68030 |
210 | movc %cacr,%d0 | read it back | | 210 | movc %cacr,%d0 | read it back |
211 | tstl %d0 | zero? | | 211 | tstl %d0 | zero? |
212 | jeq Lnot68030 | yes, we have 68020/68040 | | 212 | jeq Lnot68030 | yes, we have 68020/68040 |
213 | | | 213 | |
214 | /* | | 214 | /* |
215 | * 68030 models | | 215 | * 68030 models |
216 | */ | | 216 | */ |
217 | | | 217 | |
218 | RELOC(mmutype, %a0) | no, we have 68030 | | 218 | RELOC(mmutype, %a0) | no, we have 68030 |
219 | movl #MMU_68030,%a0@ | set to reflect 68030 PMMU | | 219 | movl #MMU_68030,%a0@ | set to reflect 68030 PMMU |
220 | RELOC(cputype, %a0) | | 220 | RELOC(cputype, %a0) |
221 | movl #CPU_68030,%a0@ | and 68030 CPU | | 221 | movl #CPU_68030,%a0@ | and 68030 CPU |
| @@ -518,27 +518,27 @@ Lhighcode: | | | @@ -518,27 +518,27 @@ Lhighcode: |
518 | moveq #0,%d0 | ensure TT regs are disabled | | 518 | moveq #0,%d0 | ensure TT regs are disabled |
519 | .long 0x4e7b0004 | movc %d0,%itt0 | | 519 | .long 0x4e7b0004 | movc %d0,%itt0 |
520 | .long 0x4e7b0005 | movc %d0,%itt1 | | 520 | .long 0x4e7b0005 | movc %d0,%itt1 |
521 | .long 0x4e7b0006 | movc %d0,%dtt0 | | 521 | .long 0x4e7b0006 | movc %d0,%dtt0 |
522 | .long 0x4e7b0007 | movc %d0,%dtt1 | | 522 | .long 0x4e7b0007 | movc %d0,%dtt1 |
523 | .word 0xf4d8 | cinva bc | | 523 | .word 0xf4d8 | cinva bc |
524 | .word 0xf518 | pflusha | | 524 | .word 0xf518 | pflusha |
525 | #if PGSHIFT == 13 | | 525 | #if PGSHIFT == 13 |
526 | movl #0xc000,%d0 | | 526 | movl #0xc000,%d0 |
527 | #else | | 527 | #else |
528 | movl #0x8000,%d0 | | 528 | movl #0x8000,%d0 |
529 | #endif | | 529 | #endif |
530 | .long 0x4e7b0003 | movc %d0,%tc | | 530 | .long 0x4e7b0003 | movc %d0,%tc |
531 | movl #0x80008000,%d0 | | 531 | movl #CACHE40_ON,%d0 |
532 | movc %d0,%cacr | turn on both caches | | 532 | movc %d0,%cacr | turn on both caches |
533 | jmp Lenab1:l | forced not be pc-relative | | 533 | jmp Lenab1:l | forced not be pc-relative |
534 | Lmotommu2: | | 534 | Lmotommu2: |
535 | movl #MMU_IEN+MMU_FPE,INTIOBASE+MMUBASE+MMUCMD | | 535 | movl #MMU_IEN+MMU_FPE,INTIOBASE+MMUBASE+MMUCMD |
536 | | enable 68881 and i-cache | | 536 | | enable 68881 and i-cache |
537 | RELOC(prototc, %a2) | | 537 | RELOC(prototc, %a2) |
538 | #if PGSHIFT == 13 | | 538 | #if PGSHIFT == 13 |
539 | movl #0x82d08b00,%a2@ | value to load TC with | | 539 | movl #0x82d08b00,%a2@ | value to load TC with |
540 | #else | | 540 | #else |
541 | movl #0x82c0aa00,%a2@ | value to load TC with | | 541 | movl #0x82c0aa00,%a2@ | value to load TC with |
542 | #endif | | 542 | #endif |
543 | pmove %a2@,%tc | load it | | 543 | pmove %a2@,%tc | load it |
544 | jmp Lenab1:l | forced not be pc-relative | | 544 | jmp Lenab1:l | forced not be pc-relative |