2017-09-17 17:09:04 +08:00
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
;
|
|
|
|
|
; File: SlotInterrupts.a
|
|
|
|
|
;
|
|
|
|
|
; Contains: This file contains the core routines pertaining to the slot interrupt
|
|
|
|
|
; queue manager as well as some table initialization routines called
|
|
|
|
|
; at startup time. Slot interrupts are handled by the slot interrupt
|
|
|
|
|
; dispatcher which finds the interrupting slot and then looks through
|
|
|
|
|
; the slot's interrupt queue for an interrupt routine to call.
|
|
|
|
|
;
|
|
|
|
|
; SIntINSTALL installs a routine into the slot interrupt queue poll list
|
|
|
|
|
; while SIntREMOVE removes it. There is one queue per slot, with a system
|
|
|
|
|
; heap table of ptrs pointing to the head of each queue. A low mem variable,
|
|
|
|
|
; SlotQDT, points to the system heap table.
|
|
|
|
|
;
|
|
|
|
|
; Written by: Rich Castro 22-July-86
|
|
|
|
|
; Rewritten by: Gary Davidian 16-April-89
|
|
|
|
|
;
|
|
|
|
|
; Copyright: <09> 1986-1993 by Apple Computer, Inc., all rights reserved.
|
|
|
|
|
;
|
|
|
|
|
; Change History (most recent first):
|
|
|
|
|
;
|
|
|
|
|
; <SM12> 11/9/93 KW added some eieioSTP macros. Only expands for CygnusX1 ROM
|
|
|
|
|
; <SM11> 10/6/93 RC Added forPDMProto to build conditional of the interrupt line
|
|
|
|
|
; hack
|
|
|
|
|
; <SM10> 9/10/93 RC Added check fo BART1 to the below hack, so this would only
|
|
|
|
|
; happen on EVT1 Cold Fusions
|
|
|
|
|
; <SM9> 9/3/93 GMR Added a hack for Cold Fusion EVT1 units to fix the slot ID's
|
|
|
|
|
; being wired incorrectly.
|
|
|
|
|
; <SM8> 8/2/93 GMR Added hack for EVT1/2 PDM machines which swaps the slot
|
|
|
|
|
; interrupt lines for those boards.
|
|
|
|
|
; <SM7> 10/18/92 CCH Added a nop to support non-serialized IO space.
|
|
|
|
|
; <SM6> 8/24/92 PN Take out CycloneboxEVT1 stuff
|
|
|
|
|
; <SM5> 6/30/92 kc Rename EclipseVia2SlotInt to DAFBVia2SlotInt. Move SlotInterrupt
|
|
|
|
|
; handlers from InterruptHandlers.a.
|
|
|
|
|
; <SM4> 5/16/92 kc Roll in Horror changes. Comments follow:
|
|
|
|
|
; <H2> 2/14/92 JC Export RunSlotHandlers for use by Sonora Level 3 interrupt for
|
|
|
|
|
; Sonic Ethernet
|
|
|
|
|
; <9> 5/4/92 JSM Roll-in change from SuperMario: Changed the mask value used for
|
|
|
|
|
; Interrupts on Quadra900.
|
|
|
|
|
; <8> 5/4/92 JSM Get rid of conditionals: this file is only used in ROM builds,
|
|
|
|
|
; so Cpu is always <20> 020, hasMac2Via2, hasEclipseVia2, hasRBV, and
|
|
|
|
|
; hasOSS are always true.
|
|
|
|
|
; <7> 9/16/91 JSM Cleanup header.
|
|
|
|
|
; <6> 6/12/91 LN removed #include 'HardwareEqu.a'
|
|
|
|
|
; <5> 9/19/90 BG Removed <4>. 040s are behaving more reliably now.
|
|
|
|
|
; <4> 7/20/90 BG Added EclipseNOPs to handle flakey 040s.
|
|
|
|
|
; <3> 2/19/90 BG Add Eclipse VIA2 support to SlotMgr.
|
|
|
|
|
; <2> 1/11/90 CCH Added include of <20>HardwarePrivateEqu.a<>.
|
|
|
|
|
; <1.4> 8/7/89 GGD Roll in patch to change SIntInstall to handle equal priorities
|
|
|
|
|
; the same as the Mac II, Most recently installed is run sooner.
|
|
|
|
|
; <1.3> 4/16/89 GGD Completely re-written and faster, uses new internal data
|
|
|
|
|
; structures, supports all 15 slots, removed slot priority
|
|
|
|
|
; (priority within a slot is still used). Made more universal.
|
|
|
|
|
; <1.2> 3/6/89 GGD Moved SlotInt from InterruptHandlers.a to SlotInterrupts.a.
|
|
|
|
|
; Modified to use feature based conditionals. Changed RBV register
|
|
|
|
|
; usage now that equates are offsets from RBVBase, instead of
|
|
|
|
|
; being absolute addresses.
|
|
|
|
|
; <1.1> 11/10/88 CCH Fixed Header.
|
|
|
|
|
; <1.0> 11/9/88 CCH Adding to EASE.
|
|
|
|
|
; <1.5> 10/24/88 djw Modified InitSPTbl and InitSDTbl to alloc space for all
|
|
|
|
|
; supported slots.
|
|
|
|
|
; <<3C>1.4> 9/23/88 CCH Got rid of inc.sum.d and empty nFiles
|
|
|
|
|
; <1.3> 7/6/88 BBM Changed sqHeadSize back to sqHDSize
|
|
|
|
|
; <1.2> 2/16/88 BBM Changed sqHDSize to sqHeadSize
|
|
|
|
|
; <1.1> 2/15/88 BBM modified for mpw 3.0 equates
|
|
|
|
|
; <1.0> 2/10/88 BBM Adding file for the first time into EASE<53>
|
|
|
|
|
; <C914> 10/8/87 rwh Changed 'Via2IntMask' to 'SlotIntMask' to make it more general
|
|
|
|
|
; for Modern Victorian.
|
|
|
|
|
; <C665> 1/22/87 RDC Code review cleanup changes
|
|
|
|
|
; <C582> 1/2/87 RDC Misc cleanup
|
|
|
|
|
; <C556> 12/19/86 FJL Changed NumSlots to sNumSlots for GWN.
|
|
|
|
|
; <C422> 11/18/86 RDC Added check of queue type in all routines
|
|
|
|
|
; <C328> 11/2/86 RDC Added copyright notice
|
|
|
|
|
; <C224> 10/15/86 RDC Return Dequeue error code from SIntRemove Added error checking
|
|
|
|
|
; for valid slot #
|
|
|
|
|
; <C166> 10/11/86 RDC Substantially rewrote SIntInstall to include priority handling
|
|
|
|
|
; of slot interrupt queue elements
|
|
|
|
|
; <C147> 10/10/86 RDC Added init routines for slot priority and interrupt dispatch
|
|
|
|
|
; tables
|
|
|
|
|
; <C206> 10/9/86 bbm Modified to mpw aincludes.
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
print off
|
|
|
|
|
LOAD 'StandardEqu.d'
|
|
|
|
|
INCLUDE 'HardwarePrivateEqu.a'
|
|
|
|
|
INCLUDE 'SlotMgrEqu.a'
|
|
|
|
|
INCLUDE 'UniversalEqu.a'
|
|
|
|
|
print on
|
|
|
|
|
print nomdir
|
|
|
|
|
|
|
|
|
|
machine mc68020
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SIntCORE PROC EXPORT
|
|
|
|
|
|
|
|
|
|
WITH SlotIntQElement,slotIntGlobals
|
|
|
|
|
|
|
|
|
|
EXPORT InitSPTbl,InitSDTbl
|
2017-11-18 18:55:40 +08:00
|
|
|
|
EXPORT SIntINSTALL,SIntREMOVE
|
|
|
|
|
EXPORT SlotIntCommon
|
2017-09-17 17:09:04 +08:00
|
|
|
|
|
|
|
|
|
EXPORT RunSlotHandlers ; accessed by level 3 Sonic Interrupt on <H2>
|
|
|
|
|
; Sonora based systems
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
;
|
|
|
|
|
; Routine: GetSlotIntQHead
|
|
|
|
|
;
|
|
|
|
|
; Arguments: D0 (input) : video card slot ($0..$E possible)
|
|
|
|
|
; D0 (output): error code
|
|
|
|
|
; A1 (output): address of pointer to first SlotIntQElement
|
|
|
|
|
;
|
|
|
|
|
; Function: Utility routine to do check for valid slot number, and return
|
|
|
|
|
; the address of the associated slot slotIntInfo record.
|
|
|
|
|
; If the queue type is wrong, or the slot number is out of range,
|
|
|
|
|
; an error code will be returned, and the routine will return to
|
|
|
|
|
; the callers caller, instead of directly to the caller.
|
|
|
|
|
;
|
|
|
|
|
; Called by: SIntInstall, SIntRemove
|
|
|
|
|
;
|
|
|
|
|
; Registers Used: D0,A1
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
|
|
|
|
|
GetSlotIntQHead
|
|
|
|
|
cmpi.w #SIQType,SQType(A0) ; is it the proper type?
|
|
|
|
|
bne.s @wrongType ; if not, report the error
|
|
|
|
|
ext.w d0 ; ignore high byte
|
|
|
|
|
cmpi.w #sLastSlot,d0 ; check for valid slot #
|
|
|
|
|
bgt.s @slotTooBig ; return error if too big
|
|
|
|
|
lea ([SlotQDT],d0.w*4,slotIntQHeads-SQLink),a1 ; get address of queue header
|
|
|
|
|
rts ; return with success
|
|
|
|
|
|
|
|
|
|
@wrongType moveq.l #VTypErr,d0 ; queue element type is wrong
|
|
|
|
|
bra.s @error ; report the error
|
|
|
|
|
|
|
|
|
|
@slotTooBig move.w #smSlotOOBErr,d0 ; return with slot # error
|
|
|
|
|
@error addq.w #4,sp ; pop the return address
|
|
|
|
|
rts ; return to callers caller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
;
|
|
|
|
|
; Routine: SIntINSTALL
|
|
|
|
|
;
|
|
|
|
|
; Arguments: D0 (input) : slot number for routine ($0..$E possible)
|
|
|
|
|
; A0 (input) : ptr to queue element
|
|
|
|
|
; D0 (output): error code - 0 no error
|
|
|
|
|
;
|
|
|
|
|
; Function: Installs a slot interrupt poll routine which is called when
|
|
|
|
|
; a slot interrupt occurs. The queue element is installed in
|
|
|
|
|
; in priority order, $FF highest (first), $00 lowest (last).
|
|
|
|
|
;
|
|
|
|
|
; When elements with EQUAL priorities exist, the most recently
|
|
|
|
|
; installed one is run sooner.
|
|
|
|
|
;
|
|
|
|
|
; Only low byte of priority word is used (0-255 range).
|
|
|
|
|
; Priorities 200-255 are reserved by Apple.]
|
|
|
|
|
;
|
|
|
|
|
; The Mac II used to maintain priority across slots, which was
|
|
|
|
|
; used when multiple slots interrupted AT THE SAME TIME.
|
|
|
|
|
; We no longer support this, and prioritize by slot number instead.
|
|
|
|
|
; This will be removed from the Mac II in system 7.0
|
|
|
|
|
;
|
|
|
|
|
; The Mac II had a bug in SIntInstall, which had $FF as the highest
|
|
|
|
|
; priority across slots, but had $FF as the lowest within a slot.
|
|
|
|
|
; Most cards used the priority order as documented, ($FF highest), so
|
|
|
|
|
; we will retain that ordering.
|
|
|
|
|
; This will be fixed in the Mac II in System 7.0.
|
|
|
|
|
;
|
|
|
|
|
; Registers Used: D0,D1,D2,A0,A1
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
|
|
|
|
|
SIntINSTALL bsr.s GetSlotIntQHead ; a1 := pointer to qheader
|
|
|
|
|
move.b SQPrio+1(a0),d0 ; get the priority (low byte of word)
|
|
|
|
|
move.w sr,-(sp) ; save interrupt level
|
|
|
|
|
ori.w #HiIntMask,sr ; disable interrupts
|
|
|
|
|
@PrioritySearch
|
|
|
|
|
move.l SQLink(a1),d1 ; get next queue element to check
|
|
|
|
|
beq.s @insert ; if end of list, insert before this
|
|
|
|
|
exg.l a1,d1 ; swap previous and current pointers
|
|
|
|
|
cmp.b SQPrio+1(a1),d0 ; compare priorities
|
|
|
|
|
blo.s @PrioritySearch ; loop until lower priority found <1.4>
|
|
|
|
|
; if equal, insert newer in front of older <1.4>
|
|
|
|
|
exg.l d1,a1 ; a1 points to previous, d1 points to current
|
|
|
|
|
@insert ; insert before the lower priority element
|
|
|
|
|
move.l d1,SQLink(a0) ; remainder of queue goes after new element
|
|
|
|
|
move.l a0,SQLink(a1) ; new element goes after previous element
|
|
|
|
|
move.w (sp)+,sr ; restore interrupt level
|
|
|
|
|
moveq.l #noErr,d0 ; return success
|
|
|
|
|
rts ; all done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
;
|
|
|
|
|
; Routine: SIntREMOVE
|
|
|
|
|
;
|
|
|
|
|
; Arguments: D0 (input) : slot number for routine ($0..$E possible)
|
|
|
|
|
; A0 (input) : ptr to queue element to remove
|
|
|
|
|
; D0 (output): error code - 0 = no error
|
|
|
|
|
;
|
|
|
|
|
; Function: Removes a poll routine from the slot interrupt queue.
|
|
|
|
|
;
|
|
|
|
|
; Registers Used: D0,D1,A1
|
|
|
|
|
;
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
|
|
|
|
|
SIntREMOVE bsr.s GetSlotIntQHead ; a1 := pointer to qheader
|
|
|
|
|
moveq.l #qErr,d0 ; error code in case it's not found
|
|
|
|
|
move.w sr,-(sp) ; save interrupt level
|
|
|
|
|
ori.w #HiIntMask,sr ; disable interrupts
|
|
|
|
|
@search move.l SQLink(a1),d1 ; get next queue element to check
|
|
|
|
|
beq.s @notFound ; if end of list, nothing to remove
|
|
|
|
|
exg.l a1,d1 ; swap previous and current pointers
|
|
|
|
|
cmpa.l a0,a1 ; see if this is the one to remove
|
|
|
|
|
bne.s @search ; loop until removee is fount
|
|
|
|
|
|
|
|
|
|
movea.l d1,a1 ; a1 points to previous
|
|
|
|
|
move.l SQLink(a0),SQLink(a1) ; remainder of queue goes after previous element
|
|
|
|
|
moveq.l #noErr,d0 ; return success
|
|
|
|
|
|
|
|
|
|
@notFound move.w (sp)+,sr ; restore interrupt level
|
|
|
|
|
rts ; all done
|
|
|
|
|
|
|
|
|
|
;_______________________________________________________________
|
|
|
|
|
;
|
|
|
|
|
; Secondary Dispatch routines for slot interrupts
|
|
|
|
|
;
|
|
|
|
|
; On Entry: A1.L = VIA2/RBV/OSS base address
|
|
|
|
|
; D0-D3/A0-A3 have been saved
|
|
|
|
|
;
|
|
|
|
|
;____________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
SlotIntCommon
|
|
|
|
|
subq.l #4,sp ; allocate a long (only a byte is used)
|
|
|
|
|
move.b d0,(sp) ; save the interrupt pending bit mask
|
|
|
|
|
|
|
|
|
|
@loop move.b SlotPriority(d0.w),d0 ; get slot number / bit number
|
|
|
|
|
bclr.b d0,(sp) ; clear the bit
|
|
|
|
|
lsr.b #4,d0 ; get the slot number
|
|
|
|
|
bsr.s RunSlotHandlers ; run the handlers for this slot
|
|
|
|
|
bne.s @noHandler ; if couldn't be serviced, die with sys error
|
|
|
|
|
move.b (sp),d0 ; see if any other slots were pending
|
|
|
|
|
bne.s @loop ; loop until all slots serviced
|
|
|
|
|
|
|
|
|
|
addq.l #4,sp ; pop the pending bits
|
|
|
|
|
|
|
|
|
|
; Because AnySlot is edge triggered on some machines, we must make sure that all
|
|
|
|
|
; slot interrupts go away, causing AnySlot to go away, so that the next slot interrupt
|
|
|
|
|
; will cause an edge transition on AnySlot. We loop back to be start of the handler
|
|
|
|
|
; to see if any slot interrupts occurred since we last checked, and only exit when they
|
|
|
|
|
; all go away.
|
|
|
|
|
|
|
|
|
|
movea.l VIA2RBVOSS,a1 ; get base address of chip with slot int reg
|
|
|
|
|
movea.l Via2DT+4*ifCA1,a0 ; get the handler address
|
|
|
|
|
eieioSTP
|
|
|
|
|
jmp (a0) ; loop until no slots interrupting
|
|
|
|
|
|
|
|
|
|
@noHandler _SysError ; no handler for slot interrupt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RunSlotHandlers
|
|
|
|
|
lea ([SlotQDT],d0.w*4,slotIntQHeads-SQLink),a1 ; get address of queue header
|
|
|
|
|
@RunNext move.l SQLink(a1),d0 ; get next queue element
|
|
|
|
|
beq.s @notFound ; if end of queue reached, return error
|
|
|
|
|
movea.l d0,a1 ; setup queue element pointer
|
|
|
|
|
move.l a1,-(sp) ; save queue element pointer
|
|
|
|
|
movea.l SQAddr(a1),a0 ; get poll routine address
|
|
|
|
|
movea.l SQParm(a1),a1 ; stuff optional A1 param
|
|
|
|
|
jsr (a0) ; call the handler
|
|
|
|
|
movea.l (sp)+,a1 ; restore the queue element pointer
|
|
|
|
|
tst.w d0 ; see if the int was serviced
|
|
|
|
|
beq.s @RunNext ; if not, try the next handler
|
|
|
|
|
moveq.l #noErr,d0 ; if handled, return with success
|
|
|
|
|
rts ; all done
|
|
|
|
|
|
|
|
|
|
@notFound moveq.l #dsBadSlotInt,d0 ; return with an error if no handler
|
|
|
|
|
rts ; all done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SlotPriority
|
|
|
|
|
dc.b $00 ; 0 0 0 0 0 0 0 0 - no interrupt
|
|
|
|
|
dc.b $90 ; 0 0 0 0 0 0 0 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $A1 ; 0 0 0 0 0 0 1 0 - Slot A (bit 1)
|
|
|
|
|
dc.b $90 ; 0 0 0 0 0 0 1 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $B2 ; 0 0 0 0 0 1 0 0 - Slot B (bit 2)
|
|
|
|
|
dc.b $90 ; 0 0 0 0 0 1 0 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b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 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $A1 ; 0 1 1 0 1 1 1 0 - Slot A (bit 1)
|
|
|
|
|
dc.b $90 ; 0 1 1 0 1 1 1 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $D4 ; 0 1 1 1 0 0 0 0 - Slot D (bit 4)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 0 0 0 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $A1 ; 0 1 1 1 0 0 1 0 - Slot A (bit 1)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 0 0 1 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $B2 ; 0 1 1 1 0 1 0 0 - Slot B (bit 2)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 0 1 0 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $A1 ; 0 1 1 1 0 1 1 0 - Slot A (bit 1)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 0 1 1 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $C3 ; 0 1 1 1 1 0 0 0 - Slot C (bit 3)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 1 0 0 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $A1 ; 0 1 1 1 1 0 1 0 - Slot A (bit 1)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 1 0 1 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $B2 ; 0 1 1 1 1 1 0 0 - Slot B (bit 2)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 1 1 0 1 - Slot 9 (bit 0)
|
|
|
|
|
dc.b $A1 ; 0 1 1 1 1 1 1 0 - Slot A (bit 1)
|
|
|
|
|
dc.b $90 ; 0 1 1 1 1 1 1 1 - Slot 9 (bit 0)
|
|
|
|
|
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
;
|
|
|
|
|
; Routine: InitSDTbl
|
|
|
|
|
;
|
|
|
|
|
; Arguments: D0 (output): error code
|
|
|
|
|
;
|
|
|
|
|
; Function: Creates and initializes a slot interrupt dispatch table in
|
|
|
|
|
; the system heap. A pointer to the table is saved in low
|
|
|
|
|
; memory as SlotQDT. This table is used by the slot interrupt
|
|
|
|
|
; handler to dispatch a slot interrupt to the appropriate
|
|
|
|
|
; routine. Each entry in the table points to a slot queue
|
|
|
|
|
; header which in turns points to one or more slot queue
|
|
|
|
|
; elements.
|
|
|
|
|
;
|
|
|
|
|
; Called from: InitSlots routine in OS:StartInit.a
|
|
|
|
|
;
|
|
|
|
|
; Registers Used: D0,A0,A1
|
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
|
|
|
|
|
with slotVBLInfo
|
|
|
|
|
InitSDTbl move.l #sIntGlobalSize,d0 ; alloc space for all possible slots
|
|
|
|
|
_NewPtr ,sys,clear ; create table in system heap, cleared
|
|
|
|
|
move.l a0,SlotQDT ; save ptr to table in low mem
|
|
|
|
|
|
|
|
|
|
lea slotVBLInfos+\
|
|
|
|
|
slotVBLQHdr-\
|
|
|
|
|
slotVBLInfo(a0),a1 ; setup pointer to first slotVBLInfos record
|
|
|
|
|
moveq.l #TotalSlots-1,d0 ; setup loop counter for all possible slots
|
|
|
|
|
|
|
|
|
|
@init move.l a1,(a0)+ ; point to the slotIntInfo record for this slot
|
|
|
|
|
adda.w #sVBLInfoSize,a1 ; point to next slotIntInfo record
|
|
|
|
|
dbra d0,@init ; init all possible slots
|
|
|
|
|
moveq.l #noErr,D0 ; indicate success (remove this, can't fail)
|
|
|
|
|
rts ; all done
|
|
|
|
|
endwith
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InitSPTbl RTS ; this routine no longer exists (remove this)
|
|
|
|
|
|
|
|
|
|
END
|
|
|
|
|
|