id stringlengths 22 129 | text stringlengths 60 19.5k | arch stringclasses 9
values | syntax stringclasses 5
values | kind stringclasses 4
values | repo stringclasses 32
values | path stringlengths 7 108 | license stringclasses 10
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 15
values | source_url stringlengths 85 192 | line_start int64 1 5.48k | line_end int64 4 5.5k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | movsl %d0,%a0@+ | put lword
nop | sync
movl %a1@+,%d0 | get lword
movsl %d0,%a0@+ | put lword
nop | sync
movl %a1@+,%d0 | get lword
movsl %d0,%a0@+ | put lword
nop | sync
movl %a1@+,%d0 | get lword
movsl %d0,%a0@+ | put lword
nop | sync
moveq #0,%d0 | indicate no fault
jra Lsldone
Lsler... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | fd89440ac6bfc9214810e1056f80b69c2878b7ba | github | kernel | https://github.com/NetBSD/src/blob/fd89440ac6bfc9214810e1056f80b69c2878b7ba/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:21 | pmove %sp@,%tc | disable MMU
Ldoreboot1:
moveml 0x00ff0000,#0x0101 | get RESET vectors in ROM
| (d0: ssp, a0: pc)
moveml #0x0101,%a1@ | put them at 0x0000 (for Xellent30)
movc %a1,%vbr | reset Vector Base Register
jmp %a0@ | reboot X680x0
Lebootcode:
/*
* Misc. global variables.
*/
.data
GLOBAL(mmutyp... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | fd89440ac6bfc9214810e1056f80b69c2878b7ba | github | kernel | https://github.com/NetBSD/src/blob/fd89440ac6bfc9214810e1056f80b69c2878b7ba/sys/arch/x68k/x68k/locore.s | 801 | 857 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | * Handles all other FP coprocessor exceptions.
* Note that since some FP exceptions generate mid-instruction frames
* and may cause signal delivery, we need to test for stack adjustment
* after the trap call.
*/
ENTRY_NOPROFILE(fpfault)
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save user registers... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c | github | kernel | https://github.com/NetBSD/src/blob/9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c/sys/arch/x68k/x68k/locore.s | 441 | 500 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:13 | jbsr _C_LABEL(straytrap) | report
addql #8,%sp | pop args
moveml %sp@+,#0x0303 | restore regs
jra _ASM_LABEL(rei) | all done
ENTRY_NOPROFILE(trap0)
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save user registers
movl %usp,%a0 | save the user SP
movl %a0,%sp@(FR_SP) | in the savearea
movl ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c | github | kernel | https://github.com/NetBSD/src/blob/9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c/sys/arch/x68k/x68k/locore.s | 481 | 540 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:18 | ENTRY_NOPROFILE(lev7intr)
addql #1,_C_LABEL(intr_depth)
addql #1,_C_LABEL(intrcnt)+28
clrl %sp@-
moveml #0xFFFF,%sp@- | save registers
movl %usp,%a0 | and save
movl %a0,%sp@(FR_SP) | the user stack pointer
jbsr _C_LABEL(nmihand) | call handler
movl %sp@(FR_SP),%a0 | restore
movl %a0,%usp | user SP
mo... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c | github | kernel | https://github.com/NetBSD/src/blob/9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c/sys/arch/x68k/x68k/locore.s | 681 | 740 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | 1:
btst #5,%sp@ | yes, are we returning to user mode?
beq 2f | no, done
rte
2:
movw #PSL_LOWIPL,%sr | lower SPL
clrl %sp@- | stack adjust
moveml #0xFFFF,%sp@- | save all registers
movl %usp,%a1 | including
movl %a1,%sp@(FR_SP) | the users SP
Lrei:
clrl %sp@- | VA == none
clrl %sp@- | code == ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c | github | kernel | https://github.com/NetBSD/src/blob/9a0dbd044da39c7df3a3ef7bf2d3ebc8cfae0f6c/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:10 | movc %d0,%cacr | clear cache(s)
jra Lenab3
Ltbia040:
.word 0xf518 | pflusha
Lenab3:
/* final setup for C code */
movl %d7,%sp@- | push nextpa saved above
jbsr _C_LABEL(x68k_init) | additional pre-main initialization
addql #4,%sp
/*
* Create a fake exception frame so that cpu_lwp_fork() can copy it.
* main()... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 361 | 420 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:11 | cmpw #0x202c,%sp@(6) | format type 2?
jne _C_LABEL(illinst) | no, not an FP emulation
#ifdef FPSP
jmp _ASM_LABEL(fpsp_unimp) | yes, go handle it
#else
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULI,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#endif
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 401 | 460 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | #else
jra _C_LABEL(illinst)
#endif
/*
* Handles all other FP coprocessor exceptions.
* Note that since some FP exceptions generate mid-instruction frames
* and may cause signal delivery, we need to test for stack adjustment
* after the trap call.
*/
ENTRY_NOPROFILE(fpfault)
clrl %sp@- | stack adjust count
mo... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 441 | 500 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:13 | ENTRY_NOPROFILE(badtrap)
moveml #0xC0C0,%sp@- | save scratch regs
movw %sp@(22),%sp@- | push exception vector info
clrw %sp@-
movl %sp@(22),%sp@- | and PC
jbsr _C_LABEL(straytrap) | report
addql #8,%sp | pop args
moveml %sp@+,#0x0303 | restore regs
jra _ASM_LABEL(rei) | all done
ENTRY_NOPROFILE(trap0)
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 481 | 540 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:16 | movl %a2,%sp@- | push frame ptr
movl %d2,%sp@- | push trap type
jbsr _C_LABEL(kdb_trap) | handle the trap
addql #8,%sp | pop args
#if 0 /* not needed on hp300 */
cmpl #0,%d0 | did ddb handle it?
jne Lbrkpt3 | yes, done
#endif
#endif
/* Sun 3 drops into PROM here. */
Lbrkpt3:
| The stack pointer may have ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 601 | 660 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:18 | CPUINFO_INCREMENT(CI_NINTR) | chalk up another interrupt
INTERRUPT_RESTOREREG | restore scratch registers
subql #1,_C_LABEL(intr_depth)
jra _ASM_LABEL(rei) | all done
ENTRY_NOPROFILE(lev7intr)
addql #1,_C_LABEL(intr_depth)
addql #1,_C_LABEL(intrcnt)+28
clrl %sp@-
moveml #0xFFFF,%sp@- | save registers
movl %... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 681 | 740 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | ASENTRY_NOPROFILE(rei)
tstl _C_LABEL(astpending) | AST pending?
jne 1f | no, done
rte
1:
btst #5,%sp@ | yes, are we returning to user mode?
beq 2f | no, done
rte
2:
movw #PSL_LOWIPL,%sr | lower SPL
clrl %sp@- | stack adjust
moveml #0xFFFF,%sp@- | save all registers
movl %usp,%a1 | including
movl %... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:20 | /*
* Primitives
*/
/*
* Use common m68k process/lwp switch and context save subroutines.
*/
#define FPCOPROC /* XXX: Temp. reqd. */
#include <m68k/m68k/switch_subr.s>
#if defined(M68040) || defined(M68060)
ENTRY(suline)
movl %sp@(4),%a0 | address to write
movl _C_LABEL(curpcb),%a1 | current pcb
movl #Lslerr,... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 761 | 820 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:21 | ENTRY(ecacheon)
rts
ENTRY(ecacheoff)
rts
/*
* _delay(u_int N)
*
* Delay for at least N microseconds.
* This routine depends on the variable: delay_divisor
* which should be set based on the CPU clock rate.
*/
ENTRY_NOPROFILE(_delay)
| %d0 = (usecs * a certain magnification factor)
movl %sp@(4),%d0
lsll #8... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 801 | 860 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:22 | jne Ldoboot0 | no, skip
.word 0xf4f8 | cpusha bc - push and invalidate caches
nop
movl #CACHE40_OFF,%d0
Ldoboot0:
#endif
movc %d0,%cacr | disable on-chip cache(s)
| ok, turn off MMU..
Ldoreboot:
#if defined(M68040) || defined(M68060)
tstl %d2 | 68040?
jne LmotommuF | no, skip
movc %a1,%cacr | caches of... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 841 | 900 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:23 | .long EC_NONE | external cache type, default to none
#endif
GLOBAL(fputype)
.long FPU_NONE
GLOBAL(intiobase)
.long 0 | KVA of base of internal IO space
#ifdef DEBUG
ASGLOBAL(fulltflush)
.long 0
ASGLOBAL(fullcflush)
.long 0
#endif
/* interrupt counters */
GLOBAL(intrnames)
.asciz "spur"
.asciz "lev1"
.a... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 7a50df7f13f44282c494a158ccac105d4d8e3c64 | github | kernel | https://github.com/NetBSD/src/blob/7a50df7f13f44282c494a158ccac105d4d8e3c64/sys/arch/x68k/x68k/locore.s | 881 | 916 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:10 | movc %d0,%cacr | clear cache(s)
jra Lenab3
Ltbia040:
.word 0xf518 | pflusha
Lenab3:
/* final setup for C code */
movl %d7,%sp@- | push nextpa saved above
jbsr _C_LABEL(x68k_init) | additional pre-main initialization
addql #4,%sp
/*
* Create a fake exception frame so that cpu_lwp_fork() can copy it.
* main()... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 361 | 420 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:11 | */
ENTRY_NOPROFILE(fpfline)
#if defined(M68040)
cmpl #FPU_68040,_C_LABEL(fputype) | 68040 FPU?
jne Lfp_unimp | no, skip FPSP
cmpw #0x202c,%sp@(6) | format type 2?
jne _C_LABEL(illinst) | no, not an FP emulation
#ifdef FPSP
jmp _ASM_LABEL(fpsp_unimp) | yes, go handle it
#else
clrl %sp@- | stack adjust count
m... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 401 | 460 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | #ifdef FPU_EMULATE
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULD,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#else
jra _C_LABEL(illinst)
#endif
/*
* Handles all other FP coprocessor exceptions.
* Note that since some FP exceptions generate mid-ins... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 441 | 500 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:13 | /*
* Other exceptions only cause four and six word stack frame and require
* no post-trap stack adjustment.
*/
ENTRY_NOPROFILE(badtrap)
moveml #0xC0C0,%sp@- | save scratch regs
movw %sp@(22),%sp@- | push exception vector info
clrw %sp@-
movl %sp@(22),%sp@- | and PC
jbsr _C_LABEL(straytrap) | report
addql #... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 481 | 540 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:14 | movl %a1,%sp@- | push addr
movl %d0,%sp@- | push command
jbsr _C_LABEL(cachectl1) | do it
lea %sp@(16),%sp | pop args
jra _ASM_LABEL(rei) | all done
/*
* Trace (single-step) trap. Kernel-mode is special.
* User mode traps are simply passed on to trap().
*/
ENTRY_NOPROFILE(trace)
clrl %sp@- | stack adjus... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 521 | 580 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:15 | jne Lkbrkpt | yes, kernel breakpoint
jra _ASM_LABEL(fault) | no, user-mode fault
Lkbrkpt: | Kernel-mode breakpoint or trace trap. (%d0=trap_type)
| Save the system sp rather than the user sp.
movw #PSL_HIGHIPL,%sr | lock out interrupts
lea %sp@(FR_SIZE),%a6 | Save stack pointer
movl %a6,%sp@(FR_SP) | from bef... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 561 | 620 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:16 | cmpl #0,%d0 | did kgdb handle it?
jne Lbrkpt3 | yes, done
#endif
#ifdef DDB
| Let DDB handle it
movl %a2,%sp@- | push frame ptr
movl %d2,%sp@- | push trap type
jbsr _C_LABEL(kdb_trap) | handle the trap
addql #8,%sp | pop args
#if 0 /* not needed on hp300 */
cmpl #0,%d0 | did ddb handle it?
jne Lbrkpt3... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 601 | 660 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:17 | rte | XXX mfpcure (x680x0 hardware bug)
ENTRY_NOPROFILE(kbdtimer)
rte
ENTRY_NOPROFILE(intiotrap)
addql #1,_C_LABEL(intr_depth)
INTERRUPT_SAVEREG
pea %sp@(16-(FR_HW)) | XXX
jbsr _C_LABEL(intio_intr)
addql #4,%sp
CPUINFO_INCREMENT(CI_NINTR)
INTERRUPT_RESTOREREG
subql #1,_C_LABEL(intr_depth)
jra rei
ENTRY_... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 641 | 700 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:18 | INTERRUPT_SAVEREG | save scratch registers
addql #1,_C_LABEL(intrcnt)+32 | count hardclock interrupts
movl %sp,%sp@- | push pointer to clockframe
jbsr _C_LABEL(hardclock) | hardclock(&frame)
addql #4,%sp
CPUINFO_INCREMENT(CI_NINTR) | chalk up another interrupt
INTERRUPT_RESTOREREG | restore scratch registers
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 681 | 740 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | * drop the IPL to allow device interrupts.
*
* This code is complicated by the fact that sendsig may have been called
* necessitating a stack cleanup.
*/
ASENTRY_NOPROFILE(rei)
tstl _C_LABEL(astpending) | AST pending?
jne 1f | no, done
rte
1:
btst #5,%sp@ | yes, are we returning to user mode?
beq 2f | n... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:20 | movl %a1@-,%a0@- | 8 bytes
movl %a0,%sp@(FR_SP) | new SSP
moveml %sp@+,#0x7FFF | restore user registers
movl %sp@,%sp | and our SP
rte | and do real RTE
/*
* Primitives
*/
/*
* Use common m68k process/lwp switch and context save subroutines.
*/
#define FPCOPROC /* XXX: Temp. reqd. */
#include <m68k/m6... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 761 | 820 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:21 | movl _C_LABEL(curpcb),%a1 | current pcb
clrl %a1@(PCB_ONFAULT) | clear fault address
rts
#endif
ENTRY(ecacheon)
rts
ENTRY(ecacheoff)
rts
/*
* _delay(u_int N)
*
* Delay for at least N microseconds.
* This routine depends on the variable: delay_divisor
* which should be set based on the CPU clock rate.
*/
E... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 801 | 860 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:22 | movl #CACHE_OFF,%d0
#if defined(M68040) || defined(M68060)
movl _C_LABEL(mmutype),%d2 | d2 = mmutype
addl #(-1 * MMU_68040),%d2 | 68040?
jne Ldoboot0 | no, skip
.word 0xf4f8 | cpusha bc - push and invalidate caches
nop
movl #CACHE40_OFF,%d0
Ldoboot0:
#endif
movc %d0,%cacr | disable on-chip cache(s)
| ok, ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 841 | 900 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:23 | GLOBAL(cputype)
.long CPU_68030 | default to 68030 CPU
#ifdef M68K_MMU_HP
GLOBAL(ectype)
.long EC_NONE | external cache type, default to none
#endif
GLOBAL(fputype)
.long FPU_NONE
GLOBAL(intiobase)
.long 0 | KVA of base of internal IO space
#ifdef DEBUG
ASGLOBAL(fulltflush)
.long 0
ASGLOBAL(fullcflush)
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ab5a968c9363a9f91a0b33e6164748e9b17903c1 | github | kernel | https://github.com/NetBSD/src/blob/ab5a968c9363a9f91a0b33e6164748e9b17903c1/sys/arch/x68k/x68k/locore.s | 881 | 921 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:6 | #if defined(M68060)
cmpl #CPU_68060,%a0@ | 68060?
jne 1f
movl #_C_LABEL(buserr60),%a2@(8)
movl #_C_LABEL(addrerr4060),%a2@(12)
jra Lstart2
1:
#endif
#if defined(M68040)
cmpl #CPU_68040,%a0@ | 68040?
jne 1f
movl #_C_LABEL(buserr40),%a2@(8)
movl #_C_LABEL(addrerr4060),%a2@(12)
jra Lstart2
1:
#endif
#if define... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 201 | 260 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:7 | RELOC(esym,%a0) | end of static kernel test/data/syms
movl %a0@,%a4
tstl %a4
jne Lstart3
#endif
movl #_C_LABEL(end),%a4 | end of static kernel text/data
Lstart3:
RELOC(setmemrange,%a0) | call setmemrange()
jbsr %a0@ | to probe all memory regions
addl %a5,%a4 | convert to PA
pea %a5@ | reloff
pea %a4@... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 241 | 300 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:8 | Lstploaddone:
RELOC(mmutype, %a0)
cmpl #MMU_68040,%a0@ | 68040?
jne Lmotommu2 | no, skip
#include "opt_jupiter.h"
#ifdef JUPITER
/* JUPITER-X: set system register "SUPER" bit */
movl #0x0200a240,%d0 | translate DRAM area transparently
.long 0x4e7b0006 | movc d0,dtt0
lea 0x00c00000,%a0 | %a0: graphic VRAM
l... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 281 | 340 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:9 | movc %d0,%cacr | enable store buffer, both caches
jmp Lenab1
Lnot060cache:
#endif
movl #CACHE40_ON,%d0
movc %d0,%cacr | turn on both caches
jmp Lenab1
Lmotommu2:
pflusha
movl #MMU51_TCR_BITS,%sp@- | value to load TC with
pmove %sp@,%tc | load it
/*
* Should be running mapped from this point on
*/
Lenab1:
/... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 321 | 380 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:10 | pflusha
tstl _C_LABEL(mmutype)
jpl Lenab3 | 68851 implies no d-cache
movl #CACHE_ON,%d0
movc %d0,%cacr | clear cache(s)
jra Lenab3
Ltbia040:
.word 0xf518 | pflusha
Lenab3:
/* final setup for C code */
movl %d7,%sp@- | push nextpa saved above
jbsr _C_LABEL(x68k_init) | additional pre-main initialization
a... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 361 | 420 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:11 | #include <m68k/m68k/busaddrerr.s>
/*
* FP exceptions.
*/
ENTRY_NOPROFILE(fpfline)
#if defined(M68040)
cmpl #FPU_68040,_C_LABEL(fputype) | 68040 FPU?
jne Lfp_unimp | no, skip FPSP
cmpw #0x202c,%sp@(6) | format type 2?
jne _C_LABEL(illinst) | no, not an FP emulation
#ifdef FPSP
jmp _ASM_LABEL(fpsp_unimp) | yes,... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 401 | 460 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | jra _ASM_LABEL(fault) | do it
#endif /* M68040 */
Lfp_unsupp:
#endif
#ifdef FPU_EMULATE
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULD,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#else
jra _C_LABEL(illinst)
#endif
/*
* Handles all other FP coprocess... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 441 | 500 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:13 | frestore %a0@ | restore state
movl #T_FPERR,%sp@- | push type arg
jra _ASM_LABEL(faultstkadj) | call trap and deal with stack cleanup
/*
* Other exceptions only cause four and six word stack frame and require
* no post-trap stack adjustment.
*/
ENTRY_NOPROFILE(badtrap)
moveml #0xC0C0,%sp@- | save scratch re... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 481 | 540 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:18 | jra _ASM_LABEL(rei)
ENTRY_NOPROFILE(timertrap)
addql #1,_C_LABEL(intr_depth)
INTERRUPT_SAVEREG | save scratch registers
addql #1,_C_LABEL(intrcnt)+32 | count hardclock interrupts
movl %sp,%sp@- | push pointer to clockframe
jbsr _C_LABEL(hardclock) | hardclock(&frame)
addql #4,%sp
CPUINFO_INCREMENT(CI_NINTR) |... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 681 | 740 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | * (profiling, scheduling) and software interrupts (network, softclock).
* We check for ASTs first, just like the VAX. To avoid excess overhead
* the T_ASTFLT handling code will also check for software interrupts so we
* do not have to do it here. After identifying that we need an AST we
* drop the IPL to allow de... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:20 | addql #8,%a1 | source pointer
movl %a1,%a0 | source
addw %d0,%a0 | + hole size = dest pointer
movl %a1@-,%a0@- | copy
movl %a1@-,%a0@- | 8 bytes
movl %a0,%sp@(FR_SP) | new SSP
moveml %sp@+,#0x7FFF | restore user registers
movl %sp@,%sp | and our SP
rte | and do real RTE
/*
* Primitives
*/
/*... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 761 | 820 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:21 | jra Lsldone
Lslerr:
moveq #-1,%d0
Lsldone:
movl _C_LABEL(curpcb),%a1 | current pcb
clrl %a1@(PCB_ONFAULT) | clear fault address
rts
#endif
ENTRY(ecacheon)
rts
ENTRY(ecacheoff)
rts
/*
* _delay(u_int N)
*
* Delay for at least N microseconds.
* This routine depends on the variable: delay_divisor
* which sho... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 801 | 860 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:22 | */
ENTRY_NOPROFILE(doboot)
movw #PSL_HIGHIPL,%sr | cut off any interrupts
subal %a1,%a1 | a1 = 0
movl #CACHE_OFF,%d0
#if defined(M68040) || defined(M68060)
movl _C_LABEL(mmutype),%d2 | d2 = mmutype
addl #(-1 * MMU_68040),%d2 | 68040?
jne Ldoboot0 | no, skip
.word 0xf4f8 | cpusha bc - push and invalidate c... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 841 | 900 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:23 | .data
GLOBAL(mmutype)
.long MMU_68030 | default to 030 internal MMU
GLOBAL(cputype)
.long CPU_68030 | default to 68030 CPU
#ifdef M68K_MMU_HP
GLOBAL(ectype)
.long EC_NONE | external cache type, default to none
#endif
GLOBAL(fputype)
.long FPU_NONE
GLOBAL(intiobase)
.long 0 | KVA of base of internal IO sp... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d67329d102f9717016fd1a5e0c7addc3ffc73045 | github | kernel | https://github.com/NetBSD/src/blob/d67329d102f9717016fd1a5e0c7addc3ffc73045/sys/arch/x68k/x68k/locore.s | 881 | 925 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:6 | #if defined(M68060)
cmpl #CPU_68060,%a0@ | 68060?
jne 1f
movl #_C_LABEL(buserr60),%a2@(8)
movl #_C_LABEL(addrerr4060),%a2@(12)
jra Lstart2
1:
#endif
#if defined(M68040)
cmpl #CPU_68040,%a0@ | 68040?
jne 1f
movl #_C_LABEL(buserr40),%a2@(8)
movl #_C_LABEL(addrerr4060),%a2@(12)
jra Lstart2
1:
#endif
#if define... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 201 | 260 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:7 | RELOC(esym,%a0) | end of static kernel test/data/syms
movl %a0@,%a4
jne Lstart3
#endif
movl #_C_LABEL(end),%a4 | end of static kernel text/data
Lstart3:
RELOC(setmemrange,%a0) | call setmemrange()
jbsr %a0@ | to probe all memory regions
addl %a5,%a4 | convert to PA
pea %a5@ | reloff
pea %a4@ | nextp... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 241 | 300 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:8 | RELOC(mmutype, %a0)
cmpl #MMU_68040,%a0@ | 68040?
jne Lmotommu2 | no, skip
#include "opt_jupiter.h"
#ifdef JUPITER
/* JUPITER-X: set system register "SUPER" bit */
movl #0x0200a240,%d0 | translate DRAM area transparently
.long 0x4e7b0006 | movc d0,dtt0
lea 0x00c00000,%a0 | %a0: graphic VRAM
lea 0x02c00000,%... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 281 | 340 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:9 | jmp Lenab1
Lnot060cache:
#endif
movl #CACHE40_ON,%d0
movc %d0,%cacr | turn on both caches
jmp Lenab1
Lmotommu2:
pflusha
movl #MMU51_TCR_BITS,%sp@- | value to load TC with
pmove %sp@,%tc | load it
/*
* Should be running mapped from this point on
*/
Lenab1:
/* set vector base in virtual address */
movl #_C_LA... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 321 | 380 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:10 | tstl _C_LABEL(mmutype)
jpl Lenab3 | 68851 implies no d-cache
movl #CACHE_ON,%d0
movc %d0,%cacr | clear cache(s)
jra Lenab3
Ltbia040:
.word 0xf518 | pflusha
Lenab3:
/* final setup for C code */
movl %d7,%sp@- | push nextpa saved above
jbsr _C_LABEL(x68k_init) | additional pre-main initialization
addql #4,%... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 361 | 420 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:11 | /*
* FP exceptions.
*/
ENTRY_NOPROFILE(fpfline)
#if defined(M68040)
cmpl #FPU_68040,_C_LABEL(fputype) | 68040 FPU?
jne Lfp_unimp | no, skip FPSP
cmpw #0x202c,%sp@(6) | format type 2?
jne _C_LABEL(illinst) | no, not an FP emulation
#ifdef FPSP
jmp _ASM_LABEL(fpsp_unimp) | yes, go handle it
#else
clrl %sp@- |... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 401 | 460 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | #endif /* M68040 */
Lfp_unsupp:
#endif
#ifdef FPU_EMULATE
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULD,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#else
jra _C_LABEL(illinst)
#endif
/*
* Handles all other FP coprocessor exceptions.
* Note that si... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 441 | 500 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:18 | ENTRY_NOPROFILE(timertrap)
addql #1,_C_LABEL(intr_depth)
INTERRUPT_SAVEREG | save scratch registers
addql #1,_C_LABEL(intrcnt)+32 | count hardclock interrupts
movl %sp,%sp@- | push pointer to clockframe
jbsr _C_LABEL(hardclock) | hardclock(&frame)
addql #4,%sp
CPUINFO_INCREMENT(CI_NINTR) | chalk up another int... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 681 | 740 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | * We check for ASTs first, just like the VAX. To avoid excess overhead
* the T_ASTFLT handling code will also check for software interrupts so we
* do not have to do it here. After identifying that we need an AST we
* drop the IPL to allow device interrupts.
*
* This code is complicated by the fact that sendsig ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:20 | movl %a1,%a0 | source
addw %d0,%a0 | + hole size = dest pointer
movl %a1@-,%a0@- | copy
movl %a1@-,%a0@- | 8 bytes
movl %a0,%sp@(FR_SP) | new SSP
moveml %sp@+,#0x7FFF | restore user registers
movl %sp@,%sp | and our SP
rte | and do real RTE
/*
* Primitives
*/
/*
* Use common m68k process/lwp s... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 761 | 820 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:21 | Lslerr:
moveq #-1,%d0
Lsldone:
movl _C_LABEL(curpcb),%a1 | current pcb
clrl %a1@(PCB_ONFAULT) | clear fault address
rts
#endif
ENTRY(ecacheon)
rts
ENTRY(ecacheoff)
rts
/*
* _delay(u_int N)
*
* Delay for at least N microseconds.
* This routine depends on the variable: delay_divisor
* which should be set b... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 801 | 860 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:22 | ENTRY_NOPROFILE(doboot)
movw #PSL_HIGHIPL,%sr | cut off any interrupts
subal %a1,%a1 | a1 = 0
movl #CACHE_OFF,%d0
#if defined(M68040) || defined(M68060)
movl _C_LABEL(mmutype),%d2 | d2 = mmutype
addl #(-1 * MMU_68040),%d2 | 68040?
jne Ldoboot0 | no, skip
.word 0xf4f8 | cpusha bc - push and invalidate cach... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 841 | 900 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:23 | GLOBAL(mmutype)
.long MMU_68030 | default to 030 internal MMU
GLOBAL(cputype)
.long CPU_68030 | default to 68030 CPU
#ifdef M68K_MMU_HP
GLOBAL(ectype)
.long EC_NONE | external cache type, default to none
#endif
GLOBAL(fputype)
.long FPU_NONE
GLOBAL(intiobase)
.long 0 | KVA of base of internal IO space
#... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | aa7d124a43e8b25480980dbdbfefa4d65503bf1c | github | kernel | https://github.com/NetBSD/src/blob/aa7d124a43e8b25480980dbdbfefa4d65503bf1c/sys/arch/x68k/x68k/locore.s | 881 | 924 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:22 | ENTRY_NOPROFILE(doboot)
movw #PSL_HIGHIPL,%sr | cut off any interrupts
subal %a1,%a1 | a1 = 0
movl #CACHE_OFF,%d0
#if defined(M68040) || defined(M68060)
movl _C_LABEL(mmutype),%d2 | d2 = mmutype
addl #(-1 * MMU_68040),%d2 | 68040?
jne Ldoboot0 | no, skip
.word 0xf4f8 | cpusha bc - push and invalidate cach... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 510509048e02d9da14a9858885ea138b39de92a1 | github | kernel | https://github.com/NetBSD/src/blob/510509048e02d9da14a9858885ea138b39de92a1/sys/arch/x68k/x68k/locore.s | 841 | 900 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:23 | GLOBAL(mmutype)
.long MMU_68030 | default to 030 internal MMU
GLOBAL(cputype)
.long CPU_68030 | default to 68030 CPU
#ifdef M68K_MMU_HP
GLOBAL(ectype)
.long EC_NONE | external cache type, default to none
#endif
GLOBAL(fputype)
.long FPU_NONE
GLOBAL(intiobase)
.long 0 | KVA of base of internal IO space
G... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 510509048e02d9da14a9858885ea138b39de92a1 | github | kernel | https://github.com/NetBSD/src/blob/510509048e02d9da14a9858885ea138b39de92a1/sys/arch/x68k/x68k/locore.s | 881 | 927 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:3 | * table and is hence at 0x400 (see reset vector in vectors.s).
*/
PANIC("kernel jump to zero")
/* NOTREACHED */
/*
* Macro to relocate a symbol, used before MMU is enabled.
*/
#define _RELOC(var, ar) \
lea var,ar; \
addl %a5,ar
#define RELOC(var, ar) _RELOC(_C_LABEL(var), ar)
#define ASRELOC(var, ar) _REL... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 81 | 140 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:4 | RELOC(vectab,%a0) | set Vector Base Register temporarily
movc %a0,%vbr
#if 0 /* XXX this should be done by the boot loader */
RELOC(edata, %a0) | clear out BSS
movl #_C_LABEL(end)-4,%d0 | (must be <= 256 kB)
subl #_C_LABEL(edata),%d0
lsrl #2,%d0
1: clrl %a0@+
dbra %d0,1b
#endif
ASRELOC(tmpstk, %a0)
movl %a0... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 121 | 180 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:5 | moveq #0,%d0 | now turn it back off
movec %d0,%cacr | before we access any data
.word 0xf4d8 | cinva bc - invalidate caches XXX
bset #30,%d0 | data cache no allocate mode bit
movc %d0,%cacr | only exists on 68060
movc %cacr,%d0 | read it back
tstl %d0 | zero?
jeq Lis68040 | yes, we have 68040
RE... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 161 | 220 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:6 | jra Lstart2
1:
#endif
#if defined(M68040)
cmpl #CPU_68040,%a0@ | 68040?
jne 1f
movl #_C_LABEL(buserr40),%a2@(8)
movl #_C_LABEL(addrerr4060),%a2@(12)
jra Lstart2
1:
#endif
#if defined(M68030)
movl #_C_LABEL(busaddrerr2030),%a2@(8)
movl #_C_LABEL(busaddrerr2030),%a2@(12)
#endif
Lstart2:
/* initialize source/dest... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 201 | 260 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:7 | Lstart3:
RELOC(setmemrange,%a0) | call setmemrange()
jbsr %a0@ | to probe all memory regions
addl %a5,%a4 | convert to PA
pea %a5@ | firstpa
pea %a4@ | nextpa
RELOC(pmap_bootstrap,%a0)
jbsr %a0@ | pmap_bootstrap(firstpa, nextpa)
addql #8,%sp
/*
* Prepare to enable MMU.
* Since the kernel is mappe... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 241 | 300 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:8 | movw %d1,%a1@
movw %d0,%a0@
cmpw %a1@,%d1 | JUPITER-X?
jne Ljupiterdone | no, skip
movl #0x0100a240,%d0 | to access system register
.long 0x4e7b0006 | movc %d0,%dtt0
movb #0x01,0x01800003 | set "SUPER" bit
Ljupiterdone:
#endif /* JUPITER */
moveq #0,%d0 | ensure TT regs are disabled
.long 0x4e7b0004 | mo... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 281 | 340 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:9 | Lenab1:
/* set vector base in virtual address */
movl #_C_LABEL(vectab),%d0 | set Vector Base Register
movc %d0,%vbr
lea _ASM_LABEL(tmpstk),%sp | temporary stack
/* phase 2 of pmap setup, returns pointer to lwp0 uarea in %a0 */
jbsr _C_LABEL(pmap_bootstrap2)
/* set kernel stack, user SP */
lea %a0@(USPACE-4),%sp |... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 321 | 380 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:10 | * Create a fake exception frame so that cpu_lwp_fork() can copy it.
* main() nevers returns; we exit to user mode from a forked process
* later on.
*/
clrw %sp@- | vector offset/frame type
clrl %sp@- | PC - filled in by "execve"
movw #PSL_USER,%sp@- | in user mode
clrl %sp@- | stack adjust count and paddi... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 361 | 420 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:11 | moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULI,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#endif
Lfp_unimp:
#endif /* M68040 */
#ifdef FPU_EMULATE
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULD,%d0 | denote as FP emulation trap
jra _ASM_LA... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 401 | 460 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | * Note that since some FP exceptions generate mid-instruction frames
* and may cause signal delivery, we need to test for stack adjustment
* after the trap call.
*/
ENTRY_NOPROFILE(fpfault)
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save user registers
movl %usp,%a0 | and save
movl %a0,%sp@(FR_SP... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 441 | 500 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:13 | addql #8,%sp | pop args
moveml %sp@+,#0x0303 | restore regs
jra _ASM_LABEL(rei) | all done
ENTRY_NOPROFILE(trap0)
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save user registers
movl %usp,%a0 | save the user SP
movl %a0,%sp@(FR_SP) | in the savearea
movl %d0,%sp@- | push syscall number
j... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 481 | 540 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:18 | addql #1,_C_LABEL(intr_depth)
addql #1,_C_LABEL(intrcnt)+28
clrl %sp@-
moveml #0xFFFF,%sp@- | save registers
movl %usp,%a0 | and save
movl %a0,%sp@(FR_SP) | the user stack pointer
jbsr _C_LABEL(nmihand) | call handler
movl %sp@(FR_SP),%a0 | restore
movl %a0,%usp | user SP
moveml %sp@+,#0x7FFF | and r... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 681 | 740 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | btst #5,%sp@ | yes, are we returning to user mode?
beq 2f | no, done
rte
2:
movw #PSL_LOWIPL,%sr | lower SPL
clrl %sp@- | stack adjust
moveml #0xFFFF,%sp@- | save all registers
movl %usp,%a1 | including
movl %a1,%sp@(FR_SP) | the users SP
Lrei:
clrl %sp@- | VA == none
clrl %sp@- | code == none... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:20 | * Use common m68k process/lwp switch and context save subroutines.
*/
#define FPCOPROC /* XXX: Temp. reqd. */
#include <m68k/m68k/switch_subr.s>
#if defined(M68040) || defined(M68060)
ENTRY(suline)
movl %sp@(4),%a0 | address to write
movl _C_LABEL(curpcb),%a1 | current pcb
movl #Lslerr,%a1@(PCB_ONFAULT) | where ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 761 | 820 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:21 | /*
* _delay(u_int N)
*
* Delay for at least N microseconds.
* This routine depends on the variable: delay_divisor
* which should be set based on the CPU clock rate.
*/
ENTRY_NOPROFILE(_delay)
| %d0 = (usecs * a certain magnification factor)
movl %sp@(4),%d0
lsll #8,%d0
| %d1 = delay_divisor
movl _C_LABEL(de... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 801 | 860 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:22 | movc %d0,%cacr | disable on-chip cache(s)
| ok, turn off MMU..
Ldoreboot:
#if defined(M68040) || defined(M68060)
tstl %d2 | 68040?
jne LmotommuF | no, skip
movc %a1,%cacr | caches off
.long 0x4e7b9003 | movc a1(=0),tc ; disable MMU
jra Ldoreboot1
LmotommuF:
#endif
clrl %sp@
pmove %sp@,%tc | disable MMU
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 841 | 900 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:23 | GLOBAL(intiobase)
.long 0 | KVA of base of internal IO space
GLOBAL(intiolimit)
.long 0 | KVA of end of internal IO space
#ifdef DEBUG
ASGLOBAL(fulltflush)
.long 0
ASGLOBAL(fullcflush)
.long 0
#endif
/* interrupt counters */
GLOBAL(intrnames)
.asciz "spur"
.asciz "lev1"
.asciz "lev2"
.asciz "lev3"
.as... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 1cd60db9a55447acbcd6830e551c31f97b38ce30 | github | kernel | https://github.com/NetBSD/src/blob/1cd60db9a55447acbcd6830e551c31f97b38ce30/sys/arch/x68k/x68k/locore.s | 881 | 913 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:8 | movw %d1,%a1@
movw %d0,%a0@
cmpw %a1@,%d1 | JUPITER-X?
jne Ljupiterdone | no, skip
movl #0x0100a240,%d0 | to access system register
.long 0x4e7b0006 | movc %d0,%dtt0
movb #0x01,0x01800003 | set "SUPER" bit
Ljupiterdone:
#endif /* JUPITER */
moveq #0,%d0 | ensure TT regs are disabled
.long 0x4e7b0004 | mo... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 281 | 340 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:9 | Lenab1:
/* set vector base in virtual address */
movl #_C_LABEL(vectab),%d0 | set Vector Base Register
movc %d0,%vbr
lea _ASM_LABEL(tmpstk),%sp | temporary stack
/* phase 2 of pmap setup, returns pointer to lwp0 uarea in %a0 */
jbsr _C_LABEL(pmap_bootstrap2)
/* set kernel stack, user SP */
lea %a0@(USPACE-4),%sp |... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 321 | 380 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:10 | * main() nevers returns; we exit to user mode from a forked process
* later on.
*/
clrw %sp@- | vector offset/frame type
clrl %sp@- | PC - filled in by "execve"
movw #PSL_USER,%sp@- | in user mode
clrl %sp@- | stack adjust count and padding
lea %sp@(-64),%sp | construct space for D0-D7/A0-A7
lea _C_LABE... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 361 | 420 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:11 | moveq #T_FPEMULI,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#endif
Lfp_unimp:
#endif /* M68040 */
#ifdef FPU_EMULATE
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULD,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#else
jra _C_LABEL(i... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 401 | 460 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | * and may cause signal delivery, we need to test for stack adjustment
* after the trap call.
*/
ENTRY_NOPROFILE(fpfault)
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save user registers
movl %usp,%a0 | and save
movl %a0,%sp@(FR_SP) | the user stack pointer
clrl %sp@- | no VA arg
movl _C_LABEL... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 441 | 500 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:15 | cmpl #_ASM_LABEL(tmpstk),%d1
jls Lbrkpt2 | already on tmpstk
| Copy frame to the temporary stack
movl %sp,%a0 | %a0=src
lea _ASM_LABEL(tmpstk)-96,%a1 | %a1=dst
movl %a1,%sp | %sp=new frame
moveq #FR_SIZE,%d1
Lbrkpt1:
movl %a0@+,%a1@+
subql #4,%d1
jgt Lbrkpt1
Lbrkpt2:
| Call the trap handler for the ker... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 561 | 620 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:16 | #endif
#endif
/* Sun 3 drops into PROM here. */
Lbrkpt3:
| The stack pointer may have been modified, or
| data below it modified (by kgdb push call),
| so push the hardware frame at the current sp
| before restoring registers and returning.
movl %sp@(FR_SP),%a0 | modified %sp
lea %sp@(FR_SIZE),%a1 | end of our... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 601 | 660 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:17 | INTERRUPT_RESTOREREG
subql #1,_C_LABEL(intr_depth)
jra rei
ENTRY_NOPROFILE(lev1intr)
ENTRY_NOPROFILE(lev2intr)
ENTRY_NOPROFILE(lev3intr)
ENTRY_NOPROFILE(lev4intr)
ENTRY_NOPROFILE(lev5intr)
ENTRY_NOPROFILE(lev6intr)
addql #1,_C_LABEL(intr_depth)
INTERRUPT_SAVEREG
Lnotdma:
lea _C_LABEL(intrcnt),%a0
movw %sp@(22),%... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 641 | 700 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:18 | addql #1,_C_LABEL(intrcnt)+28
clrl %sp@-
moveml #0xFFFF,%sp@- | save registers
movl %usp,%a0 | and save
movl %a0,%sp@(FR_SP) | the user stack pointer
jbsr _C_LABEL(nmihand) | call handler
movl %sp@(FR_SP),%a0 | restore
movl %a0,%usp | user SP
moveml %sp@+,#0x7FFF | and remaining registers
addql #8,%s... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 681 | 740 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:19 | beq 2f | no, done
rte
2:
movw #PSL_LOWIPL,%sr | lower SPL
clrl %sp@- | stack adjust
moveml #0xFFFF,%sp@- | save all registers
movl %usp,%a1 | including
movl %a1,%sp@(FR_SP) | the users SP
Lrei:
clrl %sp@- | VA == none
clrl %sp@- | code == none
movl #T_ASTFLT,%sp@- | type == async system trap
p... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 721 | 780 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:20 | */
#define FPCOPROC /* XXX: Temp. reqd. */
#include <m68k/m68k/switch_subr.s>
#if defined(M68040) || defined(M68060)
ENTRY(suline)
movl %sp@(4),%a0 | address to write
movl _C_LABEL(curpcb),%a1 | current pcb
movl #Lslerr,%a1@(PCB_ONFAULT) | where to return to on a fault
movl %sp@(8),%a1 | address of line
movl %... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 761 | 820 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:21 | * _delay(u_int N)
*
* Delay for at least N microseconds.
* This routine depends on the variable: delay_divisor
* which should be set based on the CPU clock rate.
*/
ENTRY_NOPROFILE(_delay)
| %d0 = (usecs * a certain magnification factor)
movl %sp@(4),%d0
lsll #8,%d0
| %d1 = delay_divisor
movl _C_LABEL(delay_... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 801 | 860 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:22 | | ok, turn off MMU..
Ldoreboot:
#if defined(M68040) || defined(M68060)
tstl %d2 | 68040?
jne LmotommuF | no, skip
movc %a1,%cacr | caches off
.long 0x4e7b9003 | movc a1(=0),tc ; disable MMU
jra Ldoreboot1
LmotommuF:
#endif
clrl %sp@
pmove %sp@,%tc | disable MMU
Ldoreboot1:
moveml 0x00ff0000,#0x0101 | get ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 841 | 900 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:23 | .long 0 | KVA of base of internal IO space
GLOBAL(intiolimit)
.long 0 | KVA of end of internal IO space
#ifdef DEBUG
ASGLOBAL(fulltflush)
.long 0
ASGLOBAL(fullcflush)
.long 0
#endif
/* interrupt counters */
GLOBAL(intrnames)
.asciz "spur"
.asciz "lev1"
.asciz "lev2"
.asciz "lev3"
.asciz "lev4"
.asciz ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e | github | kernel | https://github.com/NetBSD/src/blob/d38ca0e2236f7bfb56fbc03ff78aa0da8ffb509e/sys/arch/x68k/x68k/locore.s | 881 | 912 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:8 | movw %d1,%a1@
movw %d0,%a0@
cmpw %a1@,%d1 | JUPITER-X?
jne Ljupiterdone | no, skip
movl #0x0100a240,%d0 | to access system register
.long 0x4e7b0006 | movc %d0,%dtt0
movb #0x01,0x01800003 | set "SUPER" bit
Ljupiterdone:
#endif /* JUPITER */
moveq #0,%d0 | ensure TT regs are disabled
.long 0x4e7b0004 | mo... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ed16fec82b9b94c01b36279d61975c449e014d38 | github | kernel | https://github.com/NetBSD/src/blob/ed16fec82b9b94c01b36279d61975c449e014d38/sys/arch/x68k/x68k/locore.s | 281 | 340 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:9 | Lenab1:
/* set vector base in virtual address */
movl #_C_LABEL(vectab),%d0 | set Vector Base Register
movc %d0,%vbr
lea _ASM_LABEL(tmpstk),%sp | temporary stack
/* phase 2 of pmap setup, returns pointer to lwp0 uarea in %a0 */
jbsr _C_LABEL(pmap_bootstrap2)
/* set kernel stack, user SP */
lea %a0@(USPACE-4),%sp |... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | ed16fec82b9b94c01b36279d61975c449e014d38 | github | kernel | https://github.com/NetBSD/src/blob/ed16fec82b9b94c01b36279d61975c449e014d38/sys/arch/x68k/x68k/locore.s | 321 | 380 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:6 | jra Lstart2
1:
#endif
#if defined(M68040)
cmpl #CPU_68040,%a0@ | 68040?
jne 1f
movl #_C_LABEL(buserr40),%a2@(8)
movl #_C_LABEL(addrerr4060),%a2@(12)
jra Lstart2
1:
#endif
#if defined(M68030)
movl #_C_LABEL(busaddrerr2030),%a2@(8)
movl #_C_LABEL(busaddrerr2030),%a2@(12)
#endif
Lstart2:
/* initialize source/dest... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 0451fe21aef9a5d06d7f27a351c5083b4dabd914 | github | kernel | https://github.com/NetBSD/src/blob/0451fe21aef9a5d06d7f27a351c5083b4dabd914/sys/arch/x68k/x68k/locore.s | 201 | 260 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:7 | Lstart3:
RELOC(setmemrange,%a0) | call setmemrange()
jbsr %a0@ | to probe all memory regions
addl #PAGE_SIZE-1,%d5
andl #PG_FRAME,%d5 | round to a page
movl %d5,%a4
addl %a5,%a4 | convert to PA
pea %a5@ | firstpa
pea %a4@ | nextpa
RELOC(pmap_bootstrap,%a0)
jbsr %a0@ | pmap_bootstrap(firstpa, next... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 0451fe21aef9a5d06d7f27a351c5083b4dabd914 | github | kernel | https://github.com/NetBSD/src/blob/0451fe21aef9a5d06d7f27a351c5083b4dabd914/sys/arch/x68k/x68k/locore.s | 241 | 300 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:8 | movw %a0@,%d0
movw %d0,%d1
notw %d1
movw %d1,%a1@
movw %d0,%a0@
cmpw %a1@,%d1 | JUPITER-X?
jne Ljupiterdone | no, skip
movl #0x0100a240,%d0 | to access system register
.long 0x4e7b0006 | movc %d0,%dtt0
movb #0x01,0x01800003 | set "SUPER" bit
Ljupiterdone:
#endif /* JUPITER */
moveq #0,%d0 | ensure TT re... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 0451fe21aef9a5d06d7f27a351c5083b4dabd914 | github | kernel | https://github.com/NetBSD/src/blob/0451fe21aef9a5d06d7f27a351c5083b4dabd914/sys/arch/x68k/x68k/locore.s | 281 | 340 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:9 | /*
* Should be running mapped from this point on
*/
Lenab1:
/* set vector base in virtual address */
movl #_C_LABEL(vectab),%d0 | set Vector Base Register
movc %d0,%vbr
lea _ASM_LABEL(tmpstk),%sp | temporary stack
/* phase 2 of pmap setup, returns pointer to lwp0 uarea in %a0 */
jbsr _C_LABEL(pmap_bootstrap2)
/* ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 0451fe21aef9a5d06d7f27a351c5083b4dabd914 | github | kernel | https://github.com/NetBSD/src/blob/0451fe21aef9a5d06d7f27a351c5083b4dabd914/sys/arch/x68k/x68k/locore.s | 321 | 380 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:10 | /*
* Create a fake exception frame so that cpu_lwp_fork() can copy it.
* main() nevers returns; we exit to user mode from a forked process
* later on.
*/
clrw %sp@- | vector offset/frame type
clrl %sp@- | PC - filled in by "execve"
movw #PSL_USER,%sp@- | in user mode
clrl %sp@- | stack adjust count and p... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 0451fe21aef9a5d06d7f27a351c5083b4dabd914 | github | kernel | https://github.com/NetBSD/src/blob/0451fe21aef9a5d06d7f27a351c5083b4dabd914/sys/arch/x68k/x68k/locore.s | 361 | 420 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:11 | #else
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULI,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#endif
Lfp_unimp:
#endif /* M68040 */
#ifdef FPU_EMULATE
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save registers
moveq #T_FPEMULD,%d0 ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 0451fe21aef9a5d06d7f27a351c5083b4dabd914 | github | kernel | https://github.com/NetBSD/src/blob/0451fe21aef9a5d06d7f27a351c5083b4dabd914/sys/arch/x68k/x68k/locore.s | 401 | 460 |
NetBSD/src:sys/arch/x68k/x68k/locore.s:12 | /*
* Handles all other FP coprocessor exceptions.
* Note that since some FP exceptions generate mid-instruction frames
* and may cause signal delivery, we need to test for stack adjustment
* after the trap call.
*/
ENTRY_NOPROFILE(fpfault)
clrl %sp@- | stack adjust count
moveml #0xFFFF,%sp@- | save user regis... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/x68k/x68k/locore.s | BSD-2-Clause | 0451fe21aef9a5d06d7f27a351c5083b4dabd914 | github | kernel | https://github.com/NetBSD/src/blob/0451fe21aef9a5d06d7f27a351c5083b4dabd914/sys/arch/x68k/x68k/locore.s | 441 | 500 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.