| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: locore.s,v 1.118 2014/07/31 14:41:19 isaki Exp $ */ | | 1 | /* $NetBSD: locore.s,v 1.119 2015/07/25 06:24:53 isaki Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1988 University of Utah. | | 4 | * Copyright (c) 1988 University of Utah. |
5 | * Copyright (c) 1980, 1990, 1993 | | 5 | * Copyright (c) 1980, 1990, 1993 |
6 | * The Regents of the University of California. All rights reserved. | | 6 | * The Regents of the University of California. All rights reserved. |
7 | * | | 7 | * |
8 | * This code is derived from software contributed to Berkeley by | | 8 | * This code is derived from software contributed to Berkeley by |
9 | * the Systems Programming Group of the University of Utah Computer | | 9 | * the Systems Programming Group of the University of Utah Computer |
10 | * Science Department. | | 10 | * Science Department. |
11 | * | | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | | 13 | * modification, are permitted provided that the following conditions |
14 | * are met: | | 14 | * are met: |
| @@ -352,27 +352,27 @@ Lenab1: | | | @@ -352,27 +352,27 @@ Lenab1: |
352 | movl %a1,%sp@- | | 352 | movl %a1,%sp@- |
353 | jbsr _C_LABEL(m68881_restore) | restore it (does not kill %a1) | | 353 | jbsr _C_LABEL(m68881_restore) | restore it (does not kill %a1) |
354 | addql #4,%sp | | 354 | addql #4,%sp |
355 | Lenab2: | | 355 | Lenab2: |
356 | cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? | | 356 | cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? |
357 | jeq Ltbia040 | yes, cache already on | | 357 | jeq Ltbia040 | yes, cache already on |
358 | pflusha | | 358 | pflusha |
359 | tstl _C_LABEL(mmutype) | | 359 | tstl _C_LABEL(mmutype) |
360 | jpl Lenab3 | 68851 implies no d-cache | | 360 | jpl Lenab3 | 68851 implies no d-cache |
361 | movl #CACHE_ON,%d0 | | 361 | movl #CACHE_ON,%d0 |
362 | movc %d0,%cacr | clear cache(s) | | 362 | movc %d0,%cacr | clear cache(s) |
363 | jra Lenab3 | | 363 | jra Lenab3 |
364 | Ltbia040: | | 364 | Ltbia040: |
365 | .word 0xf518 | | 365 | .word 0xf518 | pflusha |
366 | Lenab3: | | 366 | Lenab3: |
367 | /* final setup for C code */ | | 367 | /* final setup for C code */ |
368 | movl %d7,_C_LABEL(boothowto) | save reboot flags | | 368 | movl %d7,_C_LABEL(boothowto) | save reboot flags |
369 | movl %d6,_C_LABEL(bootdev) | and boot device | | 369 | movl %d6,_C_LABEL(bootdev) | and boot device |
370 | jbsr _C_LABEL(x68k_init) | additional pre-main initialization | | 370 | jbsr _C_LABEL(x68k_init) | additional pre-main initialization |
371 | | | 371 | |
372 | /* | | 372 | /* |
373 | * Create a fake exception frame so that cpu_lwp_fork() can copy it. | | 373 | * Create a fake exception frame so that cpu_lwp_fork() can copy it. |
374 | * main() nevers returns; we exit to user mode from a forked process | | 374 | * main() nevers returns; we exit to user mode from a forked process |
375 | * later on. | | 375 | * later on. |
376 | */ | | 376 | */ |
377 | clrw %sp@- | vector offset/frame type | | 377 | clrw %sp@- | vector offset/frame type |
378 | clrl %sp@- | PC - filled in by "execve" | | 378 | clrl %sp@- | PC - filled in by "execve" |