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, 68060 or 68080 */
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
75 /* 68040, 68060, or 68080 */
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 or 68080 only */
95 /* Apollo 68080 has PCR ID 0x0440xxxx */
104 /* rev5 or older 68060 revision
105 * enable I14 and I15 errata workaround
109 2: /* Apollo 68080 */
111 move.l %d0,%a2@(4) // save PCR
113 bra.s cpu_detect_trap_illg
114 3: /* Also enables FPU */
117 move.l %d0,%a2@(4) // save PCR
120 cpu_detect_trap_illg:
121 move.l %a1,%sp /* remove exception stack frame */
122 rts /* return to cpu_detect() */