%';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' ; %' INTEL CORPORATION PROPRIETARY INFORMATION ; %' ; %' This software is supplied under the terms of a license agreement ; %' or non disclosure agreement with Intel Corporation and may not be ; %' copied nor disclosed except in accordance with the terms of that ; %' agreement. ; %' ; %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Title: MIP configuration macros - used to generate 120 mip driver %' %' Date: Aug 13, 1984 %' %' Author: Rajiv Dhingra %' %' Abstract: The macros define the configuration data structures for mip. %' This file also calls define_sublayer_analysis once for each %' layer that resides on the PCLINKII. It initializes some vars %' to 0 too. %' %' Revisions: %' %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Define the groups according to the PLM86 or PLM286 compact model %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %If (%Asm286) Then ( assume ds:base_data ) Else ( base_cgroup group base_code dgroup group base_data assume cs:base_cgroup, ds:dgroup )FI %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Utility macro cleanup to cleanup parameters %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Define strings for strip. %' %define(cr) ( ) %define(lf) ( ) %define(tab) ( ) %define(space) ( ) %' %' Strip: %' strip all occurances of "char" string from "arg" string. %' %*define(strip(char,arg)) local str head tail (%' %' '%define(str) (%0)%' %' '%define(tail) (%arg)%' %' '%while(%nes(%tail,%0)) (%' %' '%match(head%(%char)tail) (%tail)%' %' '%define(str) (%str%head)%' %' ')%' %' '%str%' )%' %' %' Cleanup: %' strip spaces, tabs and CRLFs from string. %' %*define(cleanup(str)) (%strip(%space,%strip(%tab,%strip(%cr,%strip(%lf,%str))))) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the name of the Communication Board. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(comm_name(cname_p))(%' %' %define(cname)(%cleanup(%cname_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public cqname cqname db %len(%cname) db '%cname' base_code ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the the boot information. It specifies the %' wakeup port, the boot address and the time for diagnostics to complete %' on the Communication board. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(boot_info(port_p,address_base_p,address_off_p,diagnostics_time_p))(%' %' %define(port)(%cleanup(%port_p))%' %define(address_base)(%cleanup(%address_base_p))%' %define(address_off)(%cleanup(%address_off_p))%' %define(diagnostics_time)(%cleanup(%diagnostics_time_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public wake_up_port public boot_address public init_boot_p public start_delay_time public timelimit ; error_print is placed here for compatibility with rmxnet. It is set TRUE. public error_print error_print db 0ffh wake_up_port dw %port boot_address dw %address_off dw %address_base init_boot_p dw %address_off ;this is what AFA uses for the boot address dw %address_base timelimit dw %diagnostics_time start_delay_time dw %diagnostics_time ; used by AFA for diagnostic delay base_code ends %' ) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the length of the Communication Board host id %' and allocates space for it. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(comm_board_station_address_l(h_len_p))(%' %' %define(h_len)(%cleanup(%h_len_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public comm_host_id_l comm_host_id_l db %h_len base_code ends %' %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment byte public 'data' )FI public comm_host_id public boot_status_str boot_status_str dw 2 dup (0) comm_host_id db %h_len dup (0) base_data ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the number of internal processes that will %' send messages via mip. Actually it is the number of response ports %' that rbs sent to the 552 can have. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(num_internal_ports( num_p))(%' %' %define(num)(%cleanup(%num_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public num_internal_ports num_internal_ports dw %num base_code ends %' %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment byte public 'data' )FI public internal_ports, num_int_rbs internal_ports db %num dup (?) num_int_rbs dw %num dup (?) base_data ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the mip information. %' 1. The device id of the RMX system. %' 2. The interrupt level of the comm board in RMX format. %' 3. The device id of the comm board. %' 4. The address of the MIP Q from RMX to the comm board. %' 5. The address of the MIP Q from the comm board to RMX. %' 6. The number of request queue entries. %' 7. The time the mip driver is willing to wait for a comm board response. %' 8. The number of response mailboxes that iRMX application tasks can %' have in their rbs to the 552. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(mip_info(t_dev_p,i_level_p,cb_dev_id_p,rqd_out_base_p,rqd_out_off_p, rqd_in_base_p,rqd_in_off_p,rqe_size_p,time_p,max_mbx_p))(%' %define(t_dev)(%cleanup(%t_dev_p))%' %define(i_level)(%cleanup(%i_level_p))%' %define(cb_dev_id)(%cleanup(%cb_dev_id_p))%' %define(rqd_out_base)(%cleanup(%rqd_out_base_p))%' %define(rqd_out_off)(%cleanup(%rqd_out_off_p))%' %define(rqd_in_base)(%cleanup(%rqd_in_base_p))%' %define(rqd_in_off)(%cleanup(%rqd_in_off_p))%' %define(rqe_size)(%cleanup(%rqe_size_p))%' %define(time)(%cleanup(%time_p))%' %define(max_mbx)(%cleanup(%max_mbx_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public this_device public int_level public init_mip_device_info public mip_time public no_of_mailboxes this_device db %t_dev int_level dw %i_level init_mip_device_info db %cb_dev_id db 0ffh dw %rqd_out_off dw %rqd_out_base dw %rqd_in_off dw %rqd_in_base db %rqe_size mip_time dw %time no_of_mailboxes db %max_mbx base_code ends %' %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment byte public 'data' )FI public free_mbx_ptr public mailboxes public mailboxe_in_use free_mbx_ptr db 1 dup(0) mailboxes dw %max_mbx dup (0) mailboxe_in_use db %max_mbx dup (0) base_data ends %' ) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the layers that reside on the 552. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %set(num_layers,0)%'init number of layers on the 552. %' %*define(layer(num_p))(%' %define(num)(%cleanup(%num_p))%' %' %set(num_layers,%num_layers+1) %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI layer_%num_layers db %num base_code ends %' ) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the number of response mailboxes that %' iRMX application tasks can have in their rbs to the 552. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(num_external_mailboxes( num_p))(%' %' %define(num)(%cleanup(%num_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public no_of_mailboxes no_of_mailboxes db %num base_code ends %' %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment byte public 'data' )FI public free_mbx_ptr public mailboxes, num_ext_rbs public mailboxe_in_use free_mbx_ptr db 1 dup(0) mailboxes dw %num dup (?) mailboxe_in_use db %num dup (0) num_ext_rbs dw %num dup (?) base_data ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the device ids of the RMX system and the comm board. %' There are 2 parameters. %' 1. The device id of the RMX system. %' 2. The device id of the comm board. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(device_ids( rmx_id_p, comm_board_id_p))(%' %' %define(rmx_id)(%cleanup(%rmx_id_p))%' %define(comm_board_id)(%cleanup(%comm_board_id_p))%' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public this_device this_device db %rmx_id %' Time host is willing to wait for comm board to respond. %set(time, 600h)%' public mip_time public Init_mip_device_info Init_mip_device_info db %comm_board_id db 0ffh ;status = 0ffh => enabled dw 0, 0 dw 0, 0 db 0 mip_time dw %time base_code ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the wakeup port of the comm board. %' There is 1 parameter. %' 1. The I/O wakeuo port of the comm board. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(wakeup_port( port_num_p))(%' %' %define(port_num)(%cleanup(%port_num_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public wake_up_port wake_up_port dw %port_num base_code ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the interrupt level of the comm board. %' There is 1 parameter. %' 1. Interrupt level of the comm board in RMX format. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(interrupt_level( int_level_p))(%' %' %define(int_level)(%cleanup(%int_level_p))%' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public int_level int_level dw %int_level base_code ends %' ) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro must be the last macro in the configuration calls %' It has no parameters. %' It initializes all the data structures required by MIP. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(end_mip_cnfg)(%' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public num_layers num_layers dw %num_layers %' initializes some variables to 0. %' also call define sublayer analysis %if ( %num_layers ne 0) then( extrn define_sublayer_analysis:far extrn mip_cmd:far extrn mip_delete:far )FI public mip_cnfg_init mip_cnfg_init: push ds pop es xor ax, ax cld xor cx,cx mov cl, no_of_mailboxes shl cx, 1 %If (%Asm286) Then ( mov di, offset mailboxes ) Else ( mov di, offset dgroup:mailboxes )FI rep stosw mov bx, num_internal_ports mov cx, bx shl bx, 1 add cx, bx %If (%Asm286) Then ( mov di, offset internal_ports ) Else ( mov di, offset dgroup:internal_ports )FI rep stosb %set(counter,%num_layers) %while(%counter ne 0 )(%' mov al, layer_%counter push ax push cs ;push code segment first %If (%Asm286) Then ( mov ax, offset mip_cmd ) Else ( mov ax, offset base_cgroup:mip_cmd )FI push ax push cs ;push code segment first %If (%Asm286) Then ( mov ax, offset mip_delete ) Else ( mov ax, offset base_cgroup:mip_delete )FI push ax call define_sublayer_analysis %set(counter,%counter-1) ) ret base_code ends ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: load( local, logical_name, file_name ) %' load( remote, class_code, 0 ) %' load( null, 0, 0 ) %' If the first parameter is l, then the 552 is loaded locally. %' The token for the device on which the load file resides must %' be cataloged in the root dir as logical_name, the second parm. %' The third parameter is the name of the load file. %' If the first parameter is r, the 552 is loaded remotely. %' The second parameter is the class code that the 552 should use %' when requesting boot service. The third parameter must be 0. %' If the first parameter is n, then it is assumed that the 552 has already %' been loaded. The second and third parameters must be 0. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(load( local_remote_p, log_name_p, file_name_p))(%' %' %define(local_remote)(%cleanup(%local_remote_p))%' %define(log_name)(%cleanup(%log_name_p))%' %define(file_name)(%cleanup(%file_name_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI %if ( (%eqs(%local_remote,LOCAL)) or (%eqs(%local_remote,local)) ) then(%' public logical_name,file_name,do_local_or_remote_load,how_load,host_buf_addr extrn do_local_load:near logical_name db (%len(%log_name)), '%log_name' file_name db (%len(%file_name)), '%file_name' how_load db 1 host_buf_addr dd 0 do_local_or_remote_load: jmp do_local_load )%' else( %if ( (%eqs(%local_remote,NULL)) or (%eqs(%local_remote,null)) ) then(%' public do_local_or_remote_load, how_load how_load db 3 extrn no_load:near do_local_or_remote_load: jmp no_load )%' else( public class_code, do_local_or_remote_load, how_load extrn do_remote_load:near class_code dw %log_name how_load db 2 do_local_or_remote_load: jmp do_remote_load )fi )fi%' base_code ends )%' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: boot_address( address ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(boot_address( ba_o_p, ba_b_p))(%' %' %define(ba_o)(%cleanup(%ba_o_p))%' %define(ba_b)(%cleanup(%ba_b_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public Init_boot_p public boot_address Init_boot_p dw %ba_o, %ba_b boot_address dw %ba_o, %ba_b base_code ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: comm_start_address( address ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(comm_start_address( ba_o_p, ba_b_p))(%' %' %define(ba_o)(%cleanup(%ba_o_p))%' %define(ba_b)(%cleanup(%ba_b_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public comm_start_address comm_start_address dw %ba_o, %ba_b base_code ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: commengine_error_reporting( Y/N ) %' If the first parameter is Y, then if the COMMengine initialization fails, %' a message gets printed on the iSDM console and the iRMXNET %' job gets deleted. %' If the first parameter is N, then if the COMMengine initialization fails, %' iRMXNET enters a do forever loop. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(commengine_error_reporting( y_n_p ))(%' %' %define(y_n)(%cleanup(%y_n_p))%' %' %if (%Asm286) then (%' base_code segment Er public ) Else (%' base_code segment byte public 'code' )FI %' %if ( (%eqs(%y_n,Y)) or (%eqs(%y_n,y)) ) then(%' public error_print error_print db 0ffh )%' else( public error_print, report_552_init_error error_print db 0 report_552_init_error: ret 2 )fi base_code ends ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: commengine_delay( start_delay_time ) %' start_delay_time is the time to delay calling start. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(commengine_delay( del_p ))(%' %' %define(del)(%cleanup(%del_p))%' %' %if (%Asm286) then (%' base_code segment ER public ) Else (%' base_code segment byte public 'code' )FI %' public start_delay_time public timelimit start_delay_time dw %del timelimit dw %del base_code ends )