
{ DECK: IOT$PP_INTERFACE_TABLE

  CONST
    ioc$extra_logical_pp = 10,
    ioc$pp_count = (cmc$max_pp_per_iou * dsc$max_number_of_ious) +
          ioc$extra_logical_pp,
    ioc$communication_buffer_length = 768,
    ioc$pp_interface_table_lock_bit = 63,
    ioc$response_buffer_length = 200,
    ioc$response_buffer_length_b = ioc$response_buffer_length * 8;

  TYPE
    iot$pp_interface_table = packed record
      pp_number: ALIGNED [0 MOD 512] iot$pp_number,
      first_logical_unit: iot$logical_unit,
      number_of_units: iot$logical_unit,
      active_check: boolean,
      idle_request: boolean,
      resume_request: boolean,
      idle_status: boolean,
      fill1: 0 .. 0f(16),
      fill12: 0 .. 7f(16),
      lock: boolean,
      interrupt_register_rma: ALIGNED [0 MOD 8] ost$real_memory_address,
      channel_interlock_rma: ost$real_memory_address,
      fill2: 0 .. 0ffff(16),
      communication_buffer_length: iot$communication_buffer_length,
      communication_buffer_rma: ost$real_memory_address,
      lockword: ALIGNED [0 MOD 8] iot$lockword,
      fill3: 0 .. 0ffff(16),
      pp_request_queue: ALIGNED [2 MOD 8] ^iot$io_request,
      fill4: 0 .. 0ffffffff(16),
      pp_request_queue_rma: ALIGNED [4 MOD 8] ost$real_memory_address,
      fill5: 0 .. 0ffff(16),
      response_buffer: ^iot$response_buffer,
      fill10: 0 .. 0ffffffff(16),
      fill11: 0 .. 0ffffffff(16),
      fill6: ALIGNED [0 MOD 8] 0 .. 0ffffffff(16),
      response_buffer_rma: ost$real_memory_address,
      fill7: 0 .. 0ffffffffffff(16),
      inn: iot$response_buffer_offset,
      fill8: 0 .. 0ffffffffffff(16),
      out: iot$response_buffer_offset,
      fill9: 0 .. 0ffffffffffff(16),
      limit: iot$response_buffer_offset,
      unit_descriptors: ALIGNED [0 MOD 8] iot$unit_descriptors,
    recend,

    iot$unit_descriptors = array [ * ] of iot$unit_descriptor_entry,

    iot$unit_descriptor_entry = packed record
      logical_unit: ALIGNED [0 MOD 8] iot$logical_unit,
      unit_interface_table: ^iot$unit_interface_table,
      physical_path: ALIGNED [0 MOD 8] iot$physical_path,
      unit_interface_table_rma: ost$real_memory_address,
    recend,

    iot$communication_buffer = packed record
      fill1: 0 .. 7fffffff(16),
      slave: boolean,
      partner_pp: ost$real_memory_address,
      controlware_command: iot$command,
      control_module_command: iot$command,
      fill2: 0 .. 0ffffffff(16),
      overlay_rma: ost$real_memory_address,
      fill3: integer,
      fill4: integer,
      fill5: integer,
      fill6: integer,
      pp_usage: ALIGNED [0 MOD 8] array [1 .. ioc$communication_buffer_length]
            of ost$word,
    recend,
    iot$commun_buffer_template = record
      cb: ALIGNED [0 MOD 65000] iot$communication_buffer,
    recend,

    iot$communication_buffer_length = 0 .. 0ffff(16),
    iot$response_buffer = array [0 .. (ioc$response_buffer_length_b - 1)]
          of ost$byte,

{ 800 = 8 * ioc$response_buffer_length.

    iot$response_buffer_offset = 0 .. 0ffff(16),
    iot$response_buffer_template = record
      response_buffer: ALIGNED [0 MOD 65000] iot$response_buffer,
    recend,

    iot$physical_path = packed record
      channel_number: 0 .. 0ff(16), { 8 bits }
      port: 0 .. 3, { 2 bit  }
      controller_number: 0 .. 3f(16), { 6 bits }
      storage_directory_address: 0 .. 7, { 3 bits }
      physical_unit_number: 0 .. 1fff(16), { 13 bits}
    recend;

*copyc cmc$max_pp_per_iou
*copyc iot$pp_number
*copyc iot$logical_unit
*copyc dsc$max_number_of_ious
*copyc ost$hardware_subranges
*copyc iot$lockword
*copyc iot$io_request
*copyc iot$unit_interface_table
*copyc iot$command
*copyc mmt$rma_list
