! Filestore configuration constants

! This file contains the main system configuration definitions.
! In general, the first few can be changed once the system
! is operationsl, provided (almost) everything is recompiled.
! The stuff relating to the disc layout MUST NOT BE CHANGED
! once the system is operational, for obvious reasons.

%constinteger facility code      = 2      { Magic number : connect code       }
%constinteger default allocation = 32     { Blocks       : file allocation    }
%constinteger default quota      = 2048   { Blocks       : when user created  }
%constinteger ether retry limit  = 1      { Retries      :                    }
%constinteger stack gap          = 16384  { Bytes        : for each process   }
%constinteger stamp interval     = 10     { Minutes      : console reports    }

%constinteger ether TX procs  = 4
%constinteger procs           = 12  { filestore server processes              }
%constinteger internal limit  = procs - 4 { limit on internal copy operations }
%constinteger buffs           = 48  { system buffers                          }
%constinteger dirs            = 48  { size of directory cache                 }
%constinteger unos            = 32  { size of Uno table                       }
%constinteger xnos            = 48  { size of Xno table                       }
%constinteger tbuffs          = 511 { trace buffers     ** must be 2^^? - 1 **}
%constinteger ports           = 31  { ether ports in station                  }
%constinteger ether buffers   = 63  { received packets  ** must be 2^^? - 1 **}
%constinteger specials        = 12  { "special file" buffers                  }

%constinteger clock factor = 1250   { 1000 for 8MHz, 1250 for 10MHz           }

%constinteger infinity  = 16_7FFFFFFF     { largest valid +ve integer         } 
%constinteger h         = 16_0000FFFF     { %short -> unsigned 16 bits        }

%constinteger ether packet size = 536


! Disc layout (in blocks)
! The following MUST NOT BE ALTERED once there
! are real users of the system.

%constinteger disc size = 823 * 10 * 32      { blocks on the disc             }
%constinteger u per p   = 128                { users per disc partition       } 

%constinteger head size = 4096               { size of reserved disc areas    }
%constinteger dir  size = 4                  { blocks in a directory          }
%constinteger dp   size = dir size * u per p { directory partition size       } 
%constinteger fp   size = (disc size - 2 * head size) // 4 - dp size
                                             { user partition size            }


! Disc layout defined by the following.  The reserved areas are at the 
! extreme inside and outside of the disc.  The directories are in the
! middle of the disc, with the user partitions on either side.

%constinteger sy1 start = 0
%constinteger p2  start = sy1 start + head size
%constinteger p0  start = p2  start + fp size
%constinteger p2d start = p0  start + fp size
%constinteger p0d start = p2d start + dp size
%constinteger p1d start = p0d start + dp size
%constinteger p3d start = p1d start + dp size
%constinteger p1  start = p3d start + dp size
%constinteger p3  start = p1  start + fp size
%constinteger sy2 start = p3  start + fp size

%constintegerarray p  start(0 : 3) = p0  start, p1  start, p2  start, p3  start
%constintegerarray pd start(0 : 3) = p0d start, p1d start, p2d start, p3d start

%constinteger last partition = 3    {*** NB: must agree with above ***}


! Locations of (duplicated) bad block lists in the second system
! reserved area (sy2).
%constintegerarray bad area(1 : 4) = 0, 4, head size - 8, head size - 4
%constintegerarray pass area(1 : 2) = 8, head size - 12


! Bitmap size, defined in terms of the size of the user partitions.
%constinteger bitmap size = fp size // 8

%end %of %file
