antoine-source/scsi2/SCSI.Drivers/SCSI Driver Mgmt

1 line
163 KiB
Plaintext
Raw Normal View History

;******************************************************* ; ; SCSI Driver Management Routines. ; ; Written by Matt Gulick. Started May 16,1988 ; ; Copyright Apple Computer, Inc. 1988,89 ; ;******************************************************* ;******************************************************* ; ; This file contains the subroutines needed by the ; SCSI Driver for things such as Getting RAM, Building ; data areas, calling outside routines for DIB ; management, as well as other generic routines that ; are used to make life easier for the driver. Also ; included in this file is the record definition for ; the DIB structure including all it's extensions. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; May 16, 1988 File started. ; May 17, 1988 DIB Record defined. ; June 6, 1988 Main Driver Written. ; Jun 20, 1988 Update Input/Output Data in Comments ; Apr 14, 1989 Added Conditional Logic to remove ; block routines from character device ; assemblies. STRING PASCAL BLANKS OFF PAGESIZE 70 PRINT NOGEN PRINT NOMDIR MACHINE M65816 IMPORT stat_cont IMPORT master_uid IMPORT scsi_uid IMPORT scsi_mgrnum IMPORT rout2_s_disp IMPORT hndl_offset IMPORT buff_len IMPORT page_cnt IMPORT dpi_overide IMPORT call_type IMPORT main_drvr IMPORT internal ; IMPORT disk_switch IMPORT ram_page_cnt IMPORT internal_buff IMPORT default_dib IMPORT first_time IMPORT only_one IMPORT part_cnt IMPORT t_dvc_blocks IMPORT f_partition IMPORT part_num IMPORT vPart_cnt IMPORT rebuild IMPORT trash_it IMPORT direct_page IMPORT exit_dpage IMPORT gsos_dpage IMPORT saved_zp IMPORT valid IMPORT dvc_ram IMPORT sense_data IMPORT dvc_count IMPORT result IMPORT divend IMPORT divsor IMPORT max_blk_cnt IMPORT tot_dib_cnt IMPORT dib_data_struct IMPORT main_caller IMPORT curr_hndl IMPORT new_dib IMPORT scratch0 IMPORT scratch1 IMPORT scratch2 IMPORT scratch3 IMPORT killer_blk IMPORT auto_sense_data IMPORT temp_acc IMPORT pdi_flag IMPORT new_list IMPORT new_dib_cnt IMPORT new_dib_list IMPORT real_unit ;************************* IMPORT m_blk_size IMPORT m_blk_cnt IMPORT m_rslt ENTRY zero_mem ENTRY get_space ENTRY make_dib ENTRY find_empty ENTRY chk_ram ENTRY rebld_dibs ENTRY dibicise_new_ram ENTRY dibicise_new_dib ENTRY set_link_ptrs ENTRY major_update ENTRY minor_update ENTRY fix_unit_1 ENTRY add_dib_ptr ENTRY do_post_install ENTRY read_pm_blk ENTRY rpm_blk_num ; ENTRY wpm_blk_num ENTRY chk_map ENTRY no_partition ENTRY check_map_entry ENTRY c_strt_buffer ENTRY c_strt_rqst_cnt ENTRY c_strt_blk_num ENTRY cache_valid ENTRY put_in_cache ENTRY get_from_cache ENTRY test_unit_rdy ENTRY read_capacity ENTRY mode_sense ENTRY mode_sense2 ENTRY start_unit ENTRY stop_unit ENTRY set_512_mode ENTRY notify_me ENTRY set_disk_sw ENTRY trash_volume ENTRY save_dp ENTRY restore_dp ENTRY set_our_dp ENTRY check_532_rw ENTRY munge_532 ENTRY divide PRINT OFF INCLUDE 'scsihd.equates' INCLUDE 'M16.MEMORY' INCLUDE 'M16.UTIL' INCLUDE 'M16.MISCTOOL' PRINT ON EJECT ;____Mem_Manager_____ ;******************************************************* ; ; This routine is used to Get a User ID from the ; memory manager for the SCSI Driver. This is ; required to get a userID for access reference. ; ; Inputs: None. ; ; Outputs: SCSID_uID = userID. ; Registers = Scrambled ; ; Errors: $0207 iderr Invalid userID. ; ;******************************************************* EXPORT get_