mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-20 02:30:40 +00:00
1 line
38 KiB
Plaintext
1 line
38 KiB
Plaintext
|
;*******************************************************
;
; SCSI Driver 'Startup' filter.
;
; Written by Matt Gulick. Started July 1,1988
;
; Copyright Apple Computer, Inc. 1988,89
;
;*******************************************************
;*******************************************************
;
; This file contains the 'Startup' filter as defined
; in the ERS.
;
;*******************************************************
;*******************************************************
;
; Revision History:
;
;*******************************************************
;
; July 1, 1988 File started.
; July 21, 1988 reworked logic and added
; a few new subroutines.
; April 10, 1989 Started to add code for
; character devices for the
; Scanner.
STRING PASCAL
BLANKS OFF
PAGESIZE 70
PRINT NOGEN
PRINT NOMDIR
MACHINE M65816
IMPORT wake_me_up
IMPORT get_mm_id
IMPORT get_dvc_ram
IMPORT set_512_mode
IMPORT select_page_num
IMPORT test_unit_rdy
IMPORT start_unit
IMPORT mode_sense
IMPORT read_capacity
IMPORT default_dib
IMPORT rebld_dibs
IMPORT dpi_overide
IMPORT set_our_dp
IMPORT direct_page
IMPORT gsos_dpage
IMPORT main_drvr
IMPORT internal
IMPORT internal_buff
IMPORT get_scsimgr
IMPORT call_type
IMPORT fre_dvc_ram
IMPORT dvc_count
IMPORT rpm_blk_num
IMPORT rebuild
IMPORT part_num
IMPORT do_part_dib
IMPORT first_time
IMPORT part_cnt
IMPORT chk_ram
IMPORT dibicise_new_ram
IMPORT dibicise_new_dib
IMPORT main_caller
IMPORT active_starts
IMPORT tot_dib_cnt
IMPORT t_dvc_blocks
IMPORT auto_sense_data
ENTRY do_inq_parms
ENTRY do_mode_parms
ENTRY do_read_cap
ENTRY do_partition
ENTRY get_nxt_dvc
PRINT OFF
INCLUDE 'scsihd.equates'
INCLUDE 'M16.MEMORY'
INCLUDE 'M16.UTIL'
PRINT ON
EJECT
;*******************************************************
;
; Main Entry point to the 'Startup' filter. This
; 'Filter' is called after the driver is loaded. The
; code that follows sets up the drivers environment,
; then calls 'get_dvc_ram'. On return from the
; 'get_dvc_ram' call, the following structure are in
; place if no error ocured.
;
; dvc_list = Long Pointer to device List
; next_dib = Long Pointer to First DIB
; first_dib = Long Pointer to the beginning
; of the RAM Allocated for the
; new DIBs.
;
; This contains enough RAM for one DIB for
; each device in the device list. If more
; space is needed due to partitioning, then
; the startup filter will be responsible for
; getting that space from the memory manager.
;
; From this point, we need to build the DIB for each
; device.
;
; Inputs: None.
;
; Outputs: Acc = 0
; Carry = 0
; Y register = Unspecified
; X register = Unspecified
; P register = 0=M=X=e
; Direct Page = GS/OS Direct Page
; Data Bank = Ours
;
; Errors: See Spec.
;
;*******************************************************
EXPORT startup
startup PROC
;-------------------------------------------------------------------------------
IF warm_ss_suprt = true THEN
;
; Check to see if this is a WARM STARTUP
; Call. If it is, we will need to handle
; this a lot differently than a normal
; startup. First of all our DIBs are, for
; the most part, already built. The only
; possible changes might be in respect to
; removable media. In any case we will
; call the warm start routine in the Driver
; Mgmt file to take care of this for us.
;
; Is it a COLD STARTUP?
;
lda >warm_cold_flag
and #$0001
bne @do_warm ;It's Warm
@no_warm_start jmp @chk_dflt ;It's Cold
;
; Check to see if this is for the
; 'default_dib'. If it is, then we need
; to exit with an error. The error is so
; that our defaul
|