5 /* Detect CPU and FPU type */
11 lea %pc@(cpu_detect_trap_illg),%a1
12 move.l %a1,4*4.w /* illegal instruction */
13 lea %pc@(fpu_detect_trap_f),%a1
14 move.l %a1,11*4.w /* f-line */
17 bsr cpu_detect_fpu_asm
34 rts /* return to cpu_detect */
39 rts /* return to cpu_detect */
49 /* 68020+ or better */
50 move.l #0x00008000,%d0
51 /* enable 68040/060 code cache */
54 /* bit 15 still set? */
56 /* yes, it is 68040 or 68060 */
58 /* enable 68020/030 code cache and 68030 data cache */
65 /* data cache bit still set? */
67 bne.s 1f /* yes, it is 68030 */
70 bra cpu_detect_trap_illg
74 bra cpu_detect_trap_illg
80 /* data cache must be invalidated after reset */
82 /* set transparent translation registers,
83 * allow data caching only in 32-bit fast,
84 * code caching allowed everywhere */
86 move.l #0x0000e040,%d0
88 move.l #0x00ffe000,%d0
92 /* PCR is 68060 only */
98 /* rev5 or older 68060 revision
99 * enable I14 and I15 errata workaround
102 2: /* Also enables FPU */
105 move.l %d0,%a2@(4) // save PCR
107 cpu_detect_trap_illg:
108 move.l %a1,%sp /* remove exception stack frame */
109 rts /* return to cpu_detect() */